Commit bc398338 authored by Laurent Aimar's avatar Laurent Aimar

* faad : adapt to newer version.

 * ffmpeg : adapt postprocessing for latest libavcodec version, add an
option to disable direct rendering as postprocessing is currently broken
with it, and with some files I have bad pictures.
parent ce9fc041
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* decoder.c: AAC decoder using libfaad2 * decoder.c: AAC decoder using libfaad2
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: decoder.c,v 1.10 2002/10/27 18:06:33 fenrir Exp $ * $Id: decoder.c,v 1.11 2002/11/10 02:47:27 fenrir Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -252,6 +252,7 @@ static int InitThread( adec_thread_t * p_adec ) ...@@ -252,6 +252,7 @@ static int InitThread( adec_thread_t * p_adec )
i_status = faacDecInit( p_adec->p_handle, i_status = faacDecInit( p_adec->p_handle,
p_adec->p_buffer, p_adec->p_buffer,
i_frame_size,
&i_rate, &i_rate,
&i_channels ); &i_channels );
} }
...@@ -343,7 +344,8 @@ static void DecodeThread( adec_thread_t *p_adec ) ...@@ -343,7 +344,8 @@ static void DecodeThread( adec_thread_t *p_adec )
/* **** decode this frame **** */ /* **** decode this frame **** */
p_faad_buffer = faacDecDecode( p_adec->p_handle, p_faad_buffer = faacDecDecode( p_adec->p_handle,
&faad_frame, &faad_frame,
p_adec->p_buffer ); p_adec->p_buffer,
i_frame_size );
/* **** some sanity checks to see if we have samples to out **** */ /* **** some sanity checks to see if we have samples to out **** */
if( faad_frame.error > 0 ) if( faad_frame.error > 0 )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ffmpeg.c: video decoder using ffmpeg library * ffmpeg.c: video decoder using ffmpeg library
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: ffmpeg.c,v 1.14 2002/11/05 10:07:56 gbazin Exp $ * $Id: ffmpeg.c,v 1.15 2002/11/10 02:47:27 fenrir Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -97,6 +97,11 @@ static int ffmpeg_GetFfmpegCodec( vlc_fourcc_t, int *, int *, char ** ); ...@@ -97,6 +97,11 @@ static int ffmpeg_GetFfmpegCodec( vlc_fourcc_t, int *, int *, char ** );
vlc_module_begin(); vlc_module_begin();
add_category_hint( N_("Ffmpeg"), NULL ); add_category_hint( N_("Ffmpeg"), NULL );
#if LIBAVCODEC_BUILD >= 4615
add_bool( "ffmpeg-dr", 1, NULL,
"direct rendering",
"direct rendering" );
#endif
#if LIBAVCODEC_BUILD >= 4611 #if LIBAVCODEC_BUILD >= 4611
add_integer ( "ffmpeg-error-resilience", -1, NULL, add_integer ( "ffmpeg-error-resilience", -1, NULL,
"error resilience", ERROR_RESILIENCE_LONGTEXT ); "error resilience", ERROR_RESILIENCE_LONGTEXT );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* postprocessing.h * postprocessing.h
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: postprocessing.h,v 1.1 2002/08/04 22:13:06 fenrir Exp $ * $Id: postprocessing.h,v 1.2 2002/11/10 02:47:27 fenrir Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#define QT_STORE_T int #define QT_STORE_T int8_t
/* postprocessing available using to create i_mode */ /* postprocessing available using to create i_mode */
#define PP_DEBLOCK_Y_H 0x00000001 #define PP_DEBLOCK_Y_H 0x00000001
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* video.c: video decoder using ffmpeg library * video.c: video decoder using ffmpeg library
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: video.c,v 1.3 2002/11/06 21:48:24 gbazin Exp $ * $Id: video.c,v 1.4 2002/11/10 02:47:27 fenrir Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -354,7 +354,8 @@ int E_( InitThread_Video )( vdec_thread_t *p_vdec ) ...@@ -354,7 +354,8 @@ int E_( InitThread_Video )( vdec_thread_t *p_vdec )
p_vdec->b_direct_rendering = 0; p_vdec->b_direct_rendering = 0;
#if LIBAVCODEC_BUILD > 4615 #if LIBAVCODEC_BUILD > 4615
if( (p_vdec->p_codec->capabilities & CODEC_CAP_DR1) if( (p_vdec->p_codec->capabilities & CODEC_CAP_DR1)
&& (p_vdec->p_context->pix_fmt != PIX_FMT_YUV410P) ) && (p_vdec->p_context->pix_fmt != PIX_FMT_YUV410P) &&
config_GetInt( p_vdec->p_fifo, "ffmpeg-dr" ) )
{ {
msg_Dbg( p_vdec->p_fifo, "using direct rendering" ); msg_Dbg( p_vdec->p_fifo, "using direct rendering" );
p_vdec->b_direct_rendering = 1; p_vdec->b_direct_rendering = 1;
...@@ -448,7 +449,7 @@ int E_( InitThread_Video )( vdec_thread_t *p_vdec ) ...@@ -448,7 +449,7 @@ int E_( InitThread_Video )( vdec_thread_t *p_vdec )
case( CODEC_ID_H263I ): case( CODEC_ID_H263I ):
/* Ok we can make postprocessing :)) */ /* Ok we can make postprocessing :)) */
/* first try to get a postprocess module */ /* first try to get a postprocess module */
#if LIBAVCODEC_BUILD > 4613 #if LIBAVCODEC_BUILD >= 4633
p_vdec->p_pp = vlc_object_create( p_vdec->p_fifo, p_vdec->p_pp = vlc_object_create( p_vdec->p_fifo,
sizeof( postprocessing_t ) ); sizeof( postprocessing_t ) );
p_vdec->p_pp->psz_object_name = "postprocessing"; p_vdec->p_pp->psz_object_name = "postprocessing";
...@@ -473,9 +474,9 @@ int E_( InitThread_Video )( vdec_thread_t *p_vdec ) ...@@ -473,9 +474,9 @@ int E_( InitThread_Video )( vdec_thread_t *p_vdec )
); );
/* allocate table for postprocess */ /* allocate table for postprocess */
p_vdec->p_context->quant_store = // p_vdec->p_context->quant_store =
malloc( sizeof( int ) * ( MBR + 1 ) * ( MBC + 1 ) ); // malloc( sizeof( int ) * ( MBR + 1 ) * ( MBC + 1 ) );
p_vdec->p_context->qstride = MBC + 1; // p_vdec->p_context->qstride = MBC + 1;
} }
#else #else
p_vdec->i_pp_mode = 0; p_vdec->i_pp_mode = 0;
...@@ -756,7 +757,8 @@ static void ffmpeg_PostProcPicture( vdec_thread_t *p_vdec, picture_t *p_pic ) ...@@ -756,7 +757,8 @@ static void ffmpeg_PostProcPicture( vdec_thread_t *p_vdec, picture_t *p_pic )
{ {
/* Make postproc */ /* Make postproc */
p_vdec->p_pp->pf_postprocess( p_pic, p_vdec->p_pp->pf_postprocess( p_pic,
p_vdec->p_context->quant_store, p_vdec->p_context->display_qscale_table,
// p_vdec->p_context->current_qscale_table,
p_vdec->p_context->qstride, p_vdec->p_context->qstride,
p_vdec->i_pp_mode ); p_vdec->i_pp_mode );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment