PDA

View Full Version : How do I calculate SCR from hex?


2COOL
15th July 2005, 09:56
I've done some search in the forums and found some threads pertaining to this but to be honest with you, I'm lost! My inquiring mind was going through some stuff in VobEdit and just wanted to know how things work. Anyways, can anyone explain the formula in simplest terms how to do the conversion here?

http://img324.imageshack.us/img324/4359/screenhunter0010lf.gif (http://www.imageshack.us)

This was from an average commercial DVD so I take it since I am working with MPEG-2, I have a system clock of 90 KHz.

Krismen
15th July 2005, 21:25
Hi 2COOL.

I've found something that might be helpfull:

http://dvd.sourceforge.net/dvdinfo/packhdr.html

2COOL
15th July 2005, 21:52
Thanks for your reply but I have already been there. Advanced math isn't my skills and even worse, trying to comprehend technical stuff. I was looking for someone to break it down for me in newbie terms like a formula and clarifying all variables.

Note to self: Don't read technical during the wee hours of the morning.

dcoder
15th July 2005, 22:36
118411293 = ((0x4470ee80ec01 & 0x380000000000) >> 13) | ((0x4470ee80ec01 & 0x03FFF8000000) >> 12) | ((0x4470ee80ec01 & 0x000003FFF800) >> 11)

Krismen
15th July 2005, 22:47
.000 = (0x4470ee80ec01 & 0x0000000003FE) >> 1


& - and operator (0 & 0 = 0, 0 & 1 = 0, 1 & 0 = 0, 1 & 1 = 1)

>> n - shift bits right n times

| - addition

D3s7
16th July 2005, 02:06
or in the terms a beginner can understand :)

4470ee80ec01 = (hex to binary)
44 = 01000100
70 = 01110000
ee = 11101110
80 = 10000000
ec = 11101100
01 = 00000001

then according to that website: (bit of the byte = 76543210)
SCR32..30 = 5,4,3 (byte 1) = 000
SCR39..15 = 1,0,7,6,5,4,3,2,1,0,7,6,5,4,3 (byte 1,2,3)= 000111000011101
SCR14..00 = 1,0,7,6,5,4,3,2,1,0,7,6,5,4,3 (byte 3,4,5)= 101000000011101
combine those values in order = 000000111000011101101000000011101
that (in dec) = 118411293

SCR_EXT = 1,0,7,6,5,4,3,2,1 (byte 5,6) = 000000000
in dec = 0

so your SCR = 118411293.000

2COOL
16th July 2005, 03:12
Thanks to you all and a special extra thanks to you, D3s7, for polishing it up for me. I understand now. :)