Message ID | 20240405174452.35635-1-ffmpeg@haasn.xyz |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] avcodec/libx264: bump minimum required version to 160 | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Fri, Apr 05, 2024 at 07:44:52PM +0200, Niklas Haas wrote: > From: Niklas Haas <git@haasn.dev> > > This version is four years old, and present in Debian oldstable, Ubuntu > 22.04 and Leap 15.1. Ubuntu 20.04 has general support till 2025-05-29 Ubuntu 18.04 has security support (ESM) till 2028-04 thx [...]
On Sat, 06 Apr 2024 22:28:26 +0200 Michael Niedermayer <michael@niedermayer.cc> wrote: > On Fri, Apr 05, 2024 at 07:44:52PM +0200, Niklas Haas wrote: > > From: Niklas Haas <git@haasn.dev> > > > > This version is four years old, and present in Debian oldstable, Ubuntu > > 22.04 and Leap 15.1. > > Ubuntu 20.04 has general support till 2025-05-29 > Ubuntu 18.04 has security support (ESM) till 2028-04 I'll relax it from 160 back down to version 155 then. That covers Ubuntu 20.04 and Debian oldoldstable. > > thx > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Nations do behave wisely once they have exhausted all other alternatives. > -- Abba Eban > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
On Tue, Apr 09, 2024 at 02:53:28PM +0200, Niklas Haas wrote: > On Sat, 06 Apr 2024 22:28:26 +0200 Michael Niedermayer <michael@niedermayer.cc> wrote: > > On Fri, Apr 05, 2024 at 07:44:52PM +0200, Niklas Haas wrote: > > > From: Niklas Haas <git@haasn.dev> > > > > > > This version is four years old, and present in Debian oldstable, Ubuntu > > > 22.04 and Leap 15.1. > > > > Ubuntu 20.04 has general support till 2025-05-29 > > Ubuntu 18.04 has security support (ESM) till 2028-04 > > I'll relax it from 160 back down to version 155 then. That covers Ubuntu > 20.04 and Debian oldoldstable. 18.04 has 152 libx264-dev/bionic,now 2:0.152.2854+gite9a5903-2 amd64 [installed] Ubuntu 18.04 still has security support in ESM and ubuntu pro IIUC till 2028-04 thx [...]
On Wed, Apr 10, 2024 at 3:19 PM Michael Niedermayer <michael@niedermayer.cc> wrote: > > On Tue, Apr 09, 2024 at 02:53:28PM +0200, Niklas Haas wrote: > > On Sat, 06 Apr 2024 22:28:26 +0200 Michael Niedermayer <michael@niedermayer.cc> wrote: > > > On Fri, Apr 05, 2024 at 07:44:52PM +0200, Niklas Haas wrote: > > > > From: Niklas Haas <git@haasn.dev> > > > > > > > > This version is four years old, and present in Debian oldstable, Ubuntu > > > > 22.04 and Leap 15.1. > > > > > > Ubuntu 20.04 has general support till 2025-05-29 > > > Ubuntu 18.04 has security support (ESM) till 2028-04 > > > > I'll relax it from 160 back down to version 155 then. That covers Ubuntu > > 20.04 and Debian oldoldstable. > > 18.04 has 152 > > libx264-dev/bionic,now 2:0.152.2854+gite9a5903-2 amd64 [installed] > > Ubuntu 18.04 still has security support in ESM and ubuntu pro IIUC till 2028-04 > Then they can use security updates from old release branches. The assumption that people will run Git ffmpeg but distribution provided x264 seems flawed. They can update dependencies that are important for them. The distribution itself is certainly never going to update. - Hendrik
On Wed, 10 Apr 2024 15:18:52 +0200 Michael Niedermayer <michael@niedermayer.cc> wrote: > On Tue, Apr 09, 2024 at 02:53:28PM +0200, Niklas Haas wrote: > > On Sat, 06 Apr 2024 22:28:26 +0200 Michael Niedermayer <michael@niedermayer.cc> wrote: > > > On Fri, Apr 05, 2024 at 07:44:52PM +0200, Niklas Haas wrote: > > > > From: Niklas Haas <git@haasn.dev> > > > > > > > > This version is four years old, and present in Debian oldstable, Ubuntu > > > > 22.04 and Leap 15.1. > > > > > > Ubuntu 20.04 has general support till 2025-05-29 > > > Ubuntu 18.04 has security support (ESM) till 2028-04 > > > > I'll relax it from 160 back down to version 155 then. That covers Ubuntu > > 20.04 and Debian oldoldstable. > > 18.04 has 152 > > libx264-dev/bionic,now 2:0.152.2854+gite9a5903-2 amd64 [installed] > > Ubuntu 18.04 still has security support in ESM and ubuntu pro IIUC till 2028-04 Do you think FFmpeg 7.1 will be back-ported to Ubuntu 18.04 for security reasons? > > thx > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Those who are best at talking, realize last or never when they are wrong. > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
On Wed, Apr 10, 2024 at 03:30:23PM +0200, Hendrik Leppkes wrote: > On Wed, Apr 10, 2024 at 3:19 PM Michael Niedermayer > <michael@niedermayer.cc> wrote: > > > > On Tue, Apr 09, 2024 at 02:53:28PM +0200, Niklas Haas wrote: > > > On Sat, 06 Apr 2024 22:28:26 +0200 Michael Niedermayer <michael@niedermayer.cc> wrote: > > > > On Fri, Apr 05, 2024 at 07:44:52PM +0200, Niklas Haas wrote: > > > > > From: Niklas Haas <git@haasn.dev> > > > > > > > > > > This version is four years old, and present in Debian oldstable, Ubuntu > > > > > 22.04 and Leap 15.1. > > > > > > > > Ubuntu 20.04 has general support till 2025-05-29 > > > > Ubuntu 18.04 has security support (ESM) till 2028-04 > > > > > > I'll relax it from 160 back down to version 155 then. That covers Ubuntu > > > 20.04 and Debian oldoldstable. > > > > 18.04 has 152 > > > > libx264-dev/bionic,now 2:0.152.2854+gite9a5903-2 amd64 [installed] > > > > Ubuntu 18.04 still has security support in ESM and ubuntu pro IIUC till 2028-04 > > > > Then they can use security updates from old release branches. The > assumption that people will run Git ffmpeg but distribution provided > x264 seems flawed. They can update dependencies that are important for > them. I use distribution provided packages unless i have a reason to do otherwise If i have no such reason every case where thats not wroking is extra work also if i take what you say litterally, then you provide an argument to drop support for every distribution and require every dependency to be from git head. I dont think you intended that and i dont think that would be a good idea. Maybe its just me but i find it desireable to be able to just pull ffmpeg master head, build it and have it work on as many systems as possible. If for some reason a user needs git master of FFmpeg that doesnt mean she needs anything else to be very recent. You suggest people should just use release branches to get security updates truth is, our release branches are sometimes behind git master also we dont support releases. If someone finds a bug we demand reports against git master. thx [...]
On Wed, Apr 10, 2024 at 03:47:48PM +0200, Niklas Haas wrote: > On Wed, 10 Apr 2024 15:18:52 +0200 Michael Niedermayer <michael@niedermayer.cc> wrote: > > On Tue, Apr 09, 2024 at 02:53:28PM +0200, Niklas Haas wrote: > > > On Sat, 06 Apr 2024 22:28:26 +0200 Michael Niedermayer <michael@niedermayer.cc> wrote: > > > > On Fri, Apr 05, 2024 at 07:44:52PM +0200, Niklas Haas wrote: > > > > > From: Niklas Haas <git@haasn.dev> > > > > > > > > > > This version is four years old, and present in Debian oldstable, Ubuntu > > > > > 22.04 and Leap 15.1. > > > > > > > > Ubuntu 20.04 has general support till 2025-05-29 > > > > Ubuntu 18.04 has security support (ESM) till 2028-04 > > > > > > I'll relax it from 160 back down to version 155 then. That covers Ubuntu > > > 20.04 and Debian oldoldstable. > > > > 18.04 has 152 > > > > libx264-dev/bionic,now 2:0.152.2854+gite9a5903-2 amd64 [installed] > > > > Ubuntu 18.04 still has security support in ESM and ubuntu pro IIUC till 2028-04 > > Do you think FFmpeg 7.1 will be back-ported to Ubuntu 18.04 for security > reasons? I would not expect that but i also didnt expect 7.0 would be backported to 22.04 and 24.04 and it seems someone did unofficial backports thx [...]
Michael Niedermayer (12024-04-11): > Maybe its just me but i find it desireable to be able to just > pull ffmpeg master head, build it and have it work on as many systems > as possible. Not just you. The last time x264 had a change that would make me install from sources instead of using an older package was 2017, build 152. While the last time FFmpeg added features… is not that recent since features are more being removed these days, but still recent enough. Regards,
On Thu, Apr 11, 2024 at 6:02 AM Nicolas George <george@nsup.org> wrote: > Michael Niedermayer (12024-04-11): > > Maybe its just me but i find it desireable to be able to just > > pull ffmpeg master head, build it and have it work on as many systems > > as possible. > > While the last time FFmpeg added features… is not that recent since > features are more being removed these days, but still recent enough. > This statement is false. Please stop spreading misinformation.
Hi, On Wed, Apr 10, 2024, 19:32 Michael Niedermayer <michael@niedermayer.cc> wrote: > On Wed, Apr 10, 2024 at 03:47:48PM +0200, Niklas Haas wrote: > > On Wed, 10 Apr 2024 15:18:52 +0200 Michael Niedermayer < > michael@niedermayer.cc> wrote: > > > On Tue, Apr 09, 2024 at 02:53:28PM +0200, Niklas Haas wrote: > > > > On Sat, 06 Apr 2024 22:28:26 +0200 Michael Niedermayer < > michael@niedermayer.cc> wrote: > > > > > On Fri, Apr 05, 2024 at 07:44:52PM +0200, Niklas Haas wrote: > > > > > > From: Niklas Haas <git@haasn.dev> > > > > > > > > > > > > This version is four years old, and present in Debian oldstable, > Ubuntu > > > > > > 22.04 and Leap 15.1. > > > > > > > > > > Ubuntu 20.04 has general support till 2025-05-29 > > > > > Ubuntu 18.04 has security support (ESM) till 2028-04 > > > > > > > > I'll relax it from 160 back down to version 155 then. That covers > Ubuntu > > > > 20.04 and Debian oldoldstable. > > > > > > 18.04 has 152 > > > > > > libx264-dev/bionic,now 2:0.152.2854+gite9a5903-2 amd64 [installed] > > > > > > Ubuntu 18.04 still has security support in ESM and ubuntu pro IIUC > till 2028-04 > > > > Do you think FFmpeg 7.1 will be back-ported to Ubuntu 18.04 for security > > reasons? > > I would not expect that but i also didnt expect 7.0 would be backported > to 22.04 and 24.04 and it seems someone did unofficial backports > > thx > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Nations do behave wisely once they have exhausted all other alternatives. > -- Abba Eban > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > I think supporting anything earlier than 20.04 is obscene at this point. -- Sean McGovern >
tor 2024-04-11 klockan 18:55 -0400 skrev Sean McGovern: > Hi, > > On Wed, Apr 10, 2024, 19:32 Michael Niedermayer > <michael@niedermayer.cc> > wrote: > > > On Wed, Apr 10, 2024 at 03:47:48PM +0200, Niklas Haas wrote: > > > On Wed, 10 Apr 2024 15:18:52 +0200 Michael Niedermayer < > > michael@niedermayer.cc> wrote: > > > > On Tue, Apr 09, 2024 at 02:53:28PM +0200, Niklas Haas wrote: > > > > > On Sat, 06 Apr 2024 22:28:26 +0200 Michael Niedermayer < > > michael@niedermayer.cc> wrote: > > > > > > On Fri, Apr 05, 2024 at 07:44:52PM +0200, Niklas Haas > > > > > > wrote: > > > > > > > From: Niklas Haas <git@haasn.dev> > > > > > > > > > > > > > > This version is four years old, and present in Debian > > > > > > > oldstable, > > Ubuntu > > > > > > > 22.04 and Leap 15.1. > > > > > > > > > > > > Ubuntu 20.04 has general support till 2025-05-29 > > > > > > Ubuntu 18.04 has security support (ESM) till 2028-04 > > > > > > > > > > I'll relax it from 160 back down to version 155 then. That > > > > > covers > > Ubuntu > > > > > 20.04 and Debian oldoldstable. > > > > > > > > 18.04 has 152 > > > > > > > > libx264-dev/bionic,now 2:0.152.2854+gite9a5903-2 amd64 > > > > [installed] > > > > > > > > Ubuntu 18.04 still has security support in ESM and ubuntu pro > > > > IIUC > > till 2028-04 > > > > > > Do you think FFmpeg 7.1 will be back-ported to Ubuntu 18.04 for > > > security > > > reasons? > > > > I would not expect that but i also didnt expect 7.0 would be > > backported > > to 22.04 and 24.04 and it seems someone did unofficial backports > > > > thx > > > > [...] > > -- > > Michael GnuPG fingerprint: > > 9FF2128B147EF6730BADF133611EC787040B0FAB > > > > Nations do behave wisely once they have exhausted all other > > alternatives. > > -- Abba Eban > > _______________________________________________ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > To unsubscribe, visit link above, or email > > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > > > > I think supporting anything earlier than 20.04 is obscene at this > point. Some masochists such as myself maintain projects for Ubuntu 18.04 and also Debian 10 (Buster). /Tomas
On Thu, Apr 11, 2024 at 06:55:58PM -0400, Sean McGovern wrote: > Hi, > > On Wed, Apr 10, 2024, 19:32 Michael Niedermayer <michael@niedermayer.cc> > wrote: > > > On Wed, Apr 10, 2024 at 03:47:48PM +0200, Niklas Haas wrote: > > > On Wed, 10 Apr 2024 15:18:52 +0200 Michael Niedermayer < > > michael@niedermayer.cc> wrote: > > > > On Tue, Apr 09, 2024 at 02:53:28PM +0200, Niklas Haas wrote: > > > > > On Sat, 06 Apr 2024 22:28:26 +0200 Michael Niedermayer < > > michael@niedermayer.cc> wrote: > > > > > > On Fri, Apr 05, 2024 at 07:44:52PM +0200, Niklas Haas wrote: > > > > > > > From: Niklas Haas <git@haasn.dev> > > > > > > > > > > > > > > This version is four years old, and present in Debian oldstable, > > Ubuntu > > > > > > > 22.04 and Leap 15.1. > > > > > > > > > > > > Ubuntu 20.04 has general support till 2025-05-29 > > > > > > Ubuntu 18.04 has security support (ESM) till 2028-04 > > > > > > > > > > I'll relax it from 160 back down to version 155 then. That covers > > Ubuntu > > > > > 20.04 and Debian oldoldstable. > > > > > > > > 18.04 has 152 > > > > > > > > libx264-dev/bionic,now 2:0.152.2854+gite9a5903-2 amd64 [installed] > > > > > > > > Ubuntu 18.04 still has security support in ESM and ubuntu pro IIUC > > till 2028-04 > > > > > > Do you think FFmpeg 7.1 will be back-ported to Ubuntu 18.04 for security > > > reasons? > > > > I would not expect that but i also didnt expect 7.0 would be backported > > to 22.04 and 24.04 and it seems someone did unofficial backports > > > > thx > > > > [...] > > -- > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > > > Nations do behave wisely once they have exhausted all other alternatives. > > -- Abba Eban > > _______________________________________________ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > To unsubscribe, visit link above, or email > > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > > > > I think supporting anything earlier than 20.04 is obscene at this point. one of my boxes is such a "obscene" 18.04 box. I do want to upgrade it since a long time. Upgrading it isnt hard, it will just break scripts and tests. so not upgarding was the path of least resistance. But at some point i need to upgrade it thx [...]
diff --git a/configure b/configure index a393f6ea655..070ec7fe1da 100755 --- a/configure +++ b/configure @@ -7000,9 +7000,7 @@ enabled libwebp && { enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; } enabled libx264 && require_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode && - require_cpp_condition libx264 x264.h "X264_BUILD >= 122" && { - [ "$toolchain" != "msvc" ] || - require_cpp_condition libx264 x264.h "X264_BUILD >= 158"; } && + require_cpp_condition libx264 x264.h "X264_BUILD >= 160" && check_cpp_condition libx264_hdr10 x264.h "X264_BUILD >= 163" && check_cpp_condition libx262 x264.h "X264_MPEG2" enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get && diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index eadb20d2b39..404ad6d9939 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -270,11 +270,9 @@ static void reconfig_encoder(AVCodecContext *ctx, const AVFrame *frame) case AV_STEREO3D_FRAMESEQUENCE: fpa_type = 5; break; -#if X264_BUILD >= 145 case AV_STEREO3D_2D: fpa_type = 6; break; -#endif default: fpa_type = -1; break; @@ -394,14 +392,14 @@ static int setup_mb_info(AVCodecContext *ctx, x264_picture_t *pic, return 0; } -static int setup_roi(AVCodecContext *ctx, x264_picture_t *pic, int bit_depth, +static int setup_roi(AVCodecContext *ctx, x264_picture_t *pic, const AVFrame *frame, const uint8_t *data, size_t size) { X264Context *x4 = ctx->priv_data; int mbx = (frame->width + MB_SIZE - 1) / MB_SIZE; int mby = (frame->height + MB_SIZE - 1) / MB_SIZE; - int qp_range = 51 + 6 * (bit_depth - 8); + int qp_range = 51 + 6 * (x4->params.i_bitdepth - 8); int nb_rois; const AVRegionOfInterest *roi; uint32_t roi_size; @@ -476,7 +474,7 @@ static int setup_frame(AVCodecContext *ctx, const AVFrame *frame, x264_sei_t *sei = &pic->extra_sei; unsigned int sei_data_size = 0; int64_t wallclock = 0; - int bit_depth, ret; + int ret; AVFrameSideData *sd; AVFrameSideData *mbinfo_sd; @@ -486,12 +484,7 @@ static int setup_frame(AVCodecContext *ctx, const AVFrame *frame, x264_picture_init(pic); pic->img.i_csp = x4->params.i_csp; -#if X264_BUILD >= 153 - bit_depth = x4->params.i_bitdepth; -#else - bit_depth = x264_bit_depth; -#endif - if (bit_depth > 8) + if (x4->params.i_bitdepth > 8) pic->img.i_csp |= X264_CSP_HIGH_DEPTH; pic->img.i_plane = av_pix_fmt_count_planes(ctx->pix_fmt); @@ -564,7 +557,7 @@ static int setup_frame(AVCodecContext *ctx, const AVFrame *frame, sd = av_frame_get_side_data(frame, AV_FRAME_DATA_REGIONS_OF_INTEREST); if (sd) { - ret = setup_roi(ctx, pic, bit_depth, frame, sd->data, sd->size); + ret = setup_roi(ctx, pic, frame, sd->data, sd->size); if (ret < 0) goto fail; } @@ -1109,9 +1102,7 @@ static av_cold int X264_init(AVCodecContext *avctx) x4->params.p_log_private = avctx; x4->params.i_log_level = X264_LOG_DEBUG; x4->params.i_csp = convert_pix_fmt(avctx->pix_fmt); -#if X264_BUILD >= 153 x4->params.i_bitdepth = av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth; -#endif PARSE_X264_OPT("weightp", wpredp); @@ -1180,11 +1171,10 @@ static av_cold int X264_init(AVCodecContext *avctx) else if (x4->params.i_level_idc > 0) { int i; int mbn = AV_CEIL_RSHIFT(avctx->width, 4) * AV_CEIL_RSHIFT(avctx->height, 4); - int scale = X264_BUILD < 129 ? 384 : 1; for (i = 0; i<x264_levels[i].level_idc; i++) if (x264_levels[i].level_idc == x4->params.i_level_idc) - x4->params.i_frame_reference = av_clip(x264_levels[i].dpb / mbn / scale, 1, x4->params.i_frame_reference); + x4->params.i_frame_reference = av_clip(x264_levels[i].dpb / mbn, 1, x4->params.i_frame_reference); } if (avctx->trellis >= 0) @@ -1228,12 +1218,7 @@ static av_cold int X264_init(AVCodecContext *avctx) x4->params.b_vfr_input = 0; } if (x4->avcintra_class >= 0) -#if X264_BUILD >= 142 x4->params.i_avcintra_class = x4->avcintra_class; -#else - av_log(avctx, AV_LOG_ERROR, - "x264 too old for AVC Intra, at least version 142 needed\n"); -#endif if (x4->avcintra_class > 200) { #if X264_BUILD < 164 @@ -1395,11 +1380,9 @@ FF_ENABLE_DEPRECATION_WARNINGS } } -#if X264_BUILD >= 142 /* Separate headers not supported in AVC-Intra mode */ if (x4->avcintra_class >= 0) x4->params.b_repeat_headers = 1; -#endif { AVDictionaryEntry *en = NULL; @@ -1513,18 +1496,6 @@ static const enum AVPixelFormat pix_fmts_8bit_rgb[] = { }; #endif -#if X264_BUILD < 153 -static av_cold void X264_init_static(FFCodec *codec) -{ - if (x264_bit_depth == 8) - codec->p.pix_fmts = pix_fmts_8bit; - else if (x264_bit_depth == 9) - codec->p.pix_fmts = pix_fmts_9bit; - else if (x264_bit_depth == 10) - codec->p.pix_fmts = pix_fmts_10bit; -} -#endif - #define OFFSET(x) offsetof(X264Context, x) #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { @@ -1544,9 +1515,7 @@ static const AVOption options[] = { { "none", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = X264_AQ_NONE}, INT_MIN, INT_MAX, VE, .unit = "aq_mode" }, { "variance", "Variance AQ (complexity mask)", 0, AV_OPT_TYPE_CONST, {.i64 = X264_AQ_VARIANCE}, INT_MIN, INT_MAX, VE, .unit = "aq_mode" }, { "autovariance", "Auto-variance AQ", 0, AV_OPT_TYPE_CONST, {.i64 = X264_AQ_AUTOVARIANCE}, INT_MIN, INT_MAX, VE, .unit = "aq_mode" }, -#if X264_BUILD >= 144 { "autovariance-biased", "Auto-variance AQ with bias to dark scenes", 0, AV_OPT_TYPE_CONST, {.i64 = X264_AQ_AUTOVARIANCE_BIASED}, INT_MIN, INT_MAX, VE, .unit = "aq_mode" }, -#endif { "aq-strength", "AQ strength. Reduces blocking and blurring in flat and textured areas.", OFFSET(aq_strength), AV_OPT_TYPE_FLOAT, {.dbl = -1}, -1, FLT_MAX, VE}, { "psy", "Use psychovisual optimizations.", OFFSET(psy), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VE }, { "psy-rd", "Strength of psychovisual optimization, in <psy-rd>:<psy-trellis> format.", OFFSET(psy_rd), AV_OPT_TYPE_STRING, {0 }, 0, 0, VE}, @@ -1644,10 +1613,7 @@ static const AVClass x264_class = { .version = LIBAVUTIL_VERSION_INT, }; -#if X264_BUILD >= 153 -const -#endif -FFCodec ff_libx264_encoder = { +const FFCodec ff_libx264_encoder = { .p.name = "libx264", CODEC_LONG_NAME("libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), .p.type = AVMEDIA_TYPE_VIDEO, @@ -1665,16 +1631,8 @@ FFCodec ff_libx264_encoder = { .flush = X264_flush, .close = X264_close, .defaults = x264_defaults, -#if X264_BUILD < 153 - .init_static_data = X264_init_static, -#else .p.pix_fmts = pix_fmts_all, -#endif - .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS -#if X264_BUILD < 158 - | FF_CODEC_CAP_NOT_INIT_THREADSAFE -#endif - , + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS, }; #endif @@ -1702,11 +1660,7 @@ const FFCodec ff_libx264rgb_encoder = { FF_CODEC_ENCODE_CB(X264_frame), .close = X264_close, .defaults = x264_defaults, - .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS -#if X264_BUILD < 158 - | FF_CODEC_CAP_NOT_INIT_THREADSAFE -#endif - , + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS, }; #endif
From: Niklas Haas <git@haasn.dev> This version is four years old, and present in Debian oldstable, Ubuntu 22.04 and Leap 15.1. Allows cleaning up both the configure check and the file substantially. In particular, this is motivated by the desire to stop relying on init_static_data. --- configure | 4 +-- libavcodec/libx264.c | 64 +++++++------------------------------------- 2 files changed, 10 insertions(+), 58 deletions(-)