[FFmpeg-devel] Add support for AVI YV24 (RAW) FourCC
Carl Eugen Hoyos
cehoyos at ag.or.at
Fri Jul 1 02:19:21 CEST 2011
On Saturday 25 June 2011 11:32:14 pm ami_stuff wrote:
> The attached patch adds support for YV24 FourCC. The background in the
> video must the blue, so it seems there is a need to swap UV.
>
> Fixes ticket #306.
Updated patch attached.
Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/raw.c b/libavcodec/raw.c
index d686718..e87a9af 100644
--- a/libavcodec/raw.c
+++ b/libavcodec/raw.c
@@ -137,6 +137,7 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = {
/* special */
{ PIX_FMT_RGB565LE,MKTAG( 3 , 0 , 0 , 0 ) }, /* flipped RGB565LE */
+ { PIX_FMT_YUV444P, MKTAG('Y', 'V', '2', '4') }, /* YUV444P, swapped UV */
{ PIX_FMT_NONE, 0 },
};
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 6644d6c..474026c 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -206,6 +206,7 @@ static int raw_decode(AVCodecContext *avctx,
if ( avctx->codec_tag == MKTAG('Y', 'V', '1', '2')
|| avctx->codec_tag == MKTAG('Y', 'V', '1', '6')
+ || avctx->codec_tag == MKTAG('Y', 'V', '2', '4')
|| avctx->codec_tag == MKTAG('Y', 'V', 'U', '9'))
FFSWAP(uint8_t *, picture->data[1], picture->data[2]);
diff --git a/libavformat/riff.c b/libavformat/riff.c
index acac938..ee778f4 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -172,6 +172,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
{ CODEC_ID_RAWVIDEO, MKTAG('P', '4', '2', '2') },
{ CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '2') },
{ CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '6') },
+ { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '2', '4') },
{ CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'V', 'Y') },
{ CODEC_ID_RAWVIDEO, MKTAG('V', 'Y', 'U', 'Y') },
{ CODEC_ID_RAWVIDEO, MKTAG('I', 'Y', 'U', 'V') },
More information about the ffmpeg-devel
mailing list