Log in

View Full Version : matrices of a vob


loki03
1st November 2003, 15:39
hy, i got a movie (cavemans valentine) that has an extremely good picture quality (sharpnes, detail) but is only about 5,5 gb. i´d like to try to reencode this one by using its quant matrix but i got no idea how to extract it from the original video.. is the matrix readable using a hex editor? i read that stand-alone player use their own decode-matrix if none is included in the vob- do software-dvd-player use the included matrices? would possibly be interessting to use i.e. power-dvd´s standard matrix for encoding! thank you!

loki03
1st November 2003, 18:06
got a little help from koepi and syskin, thanx! what they say:


demux the mpeg2stream.take the first vol header and find the 2*64bytes containing the quant matrices.in mpeg4 its zigzag order and value 0 means "all other values equal to the last one".The only difficulty would be that values don't start byte-aligned, so you have to decode entire VOL header to find out where the matrix begins.
zigzag order is a commonly used order of writing dct data- you can find it in jpeg, mpeg etc. papers
as for byte-aligned, the values are all 8-bit but can start afet a number of bits which is not
a multiplicity of8
so you wont see them in hex editor.


in a hex editor if found the cce standard non-intra-matrix from adress c-7b, the fox-matrix from 4c-8b. they are repeated some more times in the mpv. but i cant find the intra-matrix..

loki03
1st November 2003, 19:05
this seem to be the "cavemans-valentine" matrices. taken from the vob. decimal values. order like in the file. (zigzag it into a matrix before use). is this trash, or really the matrices??

82d-86c (decimal values)


16 16 16 18 16 18 22 22 22 22 22 22 26 24
26 26 26 26 26 26 26 26 26 26 26 28 28 28
34 34 34 26 26 26 24 24 26 26 32 32 34 34
36 32 36 34 34 34 34 38 38 40 40 40 48 48
46 56 56 58 68 68 83


86d-8ac

08 08 08 08 08 08 09 09 09 09 09 09 09 09 09 09 09 09 09 09
09 09 09 09 09 09 09 09 10 10 10 10 10 10 10 10 10 10 10 10 10 10
10 10 10 10 10 10 10 10 10 10 10 10
11 11 11 11 11 11 11 11 11 11

Tsui
1st November 2003, 20:14
Demux the MPEG-Stream and use 'ReStream' :
http://shh.dvdboard.de/

loki03
1st November 2003, 20:48
thanks!!

loki03
1st November 2003, 20:54
here come the caveman-matrices as restream saved them (why are the internal-values half the ones i read out??)-suprise, its the fox-matrices...

intra
8, 8, 9,11,13,13,14,17,
8, 8,11,12,13,14,17,18,
9,11,13,13,14,17,17,16,
11,11,13,13,13,17,18,20,
11,13,13,13,16,17,20,24,
13,13,13,16,17,20,24,29,
13,12,13,17,19,23,28,34,
12,13,17,19,23,28,34,41




non intra
8, 8, 8, 9, 9, 9, 9,10,
8, 8, 9, 9, 9, 9,10,10,
8, 9, 9, 9, 9,10,10,10,
9, 9, 9, 9,10,10,10,10,
9, 9, 9,10,10,10,10,11,
9, 9,10,10,10,10,11,11,
9,10,10,10,10,11,11,11,
10,10,10,10,11,11,11,11



strange thing with my cce-test-encoding, maybe i screwed things up, but the cce-standard matrix encoding shows as:
intra
8, 8, 9,11,13,13,14,17,
8, 8,11,12,13,14,17,18,
9,11,13,13,14,17,17,16,
11,11,13,13,13,17,18,20,
11,13,13,13,16,17,20,24,
13,13,13,16,17,20,24,29,
13,12,13,17,19,23,28,34,
12,13,17,19,23,28,34,41
extra
16,17,18,19,20,21,22,23,
17,18,19,20,21,22,23,24,
18,19,20,21,22,23,24,25,
19,20,21,22,23,24,26,27,
20,21,22,23,25,26,27,28,
21,22,23,24,26,27,28,30,
22,23,24,26,27,28,30,31,
23,24,25,27,28,30,31,33

and the fox-encoding shows as:
intra
8, 8, 9,11,13,13,14,17,
8, 8,11,12,13,14,17,18,
9,11,13,13,14,17,17,16,
11,11,13,13,13,17,18,20,
11,13,13,13,16,17,20,24,
13,13,13,16,17,20,24,29,
13,12,13,17,19,23,28,34,
12,13,17,19,23,28,34,41
extra
8, 8, 8, 9, 9, 9, 9,10,
8, 8, 9, 9, 9, 9,10,10,
8, 9, 9, 9, 9,10,10,10,
9, 9, 9, 9,10,10,10,10,
9, 9, 9,10,10,10,10,11,
9, 9,10,10,10,10,11,11,
9,10,10,10,10,11,11,11,
10,10,10,10,11,11,11,11

whereas the cce-standard-intra-matrix should be like
8,16,19,22,26,27,29,34
... ???

nice effect to just double the values and save them back to the mpv ;-)

loki03
1st November 2003, 22:31
yeah, thats fun. (48-12+12),season2 matrix seems to be a tweaked fox one:

8, 8, 9,11,13,13,14,17,
8, 8,11,12,13,14,17,18,
9,11,13,13,14,17,17,16,
11,11,13,13,13,17,18,20,
11,13,13,13,16,17,20,24,
13,13,13,16,17,20,24,29,
13,14,15,17,19,23,28,34,
13,15,17,19,23,28,34,41


the same one on the film of nick hornby´s cool book!