[FFmpeg-devel] [PATCH]lavc/x264:Refuse RGB24 as input pix_fmt
Michael Niedermayer
michaelni at gmx.at
Tue Jun 9 12:35:01 CEST 2015
On Tue, Jun 09, 2015 at 08:45:00AM +0200, Carl Eugen Hoyos wrote:
> Hi!
>
> Attached patch works around ticket #4287 here.
>
> Please comment, Carl Eugen
> libx264.c | 1 -
> 1 file changed, 1 deletion(-)
> 8dba04c188ee8737c913c8161587c454f008e8da patchx264rgb.diff
> diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
> index 9020a40..5736c6c 100644
> --- a/libavcodec/libx264.c
> +++ b/libavcodec/libx264.c
> @@ -755,7 +755,6 @@ static const enum AVPixelFormat pix_fmts_8bit_rgb[] = {
> #ifdef X264_CSP_BGR
> AV_PIX_FMT_BGR0,
> AV_PIX_FMT_BGR24,
> - AV_PIX_FMT_RGB24,
> #endif
this does not workaround it
the following uses BGR24 but still shows the issue with git master
that is without the patch above and the same testcase
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 9020a40..85f8b54 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -350,10 +350,10 @@ static int convert_pix_fmt(enum AVPixelFormat pix_fmt)
case AV_PIX_FMT_BGR0:
return X264_CSP_BGRA;
case AV_PIX_FMT_BGR24:
- return X264_CSP_BGR;
+ return X264_CSP_RGB;
case AV_PIX_FMT_RGB24:
- return X264_CSP_RGB;
+ return X264_CSP_BGR;
#endif
case AV_PIX_FMT_NV12: return X264_CSP_NV12;
case AV_PIX_FMT_NV16:
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150609/b4bfeaba/attachment.asc>
More information about the ffmpeg-devel
mailing list