[FFmpeg-cvslog] Allow decoding of uyvy422 CYUV with -vcodec rawvideo.
Carl Eugen Hoyos
git at videolan.org
Fri Jan 6 01:05:46 CET 2012
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Fri Jan 6 00:59:08 2012 +0100| [09f25a9cb08ddf39dcb16898c36ed793006093fd] | committer: Carl Eugen Hoyos
Allow decoding of uyvy422 CYUV with -vcodec rawvideo.
FourCC CYUV can be Creative YUV and uyvy422 rawvideo.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=09f25a9cb08ddf39dcb16898c36ed793006093fd
---
libavcodec/raw.c | 1 +
libavcodec/rawdec.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavcodec/raw.c b/libavcodec/raw.c
index 42469fd..cfa650e 100644
--- a/libavcodec/raw.c
+++ b/libavcodec/raw.c
@@ -63,6 +63,7 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = {
{ PIX_FMT_UYVY422, MKTAG('A', 'V', 'u', 'p') },
{ PIX_FMT_UYVY422, MKTAG('V', 'D', 'T', 'Z') }, /* SoftLab-NSK VideoTizer */
{ PIX_FMT_UYVY422, MKTAG('a', 'u', 'v', '2') },
+ { PIX_FMT_UYVY422, MKTAG('c', 'y', 'u', 'v') }, /* CYUV is also Creative YUV */
{ PIX_FMT_UYYVYY411, MKTAG('Y', '4', '1', '1') },
{ PIX_FMT_GRAY8, MKTAG('G', 'R', 'E', 'Y') },
{ PIX_FMT_NV12, MKTAG('N', 'V', '1', '2') },
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index acaa0ea..e48e385 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -119,6 +119,7 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
avctx->coded_frame= &context->pic;
if((avctx->extradata_size >= 9 && !memcmp(avctx->extradata + avctx->extradata_size - 9, "BottomUp", 9)) ||
+ avctx->codec_tag == MKTAG('c','y','u','v') ||
avctx->codec_tag == MKTAG(3, 0, 0, 0) || avctx->codec_tag == MKTAG('W','R','A','W'))
context->flip=1;
More information about the ffmpeg-cvslog
mailing list