On Thu, Oct 1, 2015 at 2:05 PM, Luca Barbato <[email protected]> wrote: > From: Yu Xiaolei <[email protected]> > > x264 build 147 adds the native support for NV21. > > Useful to avoid additional pixel format conversion when encoding > from a wide range of capture devices, Android among those. > > Signed-off-by: Luca Barbato <[email protected]> > --- > libavcodec/libx264.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c > index befc47d..1a22fa3 100644 > --- a/libavcodec/libx264.c > +++ b/libavcodec/libx264.c > @@ -323,6 +323,9 @@ static int convert_pix_fmt(enum AVPixelFormat pix_fmt) > case AV_PIX_FMT_NV12: return X264_CSP_NV12; > case AV_PIX_FMT_NV16: > case AV_PIX_FMT_NV20: return X264_CSP_NV16; > +#ifdef X264_CSP_NV21 > + case AV_PIX_FMT_NV21: return X264_CSP_NV21; > +#endif > }; > return 0; > } > @@ -607,6 +610,9 @@ static const enum AVPixelFormat pix_fmts_8bit[] = { > AV_PIX_FMT_YUVJ444P, > AV_PIX_FMT_NV12, > AV_PIX_FMT_NV16, > +#ifdef X264_CSP_NV21 > + AV_PIX_FMT_NV21, > +#endif > AV_PIX_FMT_NONE > }; > static const enum AVPixelFormat pix_fmts_9bit[] = { > --
sure -- Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
