[MPlayer-dev-eng] [PATCH] XviD profile support
Robert Swain
robert.swain at gmail.com
Sat Sep 10 20:45:41 CEST 2005
Hello all,
This patch adds Simple, Advanced Simple and DivX profile support.
Usage is:
profile=<option>
Restricts options and VBV according to the Simple, Advanced Simple and
DivX profiles.
unrestricted
no restrictions (default)
sp0
simple profile at level 0
sp1
simple profile at level 1
sp2
simple profile at level 2
sp3
simple profile at level 3
asp0
advanced simple profile at level 0
asp1
advanced simple profile at level 1
asp2
advanced simple profile at level 2
asp3
advanced simple profile at level 3
asp4
advanced simple profile at level 4
asp5
advanced simple profile at level 5
dxnhandheld
DXN handheld profile
dxnportntsc
DXN portable NTSC profile
dxnportpal
DXN portable PAL profile
dxnhtntsc
DXN home theater NTSC profile
dxnhtpal
DXN home theater PAL profile
dxnhdtv
DXN HDTV profile
(<profile option>\n<full profile name>)
Please find attached the patch to be applied within the MPlayer source
root directory and ve_xvid4.h to go into libmpcodecs.
Most of the code is taken from XviD. I tried not to alter code in
ve_xvid4.c unnecessarily, to keep the patch clean. The closed gop and
packed b-frame options were picked up by 'cvs diff -ub' even if I left
those lines unaltered, so I thought they may as well be indented
correctly to fit with my code.
Also, I thought about adding a table of the options available in each
profile to the documentation but I'm not sure where to put this nor
how to do it.
I have tested the code for a number of cases (b-frames, packed, qpel,
gmc, adaptive quantisation, mpeg quantisation) for the three types of
profile but I have no way of testing the VBV constraints apart from
printf()s to see if the correct values are being obtained. I haven't
tested the interlaced option either but I don't have any interlaced
material, nor a desire to have any. ;) I can dig some out from Google
if it's possible the code could be problematic. I would appreciate it
if someone could look over this code carefully and check that no
stupid mistakes have been made, otherwise I am confident it works as
it should.
I'm not keen on my proftonum() function but my knowledge of C is
limited for the moment and I don't know of a better way to do it.
Suggestions here would be greatly appreciated.
'Beat up' on it as best you can with regard to the code and testing
and I'll make alterations accordingly.
Kind regards,
Robert Swain
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer.xvid.profiles.0.diff
Type: application/octet-stream
Size: 13209 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050910/80b300c4/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ve_xvid4.h
Type: application/octet-stream
Size: 2092 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050910/80b300c4/attachment-0001.obj>
More information about the MPlayer-dev-eng
mailing list