[Ffmpeg-devel] Re: [RFC] mpeg2 422 encoding.
Michael Niedermayer
michaelni
Sun May 7 23:50:01 CEST 2006
Hi
On Sun, May 07, 2006 at 08:12:58PM +0200, Baptiste COUDURIER wrote:
> Hi
>
> Michael Niedermayer wrote:
> > [...]
> >
> > no, there are no motion vectors for chroma the chroma vectors are the same
> > as the luma vactors (ignoring scaling & rounding ...)
> >
> > and i dont think that theres a relation between -me xyz, the number of b
> > frames and the (-mbd bits) bug its probably just a "coincidence"
> > you should rather look at the mb_decision != 0 specific code, i also
> > think that the mbd bits bug isnt critical and could be dealt with after
> > 422 encoding support has been added
> >
>
> All right then,
>
> A new patch is attached I only inlined encode_mb, and mpeg1_encode_mb in
> mpeg12.c, I left START/STOP TIMER funcs around encode_picture.
> Interlaced encoding in 422 works. I removed all encode_mb_hq changes for
> now.
>
> I get good performance with that patch. Equal/faster on xeon 2.8ghz. I
> wonder why faster sometimes, maybe inlining whole encode_mb did that.
> What do you get ?
faster too (amd duron 800mhz), no clue why either ...
patch ok, a few minor cosmetical ideas below though (can be ignored or
commited later)
[...]
> + switch (s->chroma_format){
> + case CHROMA_422:
> + avctx->profile = 0;
> + break;
> + case CHROMA_420:
> + default:
> + avctx->profile = 4;
> + break;
> + }
if(s->chroma_format == CHROMA_422)
avctx->profile = 0;
else
avctx->profile = 4;
is half the number of lines ...
chroma_format2profile[4]={4,4,0,4};
avctx->profile= chroma_format2profile[s->chroma_format]
is a quarter though maybe less readable
[...]
> + if (s->chroma_format == CHROMA_420)
> + put_bits(&s->pb, 1, 0); //escx
> + else
> + put_bits(&s->pb, 1, 1); //escx
put_bits1(&s->pb, s->chroma_format != CHROMA_420); //escx
[...]
--
Michael
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the ffmpeg-devel
mailing list