summaryrefslogtreecommitdiffstats
path: root/DOCS/tech/realcodecs/video-codecs.txt
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-06-09 03:25:28 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-06-09 03:25:28 +0000
commit76538ed792cf3c2c0faec3dae24c161e013bce07 (patch)
treeef777bbab7c5cc341ab53110906f2cc9516e14ce /DOCS/tech/realcodecs/video-codecs.txt
parent56ae80d6e465bfd131b933d12166d04be8c1333c (diff)
downloadmpv-76538ed792cf3c2c0faec3dae24c161e013bce07.tar.bz2
mpv-76538ed792cf3c2c0faec3dae24c161e013bce07.tar.xz
some updates, fixes discovered by me
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6351 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'DOCS/tech/realcodecs/video-codecs.txt')
-rw-r--r--DOCS/tech/realcodecs/video-codecs.txt42
1 files changed, 26 insertions, 16 deletions
diff --git a/DOCS/tech/realcodecs/video-codecs.txt b/DOCS/tech/realcodecs/video-codecs.txt
index e2cff7e338..926b8f8bed 100644
--- a/DOCS/tech/realcodecs/video-codecs.txt
+++ b/DOCS/tech/realcodecs/video-codecs.txt
@@ -48,6 +48,9 @@ struct init_data {
ulong format2;
};
+format1 and format2 are stored in the .rm file's stream headers.
+(format1>>16)&3 seems to be a sub-codec id/selector, at least for rv30
+it's the only difference between low and high bitrate files.
result=RV20toYUV420Transform(char *input_stream, char *output_data,
struct transin *, struct transout *, struct rvyuvMain *);
@@ -56,24 +59,11 @@ struct transin {
ulong length_of_input_data;
ulong null;
ulong num_sub_packets_in_block_minus_one;
- struct transin1 *ptr;
+ ulong *sub_packets_list;
ulong another_null;
ulong timestamp_from_stream;
};
-struct transin1 {
- ulong 1, 0;
- // ... more data? the codec's behaviour changed sometimes
- // when I changed the data following the first to ulongs
- // i.e. it crashed. I've set it to 0
- // TODO: understand (the purpose of) these values
- // often contains 0x28, 0x19
- // sometimes 0x28, 0x11
- // sometimes even other data (e.g. pointers)
- // a breakpoint didn't reveal a read operation. weird.
-};
-
-
struct transout {
ulong flag1; // ((var_94&2!=0)&&(result==0))?1:0
ulong flag2; // 4 LBS from var_94
@@ -81,9 +71,17 @@ struct transout {
ulong width, height;
};
-The length of output_stream is 1.5*width*height.
+The length of output_stream is 1.5*width*height (I420 planar yuv 4:2:0).
input_stream is the exact data from the data block for one frame.
+sub_packets_list is a list of num_sub_packets pairs of long values, in form:
+1, 0,
+1, offset_2nd,
+1, offset_3rd,
+1, offset_4th,
+...
+
+where offset_* are the offsets or sub-packets relative to input_stream.
result=RV20toYUV420CustomMessage(ulong *msg, struct rvyuvMain *);
@@ -92,6 +90,10 @@ Messages used by RV30:
A message is a triplet (cmd,val,ext) of ulong.
+NOTE:
+rv30 only requires the (0x24,2|3,{w,h,w,h}) message. others can be left out!
+rv20 only requires the (0x11,2,0) message in rp8, before each transform call.
+
(3,2,0)
returns always(?) an error, since a global variable inside the codec
(which points to a function similar to custommessage), is always NULL
@@ -103,15 +105,23 @@ val=0|1: sets intern2 to val, when intern1 is non-zero
val=2: return intern2
what does intern[1,2] mean?
+(0x12,...)
+used by rv20, function unknown, can be ignored
+
(0x1e,2|3,1)
calls a subroutine and returns the result, purpose has to be detemined
-(0x24,2,{...})
+(0x24,subcodec,{...})
copies 4 dwords to rvyuvMain+07c: { width, height, 0, 0 }
+subcodec must be 2 (low-bitrate) or 3 (high-bitrate) for rv30.
+the codec type (low vs high) can be determined from 1+((format1>>16)&3)
+for rv20, this call should be ignored! (makes codec crashing)
(0x1c,a,b) - called inside transform
to be analyzed
+(105,...)
+used by rv20, function unknown, can be ignored
structure of rvyuvMain: