[FFmpeg-devel] [PATCH] Make vp3dsp*.c compilation optional

Panagiotis Issaris takis.issaris
Mon May 14 16:30:25 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aurelien Jacobs wrote:
> On Mon, 14 May 2007 14:27:04 +0200
> Panagiotis Issaris <takis.issaris at uhasselt.be> wrote:
> 
>> Hi,
>>
>> The attached patch tries to make the vp3dsp*.c compilation optional.
>> Again, not meant for direct inclusion, as I am not sure about the
>> correctness... I am a bit confused about Theora decoding:
>>
>> In dsputil_init() it seems ff_vp3_idct_* functions are being used to
>> decode Theora:
>>     3886         }else if(avctx->idct_algo==FF_IDCT_VP3){
>>     3887             c->idct_put= ff_vp3_idct_put_c;
>>     3888             c->idct_add= ff_vp3_idct_add_c;
>>     3889             c->idct    = ff_vp3_idct_c;
>>     3890             c->idct_permutation_type= FF_NO_IDCT_PERM;
>>
>>
>> While in dsputil_init_mmx() it seems they are explicitly avoided for
>> decoding Theora:
>>     3282             }else if(idct_algo==FF_IDCT_VP3 &&
>>     3283                      avctx->codec->id!=CODEC_ID_THEORA &&
>>     3284                      !(avctx->flags & CODEC_FLAG_BITEXACT)){
>>     3285                 if(mm_flags & MM_SSE2){
>>     3286                     c->idct_put= ff_vp3_idct_put_sse2;
>>     3287                     c->idct_add= ff_vp3_idct_add_sse2;
>>     3288                     c->idct    = ff_vp3_idct_sse2;
>>     3289                     c->idct_permutation_type=
>> FF_TRANSPOSE_IDCT_PERM;
>>     3290                 }else{
>>
>> Is something fishy or am I just misinterpreting the code?
> 
> The MMX and SSE2 versions of vp3dsp produce artifacts when decoding
> theora (but they are ok when decoding vp*). They need to be fixed,
> but in the mean time, they are simply disabled for theora.
> So for now, you can consider this is the expected behavior.
> 
>> The attached patch assumes the current code mentioned above is correct.
> 
> Patch mostly ok. See my remark.
> 
>>  OBJS-$(CONFIG_GPL)                     += i386/idct_mmx.o
>>  OBJS-$(CONFIG_CAVS_DECODER)            += i386/cavsdsp_mmx.o
>>  OBJS-$(CONFIG_SNOW_DECODER)            += i386/snowdsp_mmx.o
>> +OBJS-$(CONFIG_VP3_DECODER)             += i386/vp3dsp_mmx.o i386/vp3dsp_sse2.o
>> +OBJS-$(CONFIG_VP5_DECODER)             += i386/vp3dsp_mmx.o i386/vp3dsp_sse2.o
>> +OBJS-$(CONFIG_VP6_DECODER)             += i386/vp3dsp_mmx.o i386/vp3dsp_sse2.o
>> +OBJS-$(CONFIG_THEORA_DECODER)          += i386/vp3dsp_mmx.o i386/vp3dsp_sse2.o
>>  endif
> 
> The MMX and SSE2 versions don't need to be built for theora...
> Except that, patch is ok.

Applied.

With friendly regards,
Takis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGSHKB9kOxLuzz4CkRAoKoAJ4k4xX8A6ro/qKeAB/NcjEMwjZOOQCfV72g
xCPSGyfInVR6RhNdDYJibk8=
=qa3W
-----END PGP SIGNATURE-----




More information about the ffmpeg-devel mailing list