[FFmpeg-devel] [PATCH 1/2] avcodec/libx264: Add support for Sony XAVC Class 300 and 480

Michael Niedermayer michael at niedermayer.cc
Mon Jun 21 18:07:48 EEST 2021


On Sun, Jun 20, 2021 at 09:42:38AM +0800, lance.lmwang at gmail.com wrote:
> From: Limin Wang <lance.lmwang at gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
>  libavcodec/libx264.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
> index 36fdb56..89f5c7b 100644
> --- a/libavcodec/libx264.c
> +++ b/libavcodec/libx264.c
> @@ -749,6 +749,17 @@ static av_cold int X264_init(AVCodecContext *avctx)
>          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
> +        av_log(avctx, AV_LOG_ERROR,
> +                "x264 too old for AVC Intra 300/480, at least version 164 needed\n");
> +        return AVERROR(EINVAL);
> +#endif

> +        /* AVC-Intra 300/480 only supported by Sony XAVC flavor */
> +        x4->params.i_avcintra_flavor = X264_AVCINTRA_FLAVOR_SONY;
> +    }

this needs a #else or something

libavcodec/libx264.c: In function ‘X264_init’:
libavcodec/libx264.c:760:20: error: ‘x264_param_t {aka struct x264_param_t}’ has no member named ‘i_avcintra_flavor’; did you mean ‘i_avcintra_class’?
         x4->params.i_avcintra_flavor = X264_AVCINTRA_FLAVOR_SONY;
                    ^~~~~~~~~~~~~~~~~
                    i_avcintra_class
libavcodec/libx264.c:760:40: error: ‘X264_AVCINTRA_FLAVOR_SONY’ undeclared (first use in this function)
         x4->params.i_avcintra_flavor = X264_AVCINTRA_FLAVOR_SONY;
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/libx264.c:760:40: note: each undeclared identifier is reported only once for each function it appears in
ffbuild/common.mak:67: recipe for target 'libavcodec/libx264.o' failed
make: *** [libavcodec/libx264.o] Error 1


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"I am not trying to be anyone's saviour, I'm trying to think about the
 future and not be sad" - Elon Musk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210621/6d1287d3/attachment.sig>


More information about the ffmpeg-devel mailing list