/* */
-#if LIBAVCODEC_VERSION_MAJOR < 54
- AVPaletteControl palette;
-#else
-# warning FIXME
-#endif
+ //AVPaletteControl palette;
+#warning FIXME
/* */
bool b_flush;
/* ***** Get configuration of ffmpeg plugin ***** */
p_sys->p_context->workaround_bugs =
var_InheritInteger( p_dec, "avcodec-workaround-bugs" );
-#if LIBAVCODEC_VERSION_MAJOR < 54
- p_sys->p_context->error_recognition =
-#else
p_sys->p_context->err_recognition =
-#endif
var_InheritInteger( p_dec, "avcodec-error-resilience" );
if( var_CreateGetBool( p_dec, "grayscale" ) )
if( var_CreateGetBool( p_dec, "avcodec-dr" ) &&
(p_sys->p_codec->capabilities & CODEC_CAP_DR1) &&
/* No idea why ... but this fixes flickering on some TSCC streams */
- p_sys->i_codec_id != CODEC_ID_TSCC && p_sys->i_codec_id != CODEC_ID_CSCD &&
- p_sys->i_codec_id != CODEC_ID_CINEPAK &&
+ p_sys->i_codec_id != AV_CODEC_ID_TSCC && p_sys->i_codec_id != AV_CODEC_ID_CSCD &&
+ p_sys->i_codec_id != AV_CODEC_ID_CINEPAK &&
!p_sys->p_context->debug_mv )
{
/* Some codecs set pix_fmt only after the 1st frame has been decoded,
char *hw = var_CreateGetString( p_dec, "avcodec-hw" ); /* FIXME */
if( (hw == NULL || strcasecmp( hw, "none" )) &&
- (i_codec_id == CODEC_ID_MPEG1VIDEO || i_codec_id == CODEC_ID_MPEG2VIDEO ||
- i_codec_id == CODEC_ID_MPEG4 ||
- i_codec_id == CODEC_ID_H264 ||
- i_codec_id == CODEC_ID_VC1 || i_codec_id == CODEC_ID_WMV3) )
+ (i_codec_id == AV_CODEC_ID_MPEG1VIDEO || i_codec_id == AV_CODEC_ID_MPEG2VIDEO ||
+ i_codec_id == AV_CODEC_ID_MPEG4 ||
+ i_codec_id == AV_CODEC_ID_H264 ||
+ i_codec_id == AV_CODEC_ID_VC1 || i_codec_id == AV_CODEC_ID_WMV3) )
{
#ifdef HAVE_AVCODEC_MT
if( p_sys->p_context->thread_type & FF_THREAD_FRAME )
p_sys->p_context->thread_type &= ~FF_THREAD_FRAME;
}
if( ( p_sys->p_context->thread_type & FF_THREAD_SLICE ) &&
- ( i_codec_id == CODEC_ID_MPEG1VIDEO || i_codec_id == CODEC_ID_MPEG2VIDEO ) )
+ ( i_codec_id == AV_CODEC_ID_MPEG1VIDEO || i_codec_id == AV_CODEC_ID_MPEG2VIDEO ) )
{
msg_Warn( p_dec, "threaded slice decoding is not compatible with libavcodec-hw, disabled" );
p_sys->p_context->thread_type &= ~FF_THREAD_SLICE;
}
p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma;
-#if LIBAVCODEC_VERSION_MAJOR < 54
/* Setup palette */
- memset( &p_sys->palette, 0, sizeof(p_sys->palette) );
- if( p_dec->fmt_in.video.p_palette )
- {
- p_sys->palette.palette_changed = 1;
-
- for( int i = 0; i < __MIN( AVPALETTE_COUNT, p_dec->fmt_in.video.p_palette->i_entries ); i++ )
- {
- union {
- uint32_t u;
- uint8_t a[4];
- } c;
- c.a[0] = p_dec->fmt_in.video.p_palette->palette[i][0];
- c.a[1] = p_dec->fmt_in.video.p_palette->palette[i][1];
- c.a[2] = p_dec->fmt_in.video.p_palette->palette[i][2];
- c.a[3] = p_dec->fmt_in.video.p_palette->palette[i][3];
-
- p_sys->palette.palette[i] = c.u;
- }
- p_sys->p_context->palctrl = &p_sys->palette;
-
- p_dec->fmt_out.video.p_palette = malloc( sizeof(video_palette_t) );
- if( p_dec->fmt_out.video.p_palette )
- *p_dec->fmt_out.video.p_palette = *p_dec->fmt_in.video.p_palette;
- }
- else if( p_sys->i_codec_id != CODEC_ID_MSVIDEO1 && p_sys->i_codec_id != CODEC_ID_CINEPAK )
- {
- p_sys->p_context->palctrl = &p_sys->palette;
- }
-#else
-# warning FIXME
-#endif
+# warning FIXME: palette
/* ***** init this codec with special data ***** */
ffmpeg_InitCodec( p_dec );
p_pic->b_progressive = !p_sys->p_ff_pic->interlaced_frame;
p_pic->b_top_field_first = p_sys->p_ff_pic->top_field_first;
- p_pic->i_qstride = p_sys->p_ff_pic->qstride;
- int i_mb_h = ( p_pic->format.i_height + 15 ) / 16;
- p_pic->p_q = malloc( p_pic->i_qstride * i_mb_h );
- memcpy( p_pic->p_q, p_sys->p_ff_pic->qscale_table,
- p_pic->i_qstride * i_mb_h );
- switch( p_sys->p_ff_pic->qscale_type )
- {
- case FF_QSCALE_TYPE_MPEG1:
- p_pic->i_qtype = QTYPE_MPEG1;
- break;
- case FF_QSCALE_TYPE_MPEG2:
- p_pic->i_qtype = QTYPE_MPEG2;
- break;
- case FF_QSCALE_TYPE_H264:
- p_pic->i_qtype = QTYPE_H264;
- break;
- }
-
return p_pic;
}
else
if( !i_size ) return;
- if( p_sys->i_codec_id == CODEC_ID_SVQ3 )
+ if( p_sys->i_codec_id == AV_CODEC_ID_SVQ3 )
{
uint8_t *p;
/* */
p_ff_pic->type = FF_BUFFER_TYPE_USER;
-#if LIBAVCODEC_VERSION_MAJOR < 54
- p_ff_pic->age = 256*256*256*64;
-#endif
-
if( vlc_va_Get( p_sys->p_va, p_ff_pic ) )
{
msg_Err( p_dec, "VaGrabSurface failed" );
unsigned i_align;
switch( p_sys->i_codec_id )
{
- case CODEC_ID_SVQ1:
- case CODEC_ID_VP5:
- case CODEC_ID_VP6:
- case CODEC_ID_VP6F:
- case CODEC_ID_VP6A:
+ case AV_CODEC_ID_SVQ1:
+ case AV_CODEC_ID_VP5:
+ case AV_CODEC_ID_VP6:
+ case AV_CODEC_ID_VP6F:
+ case AV_CODEC_ID_VP6A:
i_align = 16;
break;
default:
p_ff_pic->linesize[2] = p_pic->p[2].i_pitch;
p_ff_pic->linesize[3] = 0;
-#if LIBAVCODEC_VERSION_MAJOR < 54
- p_ff_pic->age = 256*256*256*64;
-#endif
-
post_mt( p_sys );
return 0;