diff mbox series

[FFmpeg-devel] avcodec/libx265: fix build error

Message ID tencent_317F3EBF56E79D8EE1085AB434C381CE3509@qq.com
State Accepted
Commit 36a8d1e729dcad6877791e1aa35c6deeab538555
Headers show
Series [FFmpeg-devel] avcodec/libx265: fix build error | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished

Commit Message

Zhao Zhili Nov. 3, 2022, 2:20 p.m. UTC
From: Zhao Zhili <zhilizhao@tencent.com>

x265_sei is available since X265_BUILD 88. Bump required version
to 89 to fix the regression from commit 1f585030137, and remove a
conditional compilation.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
---
 configure            | 2 +-
 libavcodec/libx265.c | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

Comments

Zhao Zhili Nov. 18, 2022, 7:45 a.m. UTC | #1
> On Nov 3, 2022, at 22:20, Zhao Zhili <quinkblack@foxmail.com> wrote:
> 
> From: Zhao Zhili <zhilizhao@tencent.com>
> 
> x265_sei is available since X265_BUILD 88. Bump required version
> to 89 to fix the regression from commit 1f585030137, and remove a
> conditional compilation.
> 
> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
> ---
> configure            | 2 +-
> libavcodec/libx265.c | 2 --
> 2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/configure b/configure
> index 2bcdf18a57..09d51002e3 100755
> --- a/configure
> +++ b/configure
> @@ -6736,7 +6736,7 @@ enabled libx264           && require_pkg_config libx264 x264 "stdint.h x264.h" x
>                              require_cpp_condition libx264 x264.h "X264_BUILD >= 158"; } &&
>                              check_cpp_condition libx262 x264.h "X264_MPEG2"
> enabled libx265           && require_pkg_config libx265 x265 x265.h x265_api_get &&
> -                             require_cpp_condition libx265 x265.h "X265_BUILD >= 70"
> +                             require_cpp_condition libx265 x265.h "X265_BUILD >= 89"
> enabled libxavs           && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
> enabled libxavs2          && require_pkg_config libxavs2 "xavs2 >= 1.3.0" "stdint.h xavs2.h" xavs2_api_get
> enabled libxvid           && require libxvid xvid.h xvid_global -lxvidcore
> diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
> index 4aa96e1f2d..555b5e26d8 100644
> --- a/libavcodec/libx265.c
> +++ b/libavcodec/libx265.c
> @@ -293,7 +293,6 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
>             return ret;
>     }
> 
> -#if X265_BUILD >= 89
>     if (avctx->qmin >= 0) {
>         ret = libx265_param_parse_int(avctx, "qpmin", avctx->qmin);
>         if (ret < 0)
> @@ -304,7 +303,6 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
>         if (ret < 0)
>             return ret;
>     }
> -#endif
>     if (avctx->max_qdiff >= 0) {
>         ret = libx265_param_parse_int(avctx, "qpstep", avctx->max_qdiff);
>         if (ret < 0)
> -- 
> 2.34.1
> 

Applied as 36a8d1e729dcad6877791e1aa35c6deeab538555.
diff mbox series

Patch

diff --git a/configure b/configure
index 2bcdf18a57..09d51002e3 100755
--- a/configure
+++ b/configure
@@ -6736,7 +6736,7 @@  enabled libx264           && require_pkg_config libx264 x264 "stdint.h x264.h" x
                              require_cpp_condition libx264 x264.h "X264_BUILD >= 158"; } &&
                              check_cpp_condition libx262 x264.h "X264_MPEG2"
 enabled libx265           && require_pkg_config libx265 x265 x265.h x265_api_get &&
-                             require_cpp_condition libx265 x265.h "X265_BUILD >= 70"
+                             require_cpp_condition libx265 x265.h "X265_BUILD >= 89"
 enabled libxavs           && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
 enabled libxavs2          && require_pkg_config libxavs2 "xavs2 >= 1.3.0" "stdint.h xavs2.h" xavs2_api_get
 enabled libxvid           && require libxvid xvid.h xvid_global -lxvidcore
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 4aa96e1f2d..555b5e26d8 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -293,7 +293,6 @@  static av_cold int libx265_encode_init(AVCodecContext *avctx)
             return ret;
     }
 
-#if X265_BUILD >= 89
     if (avctx->qmin >= 0) {
         ret = libx265_param_parse_int(avctx, "qpmin", avctx->qmin);
         if (ret < 0)
@@ -304,7 +303,6 @@  static av_cold int libx265_encode_init(AVCodecContext *avctx)
         if (ret < 0)
             return ret;
     }
-#endif
     if (avctx->max_qdiff >= 0) {
         ret = libx265_param_parse_int(avctx, "qpstep", avctx->max_qdiff);
         if (ret < 0)