[FFmpeg-devel] [PATCH] EA TGQ video fixes
Vitor Sessak
vitor1001
Fri Apr 17 11:02:41 CEST 2009
Reimar D?ffinger wrote:
> On Thu, Apr 16, 2009 at 07:22:30PM +0200, Reimar D?ffinger wrote:
>> Sorry for the many mails, I tried these patches, this one fixes PPC
>> decoding to match:
>> Index: eatgq.c
>> ===================================================================
>> --- eatgq.c (revision 18539)
>> +++ eatgq.c (working copy)
>> @@ -140,7 +140,7 @@
>> }
>> }
>>
>> -static void tgq_decode_mb(TgqContext *s, int mb_y, int mb_x, const int8_t **bs, const int8_t *buf_end){
>> +static void tgq_decode_mb(TgqContext *s, int mb_y, int mb_x, const uint8_t **bs, const uint8_t *buf_end){
>> int mode;
>> int i;
>> int8_t dc[6];
>> @@ -228,7 +228,7 @@
>>
>> for (y=0; y<(avctx->height+15)/16; y++)
>> for (x=0; x<(avctx->width+15)/16; x++)
>> - tgq_decode_mb(s, y, x, (const int8_t**)&buf, (const int8_t*)buf_end);
>> + tgq_decode_mb(s, y, x, &buf, buf_end);
>>
>> *data_size = sizeof(AVFrame);
>> *(AVFrame*)data = s->frame;
>
> Applied.
>
>> And this one should be correct but makes no difference:
>>
>> --- eatgq.c 2009-04-16 17:20:15.000000000 +0000
>> +++ eatgq.c.bak 2009-04-16 17:19:11.000000000 +0000
>> @@ -42,6 +42,7 @@
>> int width,height;
>> ScanTable scantable;
>> int qtable[64];
>> + DECLARE_ALIGNED_16(DCTELEM, block[6][64]);
>> } TgqContext;
>>
>> static av_cold int tgq_decode_init(AVCodecContext *avctx){
>> @@ -144,7 +145,6 @@
>> int mode;
>> int i;
>> int8_t dc[6];
>> - DCTELEM block[6][64];
>>
>> mode = bytestream_get_byte((const uint8_t**)bs);
>> if (mode>buf_end-*bs) {
>> @@ -156,8 +156,8 @@
>> GetBitContext gb;
>> init_get_bits(&gb, *bs, mode*8);
>> for(i=0; i<6; i++)
>> - tgq_decode_block(s, block[i], &gb);
>> - tgq_idct_put_mb(s, block, mb_x, mb_y);
>> + tgq_decode_block(s, s->block[i], &gb);
>> + tgq_idct_put_mb(s, s->block, mb_x, mb_y);
>> }else{
>> if (mode==3) {
>> memset(dc, (*bs)[0], 4);
>
> Waiting to see what the FATE results look like now before doing anything
> else.
Why keep it working by sheer luck if we can just fix it for good?
-Vitor
More information about the ffmpeg-devel
mailing list