* ffmpeg.c: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: ffmpeg.c,v 1.35 2003/05/07 15:44:59 fenrir Exp $
+ * $Id: ffmpeg.c,v 1.36 2003/05/09 23:23:45 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
i_codec = CODEC_ID_SVQ1;
psz_name = "SVQ-1 (Sorenson Video v1)";
break;
+#if LIBAVCODEC_BUILD >= 4666
+ case FOURCC_SVQ3:
+ i_cat = VIDEO_ES;
+ i_codec = CODEC_ID_SVQ3;
+ psz_name = "SVQ-3 (Sorenson Video v3)";
+ break;
+#endif
case FOURCC_DIVX:
case FOURCC_divx:
* ffmpeg_vdec.h: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: ffmpeg.h,v 1.17 2003/04/17 10:58:30 fenrir Exp $
+ * $Id: ffmpeg.h,v 1.18 2003/05/09 23:23:45 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
#define FOURCC_I263 VLC_FOURCC('I','2','6','3')
#define FOURCC_i263 VLC_FOURCC('i','2','6','3')
-/* Sorenson v1 */
+/* Sorenson v1/3 */
#define FOURCC_SVQ1 VLC_FOURCC( 'S', 'V', 'Q', '1' )
+#define FOURCC_SVQ3 VLC_FOURCC( 'S', 'V', 'Q', '3' )
/* mjpeg */
#define FOURCC_MJPG VLC_FOURCC( 'M', 'J', 'P', 'G' )
* video.c: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: video.c,v 1.26 2003/05/07 15:44:59 fenrir Exp $
+ * $Id: video.c,v 1.27 2003/05/09 23:23:45 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
* ffmpeg codec will be open, some memory allocated. But Vout is not yet
* open (done after the first decoded frame)
*****************************************************************************/
+static inline void SetDWBE( void *data, uint32_t dw )
+{
+ uint8_t *p = data;
+
+ p[0] = (dw >> 24 )&0xff;
+ p[1] = (dw >> 16 )&0xff;
+ p[2] = (dw >> 8 )&0xff;
+ p[3] = (dw )&0xff;
+}
+
int E_( InitThread_Video )( vdec_thread_t *p_vdec )
{
int i_tmp;
(void *)&p_vdec->p_format[1],
i_size );
}
+#if LIBAVCODEC_BUILD >= 4666
+ else if( p_vdec->i_codec_id == CODEC_ID_SVQ3 )
+ {
+ p_vdec->p_context->extradata_size = i_size + 28;
+ p_vdec->p_context->extradata = malloc( p_vdec->p_context->extradata_size );
+ memcpy ( &((char*)p_vdec->p_context->extradata)[ 0], "stsd", 4 );
+ SetDWBE( &((char*)p_vdec->p_context->extradata)[ 4], 0 ); /* version and flag */
+ SetDWBE( &((char*)p_vdec->p_context->extradata)[ 8], 0 ); /* entry count */
+ SetDWBE( &((char*)p_vdec->p_context->extradata)[12], 0 ); /* sample soun size FIXME */
+ memcpy ( &((char*)p_vdec->p_context->extradata)[16], "SVQ3", 4 );
+ memset ( &((char*)p_vdec->p_context->extradata)[20], 0, 8 ); /* reserved[6] and ref index(16b) */
+ memcpy ( &((char*)p_vdec->p_context->extradata)[28], &p_vdec->p_format[1], i_size );
+ }
+#endif
else
{
p_vdec->p_context->extradata_size = i_size;