[MPlayer-dev-eng] mjpeg yuv422 output from mencoder/mplayer

Baptiste Coudurier baptiste.coudurier at smartjog.com
Sun Oct 1 19:50:27 CEST 2006


Michael Niedermayer a écrit :
> Hi
> 
> On Sun, Oct 01, 2006 at 04:49:07PM +0200, Baptiste Coudurier wrote:
>> Hi
>>
>> Michael Niedermayer a écrit :
>>> Hi
>>>
>>> On Sat, Sep 30, 2006 at 12:46:58PM +0200, Karolina Lindqvist wrote:
>>>> I need something that outputs the MJPEG YUV422 format, that the zoran 
>>>> (zr, zr2) drivers need, but I find nothing in the mencoder/mplayer 
>>>> programs that can output that format to disc. 
>>>>
>>>> I tried mencoder with -lavcopts vcodec=mjpeg which almost appears to do 
>>>> the job. Except for that it does not accept format=422p. It can only do 
>>>> YV12 (YUV420).
>>> a patch which adds 422p jpeg encoding support to lavc would be welcome ...
>>>
>>> [...]
>> Tried to. I have at least something working in progressive. Problem is 
>> that mpegvideo.c is really hardcoded to 4:2:0 and since DCT on jpeg is 
>> done on 8x8 mb it is quite hard to work around that.
> 
> hmm lavc mpeg2 video supports 422 encoding over mpegvideo.c ...
> 
> [...]

Yes. Mpeg2 macroblocks are orderded right out of encode_mb_internal. 
Output is 8 blocks: 4 luma blocks, 4 chroma blocks in 4:2:2, and stored 
that way.

In mjpeg_encode_mb, you will have 8 blocks while they must be coded 2 
luma, 2 chroma, in 4:2:2 and 4 others will be on the next line in the 
bitstream.

I was thinking that storing those 4 blocks temporarly and write them 
after was not clean. I just rewrote encode_mb_internal to output 4 
blocks, and changed s->mb_height to 8.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no



More information about the MPlayer-dev-eng mailing list