Deprecated since 2023-05-15.
Unified · Split
| @@ -213,13 +213,7 @@ static av_cold int amf_encode_init_av1(AVCodecContext* avctx) · 212 unmodified lines | ||
| 213 | 213 | framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); |
| 214 | 214 | } |
| 215 | 215 | else { |
| 216 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 217 | − framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num | |
| 218 | −#if FF_API_TICKS_PER_FRAME | |
| 219 | − * avctx->ticks_per_frame | |
| 220 | −#endif | |
| 221 | − ); | |
| 222 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 216 | + framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num); | |
| 223 | 217 | } |
| 224 | 218 | |
| 225 | 219 | if ((ret = ff_amf_encode_init(avctx)) < 0) |
| @@ -210,13 +210,7 @@ static av_cold int amf_encode_init_h264(AVCodecContext *avctx) · 209 unmodified lines | ||
| 210 | 210 | if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { |
| 211 | 211 | framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); |
| 212 | 212 | } else { |
| 213 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 214 | − framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num | |
| 215 | −#if FF_API_TICKS_PER_FRAME | |
| 216 | − * avctx->ticks_per_frame | |
| 217 | −#endif | |
| 218 | − ); | |
| 219 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 213 | + framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num); | |
| 220 | 214 | } |
| 221 | 215 | |
| 222 | 216 | if ((ret = ff_amf_encode_init(avctx)) != 0) |
| @@ -179,13 +179,7 @@ static av_cold int amf_encode_init_hevc(AVCodecContext *avctx) · 178 unmodified lines | ||
| 179 | 179 | if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { |
| 180 | 180 | framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); |
| 181 | 181 | } else { |
| 182 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 183 | − framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num | |
| 184 | −#if FF_API_TICKS_PER_FRAME | |
| 185 | − * avctx->ticks_per_frame | |
| 186 | −#endif | |
| 187 | − ); | |
| 188 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 182 | + framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num); | |
| 189 | 183 | } |
| 190 | 184 | |
| 191 | 185 | if ((ret = ff_amf_encode_init(avctx)) < 0) |
| @@ -573,23 +573,6 @@ typedef struct AVCodecContext { · 572 unmodified lines | ||
| 573 | 573 | */ |
| 574 | 574 | AVRational framerate; |
| 575 | 575 | |
| 576 | −#if FF_API_TICKS_PER_FRAME | |
| 577 | − /** | |
| 578 | − * For some codecs, the time base is closer to the field rate than the frame rate. | |
| 579 | − * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration | |
| 580 | − * if no telecine is used ... | |
| 581 | − * | |
| 582 | − * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2. | |
| 583 | − * | |
| 584 | − * @deprecated | |
| 585 | − * - decoding: Use AVCodecDescriptor.props & AV_CODEC_PROP_FIELDS | |
| 586 | − * - encoding: Set AVCodecContext.framerate instead | |
| 587 | − * | |
| 588 | − */ | |
| 589 | − attribute_deprecated | |
| 590 | − int ticks_per_frame; | |
| 591 | −#endif | |
| 592 | − | |
| 593 | 576 | /** |
| 594 | 577 | * Codec delay. |
| 595 | 578 | * |
| @@ -613,20 +613,6 @@ static int encode_preinit_video(AVCodecContext *avctx) · 612 unmodified lines | ||
| 613 | 613 | return AVERROR(EINVAL); |
| 614 | 614 | } |
| 615 | 615 | |
| 616 | −#if FF_API_TICKS_PER_FRAME | |
| 617 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 618 | − if (avctx->ticks_per_frame && avctx->time_base.num && | |
| 619 | − avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) { | |
| 620 | − av_log(avctx, AV_LOG_ERROR, | |
| 621 | − "ticks_per_frame %d too large for the timebase %d/%d.", | |
| 622 | − avctx->ticks_per_frame, | |
| 623 | − avctx->time_base.num, | |
| 624 | − avctx->time_base.den); | |
| 625 | − return AVERROR(EINVAL); | |
| 626 | − } | |
| 627 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 628 | −#endif | |
| 629 | − | |
| 630 | 616 | if (avctx->hw_frames_ctx) { |
| 631 | 617 | AVHWFramesContext *frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; |
| 632 | 618 | if (frames_ctx->format != avctx->pix_fmt) { |
| @@ -786,7 +786,7 @@ static int optimum_block_height(FlashSV2Context * s) · 785 unmodified lines | ||
| 786 | 786 | static int optimum_use15_7(FlashSV2Context * s) |
| 787 | 787 | { |
| 788 | 788 | #ifndef FLASHSV2_DUMB |
| 789 | − double ideal = ((double)(s->avctx->bit_rate * s->avctx->time_base.den * s->avctx->ticks_per_frame)) / | |
| 789 | + double ideal = ((double)(s->avctx->bit_rate * s->avctx->time_base.den)) / | |
| 790 | 790 | ((double) s->avctx->time_base.num) * s->avctx->frame_num; |
| 791 | 791 | if (ideal + use15_7_threshold < s->total_bits) { |
| 792 | 792 | return 1; |
| @@ -802,8 +802,7 @@ static int optimum_dist(FlashSV2Context * s) · 9 unmodified lines | ||
| 802 | 802 | { |
| 803 | 803 | #ifndef FLASHSV2_DUMB |
| 804 | 804 | double ideal = |
| 805 | − s->avctx->bit_rate * s->avctx->time_base.den * | |
| 806 | − s->avctx->ticks_per_frame; | |
| 805 | + s->avctx->bit_rate * s->avctx->time_base.den; | |
| 807 | 806 | int dist = pow((s->total_bits / ideal) * color15_7_factor, 3); |
| 808 | 807 | av_log(s->avctx, AV_LOG_DEBUG, "dist: %d\n", dist); |
| 809 | 808 | return dist; |
| @@ -397,12 +397,6 @@ static av_cold int h264_decode_init(AVCodecContext *avctx) · 396 unmodified lines | ||
| 397 | 397 | return AVERROR_UNKNOWN; |
| 398 | 398 | } |
| 399 | 399 | |
| 400 | −#if FF_API_TICKS_PER_FRAME | |
| 401 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 402 | − avctx->ticks_per_frame = 2; | |
| 403 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 404 | −#endif | |
| 405 | − | |
| 406 | 400 | if (!avctx->internal->is_copy) { |
| 407 | 401 | if (avctx->extradata_size > 0 && avctx->extradata) { |
| 408 | 402 | ret = ff_h264_decode_extradata(avctx->extradata, avctx->extradata_size, |
| @@ -1270,13 +1270,7 @@ static int aom_encode(AVCodecContext *avctx, AVPacket *pkt, · 1269 unmodified lines | ||
| 1270 | 1270 | else if (avctx->framerate.num > 0 && avctx->framerate.den > 0) |
| 1271 | 1271 | duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base); |
| 1272 | 1272 | else { |
| 1273 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 1274 | − duration = | |
| 1275 | −#if FF_API_TICKS_PER_FRAME | |
| 1276 | − avctx->ticks_per_frame ? avctx->ticks_per_frame : | |
| 1277 | −#endif | |
| 1278 | − 1; | |
| 1279 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 1273 | + duration = 1; | |
| 1280 | 1274 | } |
| 1281 | 1275 | |
| 1282 | 1276 | switch (frame->color_range) { |
| @@ -86,13 +86,7 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx) · 85 unmodified lines | ||
| 86 | 86 | cfg->framerate_denom = avctx->framerate.den; |
| 87 | 87 | } else { |
| 88 | 88 | cfg->framerate_num = avctx->time_base.den; |
| 89 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 90 | − cfg->framerate_denom = avctx->time_base.num | |
| 91 | −#if FF_API_TICKS_PER_FRAME | |
| 92 | − * avctx->ticks_per_frame | |
| 93 | −#endif | |
| 94 | − ; | |
| 95 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 89 | + cfg->framerate_denom = avctx->time_base.num; | |
| 96 | 90 | } |
| 97 | 91 | cfg->target_bitrate = avctx->bit_rate; |
| 98 | 92 | cfg->vui.sar_width = avctx->sample_aspect_ratio.num; |
| @@ -135,13 +135,7 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) · 134 unmodified lines | ||
| 135 | 135 | if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { |
| 136 | 136 | param.fMaxFrameRate = av_q2d(avctx->framerate); |
| 137 | 137 | } else { |
| 138 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 139 | − param.fMaxFrameRate = 1.0 / av_q2d(avctx->time_base) | |
| 140 | −#if FF_API_TICKS_PER_FRAME | |
| 141 | − / FFMAX(avctx->ticks_per_frame, 1) | |
| 142 | −#endif | |
| 143 | − ; | |
| 144 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 138 | + param.fMaxFrameRate = 1.0 / av_q2d(avctx->time_base); | |
| 145 | 139 | } |
| 146 | 140 | param.iPicWidth = avctx->width; |
| 147 | 141 | param.iPicHeight = avctx->height; |
| @@ -217,15 +217,9 @@ static av_cold int librav1e_encode_init(AVCodecContext *avctx) · 216 unmodified lines | ||
| 217 | 217 | avctx->framerate.den, avctx->framerate.num |
| 218 | 218 | }); |
| 219 | 219 | } else { |
| 220 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 221 | 220 | rav1e_config_set_time_base(cfg, (RaRational) { |
| 222 | − avctx->time_base.num | |
| 223 | −#if FF_API_TICKS_PER_FRAME | |
| 224 | − * avctx->ticks_per_frame | |
| 225 | −#endif | |
| 226 | − , avctx->time_base.den | |
| 221 | + avctx->time_base.num, avctx->time_base.den | |
| 227 | 222 | }); |
| 228 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 229 | 223 | } |
| 230 | 224 | |
| 231 | 225 | 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, · 310 unmodified lines | ||
| 311 | 311 | param->frame_rate_denominator = avctx->framerate.den; |
| 312 | 312 | } else { |
| 313 | 313 | param->frame_rate_numerator = avctx->time_base.den; |
| 314 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 315 | − param->frame_rate_denominator = avctx->time_base.num | |
| 316 | −#if FF_API_TICKS_PER_FRAME | |
| 317 | − * avctx->ticks_per_frame | |
| 318 | −#endif | |
| 319 | − ; | |
| 320 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 314 | + param->frame_rate_denominator = avctx->time_base.num; | |
| 321 | 315 | } |
| 322 | 316 | |
| 323 | 317 | /* 2 = IDR, closed GOP, 1 = CRA, open GOP */ |
| @@ -1831,13 +1831,7 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, · 1830 unmodified lines | ||
| 1831 | 1831 | else if (avctx->framerate.num > 0 && avctx->framerate.den > 0) |
| 1832 | 1832 | duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base); |
| 1833 | 1833 | else { |
| 1834 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 1835 | − duration = | |
| 1836 | −#if FF_API_TICKS_PER_FRAME | |
| 1837 | − avctx->ticks_per_frame ? avctx->ticks_per_frame : | |
| 1838 | −#endif | |
| 1839 | − 1; | |
| 1840 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 1834 | + duration = 1; | |
| 1841 | 1835 | } |
| 1842 | 1836 | |
| 1843 | 1837 | res = vpx_codec_encode(&ctx->encoder, rawimg, timestamp, |
| @@ -128,20 +128,7 @@ static void vvenc_set_framerate(AVCodecContext *avctx, vvenc_config *params) · 127 unmodified lines | ||
| 128 | 128 | params->m_FrameScale = avctx->time_base.num; |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 132 | − | |
| 133 | −#if FF_API_TICKS_PER_FRAME | |
| 134 | − if (avctx->ticks_per_frame == 1) { | |
| 135 | −#endif | |
| 136 | − params->m_TicksPerSecond = -1; /* auto mode for ticks per frame = 1 */ | |
| 137 | −#if FF_API_TICKS_PER_FRAME | |
| 138 | − } else { | |
| 139 | − params->m_TicksPerSecond = | |
| 140 | − ceil((avctx->time_base.den / (double) avctx->time_base.num) * | |
| 141 | − (double) avctx->ticks_per_frame); | |
| 142 | − } | |
| 143 | −#endif | |
| 144 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 131 | + params->m_TicksPerSecond = -1; /* auto mode for ticks per frame = 1 */ | |
| 145 | 132 | } |
| 146 | 133 | |
| 147 | 134 | static int vvenc_parse_vvenc_params(AVCodecContext *avctx, vvenc_config *params) |
| @@ -1317,13 +1317,7 @@ static av_cold int X264_init(AVCodecContext *avctx) · 1316 unmodified lines | ||
| 1317 | 1317 | x4->params.i_fps_den = avctx->framerate.den; |
| 1318 | 1318 | } else { |
| 1319 | 1319 | x4->params.i_fps_num = avctx->time_base.den; |
| 1320 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 1321 | − x4->params.i_fps_den = avctx->time_base.num | |
| 1322 | −#if FF_API_TICKS_PER_FRAME | |
| 1323 | − * avctx->ticks_per_frame | |
| 1324 | −#endif | |
| 1325 | − ; | |
| 1326 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 1320 | + x4->params.i_fps_den = avctx->time_base.num; | |
| 1327 | 1321 | } |
| 1328 | 1322 | |
| 1329 | 1323 | x4->params.analyse.b_psnr = avctx->flags & AV_CODEC_FLAG_PSNR; |
| @@ -292,12 +292,7 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) · 291 unmodified lines | ||
| 292 | 292 | ctx->params->fpsDenom = avctx->framerate.den; |
| 293 | 293 | } else { |
| 294 | 294 | ctx->params->fpsNum = avctx->time_base.den; |
| 295 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 296 | − ctx->params->fpsDenom = avctx->time_base.num | |
| 297 | −#if FF_API_TICKS_PER_FRAME | |
| 298 | − * avctx->ticks_per_frame | |
| 299 | −#endif | |
| 300 | − ; | |
| 295 | + ctx->params->fpsDenom = avctx->time_base.num; | |
| 301 | 296 | FF_ENABLE_DEPRECATION_WARNINGS |
| 302 | 297 | } |
| 303 | 298 | ctx->params->sourceWidth = avctx->width; |
| @@ -660,11 +660,6 @@ static int mf_encv_output_adjust(AVCodecContext *avctx, IMFMediaType *type) · 659 unmodified lines | ||
| 660 | 660 | framerate = avctx->framerate; |
| 661 | 661 | } else { |
| 662 | 662 | framerate = av_inv_q(avctx->time_base); |
| 663 | −#if FF_API_TICKS_PER_FRAME | |
| 664 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 665 | − framerate.den *= avctx->ticks_per_frame; | |
| 666 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 667 | −#endif | |
| 668 | 663 | } |
| 669 | 664 | |
| 670 | 665 | ff_MFSetAttributeRatio((IMFAttributes *)type, &MF_MT_FRAME_RATE, framerate.num, framerate.den); |
| @@ -970,12 +970,6 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) · 969 unmodified lines | ||
| 970 | 970 | if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) { |
| 971 | 971 | // MPEG-1 fps |
| 972 | 972 | avctx->framerate = ff_mpeg12_frame_rate_tab[s1->frame_rate_index]; |
| 973 | −#if FF_API_TICKS_PER_FRAME | |
| 974 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 975 | − avctx->ticks_per_frame = 1; | |
| 976 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 977 | −#endif | |
| 978 | − | |
| 979 | 973 | avctx->chroma_sample_location = AVCHROMA_LOC_CENTER; |
| 980 | 974 | } else { // MPEG-2 |
| 981 | 975 | // MPEG-2 fps |
| @@ -984,11 +978,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 2 unmodified lines | ||
| 984 | 978 | ff_mpeg12_frame_rate_tab[s1->frame_rate_index].num * s1->frame_rate_ext.num, |
| 985 | 979 | ff_mpeg12_frame_rate_tab[s1->frame_rate_index].den * s1->frame_rate_ext.den, |
| 986 | 980 | 1 << 30); |
| 987 | −#if FF_API_TICKS_PER_FRAME | |
| 988 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 989 | − avctx->ticks_per_frame = 2; | |
| 990 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 991 | −#endif | |
| 992 | 981 | |
| 993 | 982 | switch (s->chroma_format) { |
| 994 | 983 | case CHROMA_420: avctx->chroma_sample_location = AVCHROMA_LOC_LEFT; break; |
| @@ -147,11 +147,6 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, · 146 unmodified lines | ||
| 147 | 147 | pc->frame_rate = avctx->framerate = ff_mpeg12_frame_rate_tab[frame_rate_index]; |
| 148 | 148 | bit_rate = (buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6); |
| 149 | 149 | avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO; |
| 150 | −#if FF_API_TICKS_PER_FRAME | |
| 151 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 152 | − avctx->ticks_per_frame = 1; | |
| 153 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 154 | −#endif | |
| 155 | 150 | } |
| 156 | 151 | break; |
| 157 | 152 | case EXT_START_CODE: |
| @@ -181,11 +176,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 23 unmodified lines | ||
| 181 | 176 | avctx->framerate.num = pc->frame_rate.num * (frame_rate_ext_n + 1); |
| 182 | 177 | avctx->framerate.den = pc->frame_rate.den * (frame_rate_ext_d + 1); |
| 183 | 178 | avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO; |
| 184 | −#if FF_API_TICKS_PER_FRAME | |
| 185 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 186 | − avctx->ticks_per_frame = 2; | |
| 187 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 188 | −#endif | |
| 189 | 179 | } |
| 190 | 180 | break; |
| 191 | 181 | case 0x8: /* picture coding extension */ |
| @@ -289,13 +289,7 @@ void ff_msmpeg4_encode_ext_header(MPVEncContext *const s) · 288 unmodified lines | ||
| 289 | 289 | if (s->c.avctx->framerate.num > 0 && s->c.avctx->framerate.den > 0) |
| 290 | 290 | fps = s->c.avctx->framerate.num / s->c.avctx->framerate.den; |
| 291 | 291 | else { |
| 292 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 293 | − fps = s->c.avctx->time_base.den / s->c.avctx->time_base.num | |
| 294 | −#if FF_API_TICKS_PER_FRAME | |
| 295 | − / FFMAX(s->c.avctx->ticks_per_frame, 1) | |
| 296 | −#endif | |
| 297 | − ; | |
| 298 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 292 | + fps = s->c.avctx->time_base.den / s->c.avctx->time_base.num; | |
| 299 | 293 | } |
| 300 | 294 | |
| 301 | 295 | 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) · 1799 unmodified lines | ||
| 1800 | 1800 | ctx->init_encode_params.frameRateDen = avctx->framerate.den; |
| 1801 | 1801 | } else { |
| 1802 | 1802 | ctx->init_encode_params.frameRateNum = avctx->time_base.den; |
| 1803 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 1804 | − ctx->init_encode_params.frameRateDen = avctx->time_base.num | |
| 1805 | −#if FF_API_TICKS_PER_FRAME | |
| 1806 | − * avctx->ticks_per_frame | |
| 1807 | −#endif | |
| 1808 | − ; | |
| 1809 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 1803 | + ctx->init_encode_params.frameRateDen = avctx->time_base.num; | |
| 1810 | 1804 | } |
| 1811 | 1805 | |
| 1812 | 1806 | #ifdef NVENC_HAVE_UNIDIR_B |
| @@ -272,9 +272,6 @@ static const AVOption avcodec_options[] = { · 271 unmodified lines | ||
| 272 | 272 | {"ch_layout", NULL, OFFSET(ch_layout), AV_OPT_TYPE_CHLAYOUT, {.str = NULL }, 0, 0, A|E|D, .unit = "ch_layout"}, |
| 273 | 273 | {"rc_max_vbv_use", NULL, OFFSET(rc_max_available_vbv_use), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, 0.0, FLT_MAX, V|E}, |
| 274 | 274 | {"rc_min_vbv_use", NULL, OFFSET(rc_min_vbv_overflow_use), AV_OPT_TYPE_FLOAT, {.dbl = 3 }, 0.0, FLT_MAX, V|E}, |
| 275 | −#if FF_API_TICKS_PER_FRAME | |
| 276 | −{"ticks_per_frame", NULL, OFFSET(ticks_per_frame), AV_OPT_TYPE_INT, {.i64 = 1 }, 1, INT_MAX, A|V|E|D}, | |
| 277 | −#endif | |
| 278 | 275 | {"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"}, |
| 279 | 276 | {"bt709", "BT.709", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_BT709 }, INT_MIN, INT_MAX, V|E|D, .unit = "color_primaries_type"}, |
| 280 | 277 | {"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 · 377 unmodified lines | ||
| 378 | 378 | dst->level = src->level; |
| 379 | 379 | |
| 380 | 380 | dst->bits_per_raw_sample = src->bits_per_raw_sample; |
| 381 | −#if FF_API_TICKS_PER_FRAME | |
| 382 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 383 | − dst->ticks_per_frame = src->ticks_per_frame; | |
| 384 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 385 | −#endif | |
| 386 | 381 | dst->color_primaries = src->color_primaries; |
| 387 | 382 | |
| 388 | 383 | dst->color_trc = src->color_trc; |
| @@ -62,13 +62,7 @@ static AVRational get_fpsQ(AVCodecContext *avctx) · 61 unmodified lines | ||
| 62 | 62 | if (avctx->framerate.num > 0 && avctx->framerate.den > 0) |
| 63 | 63 | return avctx->framerate; |
| 64 | 64 | |
| 65 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 66 | −#if FF_API_TICKS_PER_FRAME | |
| 67 | − return av_div_q((AVRational){1, FFMAX(avctx->ticks_per_frame, 1)}, avctx->time_base); | |
| 68 | −#else | |
| 69 | 65 | return av_inv_q(avctx->time_base); |
| 70 | −#endif | |
| 71 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 72 | 66 | } |
| 73 | 67 | |
| 74 | 68 | static double get_fps(AVCodecContext *avctx) |
| @@ -418,14 +418,6 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb) · 417 unmodified lines | ||
| 418 | 418 | v->s.loop_filter, v->chromaformat, v->broadcast, v->interlace, |
| 419 | 419 | v->tfcntrflag, v->finterpflag); |
| 420 | 420 | |
| 421 | −#if FF_API_TICKS_PER_FRAME | |
| 422 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 423 | − if (v->broadcast) { // Pulldown may be present | |
| 424 | − v->s.avctx->ticks_per_frame = 2; | |
| 425 | − } | |
| 426 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 427 | −#endif | |
| 428 | − | |
| 429 | 421 | v->psf = get_bits1(gb); |
| 430 | 422 | if (v->psf) { //PsF, 6.1.13 |
| 431 | 423 | av_log(v->s.avctx, AV_LOG_ERROR, "Progressive Segmented Frame mode: not supported (yet)\n"); |
| @@ -38,7 +38,6 @@ · 37 unmodified lines | ||
| 38 | 38 | */ |
| 39 | 39 | |
| 40 | 40 | #define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 62) |
| 41 | −#define FF_API_TICKS_PER_FRAME (LIBAVCODEC_VERSION_MAJOR < 62) | |
| 42 | 41 | #define FF_API_DROPCHANGED (LIBAVCODEC_VERSION_MAJOR < 62) |
| 43 | 42 | |
| 44 | 43 | #define FF_API_AVFFT (LIBAVCODEC_VERSION_MAJOR < 62) |
| @@ -797,11 +797,6 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, · 796 unmodified lines | ||
| 797 | 797 | : (ist->codecpar->codec_type == AVMEDIA_TYPE_AUDIO ? (AVRational){0, 1} |
| 798 | 798 | : ist->time_base); |
| 799 | 799 | AVRational enc_tb = ist->time_base; |
| 800 | −#if FF_API_TICKS_PER_FRAME | |
| 801 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 802 | − int ticks_per_frame = dec_ctx ? dec_ctx->ticks_per_frame : 1; | |
| 803 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 804 | −#endif | |
| 805 | 800 | |
| 806 | 801 | /* |
| 807 | 802 | * Avi is a special case here because it supports variable fps but |
| @@ -827,9 +822,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 19 unmodified lines | ||
| 827 | 822 | (dec_ctx_framerate.num || ist->codecpar->codec_type == AVMEDIA_TYPE_AUDIO))) { |
| 828 | 823 | enc_tb = dec_ctx_tb; |
| 829 | 824 | enc_tb.den *= 2; |
| 830 | −#if FF_API_TICKS_PER_FRAME | |
| 831 | − enc_tb.num *= ticks_per_frame; | |
| 832 | −#endif | |
| 833 | 825 | } |
| 834 | 826 | } else if (!(ofmt->flags & AVFMT_VARIABLE_FPS) |
| 835 | 827 | && !av_match_name(ofmt->name, "mov,mp4,3gp,3g2,psp,ipod,ismv,f4v")) { |
| @@ -839,9 +831,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 3 unmodified lines | ||
| 839 | 831 | || (copy_tb == AVFMT_TBCF_DECODER && |
| 840 | 832 | (dec_ctx_framerate.num || ist->codecpar->codec_type == AVMEDIA_TYPE_AUDIO))) { |
| 841 | 833 | enc_tb = dec_ctx_tb; |
| 842 | −#if FF_API_TICKS_PER_FRAME | |
| 843 | − enc_tb.num *= ticks_per_frame; | |
| 844 | −#endif | |
| 845 | 834 | } |
| 846 | 835 | } |
| 847 | 836 | |
| @@ -1317,12 +1317,6 @@ static int codec_close(FFStream *sti) · 1316 unmodified lines | ||
| 1317 | 1317 | |
| 1318 | 1318 | avctx_new->pkt_timebase = sti->avctx->pkt_timebase; |
| 1319 | 1319 | |
| 1320 | −#if FF_API_TICKS_PER_FRAME | |
| 1321 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 1322 | − avctx_new->ticks_per_frame = sti->avctx->ticks_per_frame; | |
| 1323 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 1324 | −#endif | |
| 1325 | − | |
| 1326 | 1320 | avcodec_free_context(&sti->avctx); |
| 1327 | 1321 | sti->avctx = avctx_new; |
| 1328 | 1322 | |