[MPlayer-dev-eng] realaudio...

Felix Buenemann atmosfear at users.sourceforge.net
Mon Jun 10 05:23:19 CEST 2002


On Monday 10 June 2002 04:07, Arpi wrote:
> > so, they split the 600 byte packet to 10 small packets, 60 byte long
> > each, and mix their order... we have to find the mixing algorithm...
>
> ok, i go more...
> they use 100 small packets, so 10 big packets, each of 10*60 bytes.
> this matri xis repeated over the whole file.
> let's see:  (crc16 values for each 60byte subpacket, 1 line / 1 big packet)
>
> file order:
>
> #CRC[  0] 8564 4400 77DC C978 6D58 F156 F624 365F 5B6C 5699
> #CRC[  1] EDEB 3AB1 5851 0477 C182 DF02 5350 39C8 3877 142B
> #CRC[  2] 1018 049A 759E 50C0 978E A960 B034 D193 2419 938E
> #CRC[  3] 84E3 D69B 3D6A 3867 AA92 8360 BD07 A9FF DED8 E8B3
> #CRC[  4] AF22 ABE3 9CB8 0BD0 DC98 06B7 8FB7 7DFB 74B5 2DBE
> #CRC[  5] 726C BC15 3E88 B6D0 ED16 C2CD 94A6 4680 F82D C24C
> #CRC[  6] 43EA BD91 6A3A 9EA5 F885 792C C649 E308 2654 4776
> #CRC[  7] C956 9829 C23D 631F 6E6E F151 8AE5 A53A CBBB 4047
> #CRC[  8] F381 A678 CED0 909A 01EA E1F6 EB93 B8B5 574F EE45
> #CRC[  9] DC0D 12C9 4F43 F5D9 4B3F 4E9E 95E0 5C27 61B3 3BDD
>
> codec order:
>
> #CRC[  0] 8564 1018 AF22 43EA F381 EDEB 84E3 726C C956 DC0D
> #CRC[  1] 4400 049A ABE3 BD91 A678 3AB1 D69B BC15 9829 12C9
> #CRC[  2] 77DC 759E 9CB8 6A3A CED0 5851 3D6A 3E88 C23D 4F43
> #CRC[  3] C978 50C0 0BD0 9EA5 909A 0477 3867 B6D0 631F F5D9
> #CRC[  4] 6D58 978E DC98 F885 01EA C182 AA92 ED16 6E6E 4B3F
> #CRC[  5] F156 A960 06B7 792C E1F6 DF02 8360 C2CD F151 4E9E
> #CRC[  6] F624 B034 8FB7 C649 EB93 5350 BD07 94A6 8AE5 95E0
> #CRC[  7] 365F D193 7DFB E308 B8B5 39C8 A9FF 4680 A53A 5C27
> #CRC[  8] 5B6C 2419 74B5 2654 574F 3877 DED8 F82D CBBB 61B3
> #CRC[  9] 5699 938E 2DBE 4776 EE45 142B E8B3 C24C 4047 3BDD
>
> as you can see, the top left, and bottom right values are equal,
> others mixed up...  anyone has idea about the mixing algo?
> (creating a table from this is not a solution, as the
> width/height of the matrix change per file)

In order to understand the reordering I visualized it, and now it's pretty 
clear: http://mplayerhq.hu/~atmos4/realscramblermatrix.png

Here's how I think it works:

All rows are rotated 90° clockwise, so they become colons. Now those colons 
are interlaced like this (col0 is row0 after rotation):
col0 col2 col4 col6 col8  col1 col3 col5 col7 col9

So all the algorithm does is rotate rows 90 degree clockwise and then sort 
even rows at the beginning, from smallest to highest index and then append 
uneven rows sorted from smallest to highest index.

Thanks to gvim + gimp which helped me visualize this quickly and understand :)

I'll even try some C implementation (old is scrambled, new is descrambled):
(This might not work 100% as I'm very tired.)

ms=MATRIXSIZE/2;

for(x=y=0; x < MATRIXSIZE; x+=2,y+=2) {
  new[y][x]=old[x][y];
  new[y+1][x+1]=old[x+1+ms][y+1+ms];
}

Well I guess you get the idea! Happy hacking!

-- 
Best Regards,
        Atmos
____________________________________________
- MPlayer Developer - http://mplayerhq.hu/ -
____________________________________________



More information about the MPlayer-dev-eng mailing list