Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avcodec/libx265: fix build error
Date: Thu, 3 Nov 2022 09:32:16 -0300
Message-ID: <b021599c-8d3a-d3a9-c547-f7261009758a@gmail.com> (raw)
In-Reply-To: <tencent_BB9E34F7803E343B3F9156779D74E0605B09@qq.com>

On 11/3/2022 8:11 AM, Zhao Zhili wrote:
> From: Zhao Zhili <zhilizhao@tencent.com>
> 
> x265_sei is available since X265_BUILD 88. This fixes a regression
> from commit 1f585030137.

How old are we talking about? Latest release is > 200, so 88 seems 
pretty old.
I'd just bump the minimum required version in configure. It's 70 right 
now, which is equally ancient.

> 
> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
> ---
>   libavcodec/libx265.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
> index 4aa96e1f2d..e36f20a812 100644
> --- a/libavcodec/libx265.c
> +++ b/libavcodec/libx265.c
> @@ -516,8 +516,10 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
>       ctx->api->picture_init(ctx->params, &x265pic);
>   
>       if (pic) {
> +#if X265_BUILD >= 88
>           x265_sei *sei = &x265pic.userSEI;
>           sei->numPayloads = 0;
> +#endif
>           for (i = 0; i < 3; i++) {
>              x265pic.planes[i] = pic->data[i];
>              x265pic.stride[i] = pic->linesize[i];
> @@ -546,6 +548,7 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
>               memcpy(x265pic.userData, &pic->reordered_opaque, sizeof(pic->reordered_opaque));
>           }
>   
> +#if X265_BUILD >= 88
>           if (ctx->udu_sei) {
>               for (i = 0; i < pic->nb_side_data; i++) {
>                   AVFrameSideData *side_data = pic->side_data[i];
> @@ -573,6 +576,7 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
>                   sei->numPayloads++;
>               }
>           }
> +#endif
>       }
>   
>       ret = ctx->api->encoder_encode(ctx->encoder, &nal, &nnal,
> @@ -713,7 +717,9 @@ static const AVOption options[] = {
>       { "preset",      "set the x265 preset",                                                         OFFSET(preset),    AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE },
>       { "tune",        "set the x265 tune parameter",                                                 OFFSET(tune),      AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE },
>       { "profile",     "set the x265 profile",                                                        OFFSET(profile),   AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE },
> +#if X265_BUILD >= 88
>       { "udu_sei",      "Use user data unregistered SEI if available",                                OFFSET(udu_sei),   AV_OPT_TYPE_BOOL,   { .i64 = 0 }, 0, 1, VE },
> +#endif
>       { "x265-params", "set the x265 configuration using a :-separated list of key=value parameters", OFFSET(x265_opts), AV_OPT_TYPE_DICT,   { 0 }, 0, 0, VE },
>       { NULL }
>   };
_______________________________________________
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".

  reply	other threads:[~2022-11-03 12:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 11:11 Zhao Zhili
2022-11-03 12:32 ` James Almer [this message]
2022-11-03 14:20   ` Zhao Zhili
2022-11-18  7:45     ` "zhilizhao(赵志立)"

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b021599c-8d3a-d3a9-c547-f7261009758a@gmail.com \
    --to=jamrial@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git