[FFmpeg-cvslog] r19172 - in trunk: libavcodec/raw.c libavcodec/rawdec.c libavformat/riff.c

darkshikari subversion
Fri Jun 12 19:39:56 CEST 2009


Author: darkshikari
Date: Fri Jun 12 19:39:56 2009
New Revision: 19172

Log:
Add new FOURCC (0x0003) for raw DIB video (RGB565) and set flip flag accordingly.  Fixes a few AVI files from what is probably a mobile phone video camera.

Modified:
   trunk/libavcodec/raw.c
   trunk/libavcodec/rawdec.c
   trunk/libavformat/riff.c

Modified: trunk/libavcodec/raw.c
==============================================================================
--- trunk/libavcodec/raw.c	Fri Jun 12 18:00:26 2009	(r19171)
+++ trunk/libavcodec/raw.c	Fri Jun 12 19:39:56 2009	(r19172)
@@ -48,6 +48,7 @@ const PixelFormatTag ff_raw_pixelFormatT
     { PIX_FMT_BGR555,  MKTAG('B', 'G', 'R', 15) },
     { PIX_FMT_RGB565,  MKTAG('R', 'G', 'B', 16) },
     { PIX_FMT_BGR565,  MKTAG('B', 'G', 'R', 16) },
+    { PIX_FMT_RGB565,  MKTAG( 3 ,  0 ,  0 ,  0 ) },
 
     /* quicktime */
     { PIX_FMT_UYVY422, MKTAG('2', 'v', 'u', 'y') },

Modified: trunk/libavcodec/rawdec.c
==============================================================================
--- trunk/libavcodec/rawdec.c	Fri Jun 12 18:00:26 2009	(r19171)
+++ trunk/libavcodec/rawdec.c	Fri Jun 12 19:39:56 2009	(r19172)
@@ -87,7 +87,8 @@ static av_cold int raw_init_decoder(AVCo
     if (!context->buffer)
         return -1;
 
-    if(avctx->extradata_size >= 9 && !memcmp(avctx->extradata + avctx->extradata_size - 9, "BottomUp", 9))
+    if((avctx->extradata_size >= 9 && !memcmp(avctx->extradata + avctx->extradata_size - 9, "BottomUp", 9)) ||
+       avctx->codec_tag == MKTAG( 3 ,  0 ,  0 ,  0 ))
         context->flip=1;
 
     return 0;

Modified: trunk/libavformat/riff.c
==============================================================================
--- trunk/libavformat/riff.c	Fri Jun 12 18:00:26 2009	(r19171)
+++ trunk/libavformat/riff.c	Fri Jun 12 19:39:56 2009	(r19172)
@@ -133,6 +133,7 @@ const AVCodecTag codec_bmp_tags[] = {
     { CODEC_ID_FFVHUFF,      MKTAG('F', 'F', 'V', 'H') },
     { CODEC_ID_CYUV,         MKTAG('C', 'Y', 'U', 'V') },
     { CODEC_ID_RAWVIDEO,     MKTAG( 0 ,  0 ,  0 ,  0 ) },
+    { CODEC_ID_RAWVIDEO,     MKTAG( 3 ,  0 ,  0 ,  0 ) },
     { CODEC_ID_RAWVIDEO,     MKTAG('I', '4', '2', '0') },
     { CODEC_ID_RAWVIDEO,     MKTAG('Y', 'U', 'Y', '2') },
     { CODEC_ID_RAWVIDEO,     MKTAG('Y', '4', '2', '2') },



More information about the ffmpeg-cvslog mailing list