avcodec: remove deprecated FF_API_TICKS_PER_FRAME
Deprecated since 2023-05-15. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
c29a1cbd03
commit
7d07723db5
28 changed files with 16 additions and 210 deletions
|
|
@ -213,13 +213,7 @@ static av_cold int amf_encode_init_av1(AVCodecContext* avctx)
|
|||
framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den);
|
||||
}
|
||||
else {
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
* avctx->ticks_per_frame
|
||||
#endif
|
||||
);
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num);
|
||||
}
|
||||
|
||||
if ((ret = ff_amf_encode_init(avctx)) < 0)
|
||||
|
|
|
|||
|
|
@ -210,13 +210,7 @@ static av_cold int amf_encode_init_h264(AVCodecContext *avctx)
|
|||
if (avctx->framerate.num > 0 && avctx->framerate.den > 0) {
|
||||
framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den);
|
||||
} else {
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
* avctx->ticks_per_frame
|
||||
#endif
|
||||
);
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num);
|
||||
}
|
||||
|
||||
if ((ret = ff_amf_encode_init(avctx)) != 0)
|
||||
|
|
|
|||
|
|
@ -179,13 +179,7 @@ static av_cold int amf_encode_init_hevc(AVCodecContext *avctx)
|
|||
if (avctx->framerate.num > 0 && avctx->framerate.den > 0) {
|
||||
framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den);
|
||||
} else {
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
* avctx->ticks_per_frame
|
||||
#endif
|
||||
);
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num);
|
||||
}
|
||||
|
||||
if ((ret = ff_amf_encode_init(avctx)) < 0)
|
||||
|
|
|
|||
|
|
@ -573,23 +573,6 @@ typedef struct AVCodecContext {
|
|||
*/
|
||||
AVRational framerate;
|
||||
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
/**
|
||||
* For some codecs, the time base is closer to the field rate than the frame rate.
|
||||
* Most notably, H.264 and MPEG-2 specify time_base as half of frame duration
|
||||
* if no telecine is used ...
|
||||
*
|
||||
* Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
|
||||
*
|
||||
* @deprecated
|
||||
* - decoding: Use AVCodecDescriptor.props & AV_CODEC_PROP_FIELDS
|
||||
* - encoding: Set AVCodecContext.framerate instead
|
||||
*
|
||||
*/
|
||||
attribute_deprecated
|
||||
int ticks_per_frame;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Codec delay.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -613,20 +613,6 @@ static int encode_preinit_video(AVCodecContext *avctx)
|
|||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
if (avctx->ticks_per_frame && avctx->time_base.num &&
|
||||
avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"ticks_per_frame %d too large for the timebase %d/%d.",
|
||||
avctx->ticks_per_frame,
|
||||
avctx->time_base.num,
|
||||
avctx->time_base.den);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
if (avctx->hw_frames_ctx) {
|
||||
AVHWFramesContext *frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data;
|
||||
if (frames_ctx->format != avctx->pix_fmt) {
|
||||
|
|
|
|||
|
|
@ -786,7 +786,7 @@ static int optimum_block_height(FlashSV2Context * s)
|
|||
static int optimum_use15_7(FlashSV2Context * s)
|
||||
{
|
||||
#ifndef FLASHSV2_DUMB
|
||||
double ideal = ((double)(s->avctx->bit_rate * s->avctx->time_base.den * s->avctx->ticks_per_frame)) /
|
||||
double ideal = ((double)(s->avctx->bit_rate * s->avctx->time_base.den)) /
|
||||
((double) s->avctx->time_base.num) * s->avctx->frame_num;
|
||||
if (ideal + use15_7_threshold < s->total_bits) {
|
||||
return 1;
|
||||
|
|
@ -802,8 +802,7 @@ static int optimum_dist(FlashSV2Context * s)
|
|||
{
|
||||
#ifndef FLASHSV2_DUMB
|
||||
double ideal =
|
||||
s->avctx->bit_rate * s->avctx->time_base.den *
|
||||
s->avctx->ticks_per_frame;
|
||||
s->avctx->bit_rate * s->avctx->time_base.den;
|
||||
int dist = pow((s->total_bits / ideal) * color15_7_factor, 3);
|
||||
av_log(s->avctx, AV_LOG_DEBUG, "dist: %d\n", dist);
|
||||
return dist;
|
||||
|
|
|
|||
|
|
@ -397,12 +397,6 @@ static av_cold int h264_decode_init(AVCodecContext *avctx)
|
|||
return AVERROR_UNKNOWN;
|
||||
}
|
||||
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
avctx->ticks_per_frame = 2;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
if (!avctx->internal->is_copy) {
|
||||
if (avctx->extradata_size > 0 && avctx->extradata) {
|
||||
ret = ff_h264_decode_extradata(avctx->extradata, avctx->extradata_size,
|
||||
|
|
|
|||
|
|
@ -1270,13 +1270,7 @@ static int aom_encode(AVCodecContext *avctx, AVPacket *pkt,
|
|||
else if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
|
||||
duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base);
|
||||
else {
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
duration =
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
avctx->ticks_per_frame ? avctx->ticks_per_frame :
|
||||
#endif
|
||||
1;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
duration = 1;
|
||||
}
|
||||
|
||||
switch (frame->color_range) {
|
||||
|
|
|
|||
|
|
@ -86,13 +86,7 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx)
|
|||
cfg->framerate_denom = avctx->framerate.den;
|
||||
} else {
|
||||
cfg->framerate_num = avctx->time_base.den;
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
cfg->framerate_denom = avctx->time_base.num
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
* avctx->ticks_per_frame
|
||||
#endif
|
||||
;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
cfg->framerate_denom = avctx->time_base.num;
|
||||
}
|
||||
cfg->target_bitrate = avctx->bit_rate;
|
||||
cfg->vui.sar_width = avctx->sample_aspect_ratio.num;
|
||||
|
|
|
|||
|
|
@ -135,13 +135,7 @@ static av_cold int svc_encode_init(AVCodecContext *avctx)
|
|||
if (avctx->framerate.num > 0 && avctx->framerate.den > 0) {
|
||||
param.fMaxFrameRate = av_q2d(avctx->framerate);
|
||||
} else {
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
param.fMaxFrameRate = 1.0 / av_q2d(avctx->time_base)
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
/ FFMAX(avctx->ticks_per_frame, 1)
|
||||
#endif
|
||||
;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
param.fMaxFrameRate = 1.0 / av_q2d(avctx->time_base);
|
||||
}
|
||||
param.iPicWidth = avctx->width;
|
||||
param.iPicHeight = avctx->height;
|
||||
|
|
|
|||
|
|
@ -217,15 +217,9 @@ static av_cold int librav1e_encode_init(AVCodecContext *avctx)
|
|||
avctx->framerate.den, avctx->framerate.num
|
||||
});
|
||||
} else {
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
rav1e_config_set_time_base(cfg, (RaRational) {
|
||||
avctx->time_base.num
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
* avctx->ticks_per_frame
|
||||
#endif
|
||||
, avctx->time_base.den
|
||||
avctx->time_base.num, avctx->time_base.den
|
||||
});
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
}
|
||||
|
||||
if ((avctx->flags & AV_CODEC_FLAG_PASS1 || avctx->flags & AV_CODEC_FLAG_PASS2) && !avctx->bit_rate) {
|
||||
|
|
|
|||
|
|
@ -311,13 +311,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param,
|
|||
param->frame_rate_denominator = avctx->framerate.den;
|
||||
} else {
|
||||
param->frame_rate_numerator = avctx->time_base.den;
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
param->frame_rate_denominator = avctx->time_base.num
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
* avctx->ticks_per_frame
|
||||
#endif
|
||||
;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
param->frame_rate_denominator = avctx->time_base.num;
|
||||
}
|
||||
|
||||
/* 2 = IDR, closed GOP, 1 = CRA, open GOP */
|
||||
|
|
|
|||
|
|
@ -1831,13 +1831,7 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt,
|
|||
else if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
|
||||
duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base);
|
||||
else {
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
duration =
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
avctx->ticks_per_frame ? avctx->ticks_per_frame :
|
||||
#endif
|
||||
1;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
duration = 1;
|
||||
}
|
||||
|
||||
res = vpx_codec_encode(&ctx->encoder, rawimg, timestamp,
|
||||
|
|
|
|||
|
|
@ -128,20 +128,7 @@ static void vvenc_set_framerate(AVCodecContext *avctx, vvenc_config *params)
|
|||
params->m_FrameScale = avctx->time_base.num;
|
||||
}
|
||||
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
if (avctx->ticks_per_frame == 1) {
|
||||
#endif
|
||||
params->m_TicksPerSecond = -1; /* auto mode for ticks per frame = 1 */
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
} else {
|
||||
params->m_TicksPerSecond =
|
||||
ceil((avctx->time_base.den / (double) avctx->time_base.num) *
|
||||
(double) avctx->ticks_per_frame);
|
||||
}
|
||||
#endif
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
params->m_TicksPerSecond = -1; /* auto mode for ticks per frame = 1 */
|
||||
}
|
||||
|
||||
static int vvenc_parse_vvenc_params(AVCodecContext *avctx, vvenc_config *params)
|
||||
|
|
|
|||
|
|
@ -1317,13 +1317,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
|
|||
x4->params.i_fps_den = avctx->framerate.den;
|
||||
} else {
|
||||
x4->params.i_fps_num = avctx->time_base.den;
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
x4->params.i_fps_den = avctx->time_base.num
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
* avctx->ticks_per_frame
|
||||
#endif
|
||||
;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
x4->params.i_fps_den = avctx->time_base.num;
|
||||
}
|
||||
|
||||
x4->params.analyse.b_psnr = avctx->flags & AV_CODEC_FLAG_PSNR;
|
||||
|
|
|
|||
|
|
@ -292,12 +292,7 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
|
|||
ctx->params->fpsDenom = avctx->framerate.den;
|
||||
} else {
|
||||
ctx->params->fpsNum = avctx->time_base.den;
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
ctx->params->fpsDenom = avctx->time_base.num
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
* avctx->ticks_per_frame
|
||||
#endif
|
||||
;
|
||||
ctx->params->fpsDenom = avctx->time_base.num;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
}
|
||||
ctx->params->sourceWidth = avctx->width;
|
||||
|
|
|
|||
|
|
@ -660,11 +660,6 @@ static int mf_encv_output_adjust(AVCodecContext *avctx, IMFMediaType *type)
|
|||
framerate = avctx->framerate;
|
||||
} else {
|
||||
framerate = av_inv_q(avctx->time_base);
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
framerate.den *= avctx->ticks_per_frame;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
}
|
||||
|
||||
ff_MFSetAttributeRatio((IMFAttributes *)type, &MF_MT_FRAME_RATE, framerate.num, framerate.den);
|
||||
|
|
|
|||
|
|
@ -970,12 +970,6 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
|
|||
if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
|
||||
// MPEG-1 fps
|
||||
avctx->framerate = ff_mpeg12_frame_rate_tab[s1->frame_rate_index];
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
avctx->ticks_per_frame = 1;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
|
||||
} else { // MPEG-2
|
||||
// MPEG-2 fps
|
||||
|
|
@ -984,11 +978,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||
ff_mpeg12_frame_rate_tab[s1->frame_rate_index].num * s1->frame_rate_ext.num,
|
||||
ff_mpeg12_frame_rate_tab[s1->frame_rate_index].den * s1->frame_rate_ext.den,
|
||||
1 << 30);
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
avctx->ticks_per_frame = 2;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
switch (s->chroma_format) {
|
||||
case CHROMA_420: avctx->chroma_sample_location = AVCHROMA_LOC_LEFT; break;
|
||||
|
|
|
|||
|
|
@ -147,11 +147,6 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
|
|||
pc->frame_rate = avctx->framerate = ff_mpeg12_frame_rate_tab[frame_rate_index];
|
||||
bit_rate = (buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6);
|
||||
avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO;
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
avctx->ticks_per_frame = 1;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case EXT_START_CODE:
|
||||
|
|
@ -181,11 +176,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||
avctx->framerate.num = pc->frame_rate.num * (frame_rate_ext_n + 1);
|
||||
avctx->framerate.den = pc->frame_rate.den * (frame_rate_ext_d + 1);
|
||||
avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO;
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
avctx->ticks_per_frame = 2;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case 0x8: /* picture coding extension */
|
||||
|
|
|
|||
|
|
@ -289,13 +289,7 @@ void ff_msmpeg4_encode_ext_header(MPVEncContext *const s)
|
|||
if (s->c.avctx->framerate.num > 0 && s->c.avctx->framerate.den > 0)
|
||||
fps = s->c.avctx->framerate.num / s->c.avctx->framerate.den;
|
||||
else {
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
fps = s->c.avctx->time_base.den / s->c.avctx->time_base.num
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
/ FFMAX(s->c.avctx->ticks_per_frame, 1)
|
||||
#endif
|
||||
;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
fps = s->c.avctx->time_base.den / s->c.avctx->time_base.num;
|
||||
}
|
||||
|
||||
put_bits(&s->pb, 5, FFMIN(fps, 31)); //yes 29.97 -> 29
|
||||
|
|
|
|||
|
|
@ -1800,13 +1800,7 @@ static av_cold int nvenc_setup_encoder(AVCodecContext *avctx)
|
|||
ctx->init_encode_params.frameRateDen = avctx->framerate.den;
|
||||
} else {
|
||||
ctx->init_encode_params.frameRateNum = avctx->time_base.den;
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
ctx->init_encode_params.frameRateDen = avctx->time_base.num
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
* avctx->ticks_per_frame
|
||||
#endif
|
||||
;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
ctx->init_encode_params.frameRateDen = avctx->time_base.num;
|
||||
}
|
||||
|
||||
#ifdef NVENC_HAVE_UNIDIR_B
|
||||
|
|
|
|||
|
|
@ -272,9 +272,6 @@ static const AVOption avcodec_options[] = {
|
|||
{"ch_layout", NULL, OFFSET(ch_layout), AV_OPT_TYPE_CHLAYOUT, {.str = NULL }, 0, 0, A|E|D, .unit = "ch_layout"},
|
||||
{"rc_max_vbv_use", NULL, OFFSET(rc_max_available_vbv_use), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, 0.0, FLT_MAX, V|E},
|
||||
{"rc_min_vbv_use", NULL, OFFSET(rc_min_vbv_overflow_use), AV_OPT_TYPE_FLOAT, {.dbl = 3 }, 0.0, FLT_MAX, V|E},
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
{"ticks_per_frame", NULL, OFFSET(ticks_per_frame), AV_OPT_TYPE_INT, {.i64 = 1 }, 1, INT_MAX, A|V|E|D},
|
||||
#endif
|
||||
{"color_primaries", "color primaries", OFFSET(color_primaries), AV_OPT_TYPE_INT, {.i64 = AVCOL_PRI_UNSPECIFIED }, 1, INT_MAX, V|E|D, .unit = "color_primaries_type"},
|
||||
{"bt709", "BT.709", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_BT709 }, INT_MIN, INT_MAX, V|E|D, .unit = "color_primaries_type"},
|
||||
{"unknown", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, .unit = "color_primaries_type"},
|
||||
|
|
|
|||
|
|
@ -378,11 +378,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||
dst->level = src->level;
|
||||
|
||||
dst->bits_per_raw_sample = src->bits_per_raw_sample;
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
dst->ticks_per_frame = src->ticks_per_frame;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
dst->color_primaries = src->color_primaries;
|
||||
|
||||
dst->color_trc = src->color_trc;
|
||||
|
|
|
|||
|
|
@ -62,13 +62,7 @@ static AVRational get_fpsQ(AVCodecContext *avctx)
|
|||
if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
|
||||
return avctx->framerate;
|
||||
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
return av_div_q((AVRational){1, FFMAX(avctx->ticks_per_frame, 1)}, avctx->time_base);
|
||||
#else
|
||||
return av_inv_q(avctx->time_base);
|
||||
#endif
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
}
|
||||
|
||||
static double get_fps(AVCodecContext *avctx)
|
||||
|
|
|
|||
|
|
@ -418,14 +418,6 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
|
|||
v->s.loop_filter, v->chromaformat, v->broadcast, v->interlace,
|
||||
v->tfcntrflag, v->finterpflag);
|
||||
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
if (v->broadcast) { // Pulldown may be present
|
||||
v->s.avctx->ticks_per_frame = 2;
|
||||
}
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
v->psf = get_bits1(gb);
|
||||
if (v->psf) { //PsF, 6.1.13
|
||||
av_log(v->s.avctx, AV_LOG_ERROR, "Progressive Segmented Frame mode: not supported (yet)\n");
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@
|
|||
*/
|
||||
|
||||
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_TICKS_PER_FRAME (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_DROPCHANGED (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
|
||||
#define FF_API_AVFFT (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
|
|
|
|||
|
|
@ -797,11 +797,6 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt,
|
|||
: (ist->codecpar->codec_type == AVMEDIA_TYPE_AUDIO ? (AVRational){0, 1}
|
||||
: ist->time_base);
|
||||
AVRational enc_tb = ist->time_base;
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
int ticks_per_frame = dec_ctx ? dec_ctx->ticks_per_frame : 1;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Avi is a special case here because it supports variable fps but
|
||||
|
|
@ -827,9 +822,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||
(dec_ctx_framerate.num || ist->codecpar->codec_type == AVMEDIA_TYPE_AUDIO))) {
|
||||
enc_tb = dec_ctx_tb;
|
||||
enc_tb.den *= 2;
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
enc_tb.num *= ticks_per_frame;
|
||||
#endif
|
||||
}
|
||||
} else if (!(ofmt->flags & AVFMT_VARIABLE_FPS)
|
||||
&& !av_match_name(ofmt->name, "mov,mp4,3gp,3g2,psp,ipod,ismv,f4v")) {
|
||||
|
|
@ -839,9 +831,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||
|| (copy_tb == AVFMT_TBCF_DECODER &&
|
||||
(dec_ctx_framerate.num || ist->codecpar->codec_type == AVMEDIA_TYPE_AUDIO))) {
|
||||
enc_tb = dec_ctx_tb;
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
enc_tb.num *= ticks_per_frame;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1317,12 +1317,6 @@ static int codec_close(FFStream *sti)
|
|||
|
||||
avctx_new->pkt_timebase = sti->avctx->pkt_timebase;
|
||||
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
avctx_new->ticks_per_frame = sti->avctx->ticks_per_frame;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
avcodec_free_context(&sti->avctx);
|
||||
sti->avctx = avctx_new;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue