[FFmpeg-devel] [PATCH] Electronic Arts TGQ decoder

Michael Niedermayer michaelni
Sat Sep 27 04:42:57 CEST 2008


On Fri, Sep 26, 2008 at 11:06:52PM -0300, Ramiro Polla wrote:
> On Fri, Sep 26, 2008 at 10:23 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Sat, Sep 27, 2008 at 10:12:34AM +1000, Peter Ross wrote:
> >> Patches enclosed.
> >>
> >> Info: http://wiki.multimedia.cx/index.php?title=Electronic_Arts_TGQ
> >> Samples: http://samples.mplayerhq.hu/game-formats/ea-tgq-uv/
> >
> > [...]
> >> +const uint8_t ea_zigzag_scan[64]={
> >> +   0,  8,  1,  2,  9, 16, 24, 17,
> >> +  10,  3,  4, 11, 18, 25, 32, 40,
> >> +  33, 26, 19, 12,  5,  6, 13, 20,
> >> +  27, 34, 41, 48, 56, 49, 42, 35,
> >> +  28, 21, 14,  7, 15, 22, 29, 36,
> >> +  43, 50, 57, 58, 51, 44, 37, 30,
> >> +  23, 31, 38, 45, 52, 59, 60, 53,
> >> +  46, 39, 47, 54, 61, 62, 55, 63,
> >> +};
> >
> > private non static things should have ff_ prefixes
> 
> This is ff_zigzag_direct transposed. I checked again against mimic's
> zigzag and... huh??? Do you have any idea why mimic would have a
> mostly transposed zigzag except for the last 10 coeffs? It starts
> transposed and the last 10 coeffs are in direct order...
> 
> static const uint8_t col_zag[64] = {
>      0,  8,  1,  2,  9, 16, 24, 17,
>     10,  3,  4, 11, 18, 25, 32, 40,
>     33, 26, 19, 12,  5,  6, 13, 20,
>     27, 34, 41, 48, 56, 49, 42, 35,
>     28, 21, 14,  7, 15, 22, 29, 36,
>     43, 50, 57, 58, 51, 44, 37, 30,
>     23, 31, 38, 45, 52, 59, 39, 46,
>     53, 60, 61, 54, 47, 55, 62, 63,
> };
> 
> I've checked again with the binary decoder, and this is correct. Could
> this be intended, or maybe mimic's developers screwed up somewhere and
> never noticed since most of the time the number of coeffs is hardcoded
> to 28?

My guess is on screw up.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080927/01d5b2f5/attachment.pgp>



More information about the ffmpeg-devel mailing list