[FFmpeg-devel] [PATCH] RV30/40 decoder splitted
Michael Niedermayer
michaelni
Thu Sep 20 13:25:59 CEST 2007
Hi
On Thu, Sep 20, 2007 at 08:27:02AM +0300, Kostya wrote:
[...]
> > [...]
> > > + if(no_up && no_left)
> > > + itype = DC_128_PRED8x8;
> > > + else if(no_up){
> > > + if(itype == PLANE_PRED8x8)itype = HOR_PRED8x8;
> > > + if(itype == VERT_PRED8x8) itype = HOR_PRED8x8;
> > > + if(itype == DC_PRED8x8) itype = LEFT_DC_PRED8x8;
> > > + }else if(no_left){
> > > + if(itype == PLANE_PRED8x8)itype = VERT_PRED8x8;
> > > + if(itype == HOR_PRED8x8) itype = VERT_PRED8x8;
> > > + if(itype == DC_PRED8x8) itype = TOP_DC_PRED8x8;
> >
> > > + }
> > > + r->h.pred16x16[itype](Y, s->linesize);
> > > + dsp->add_pixels_clamped(s->block[0], Y, s->current_picture.linesize[0]);
> > > + dsp->add_pixels_clamped(s->block[1], Y + 8, s->current_picture.linesize[0]);
> > > + Y += s->current_picture.linesize[0] * 8;
> > > + dsp->add_pixels_clamped(s->block[2], Y, s->current_picture.linesize[0]);
> > > + dsp->add_pixels_clamped(s->block[3], Y + 8, s->current_picture.linesize[0]);
> > > +
> > > + itype = ittrans16[intra_types[0]];
> > > + if(itype == PLANE_PRED8x8) itype = DC_PRED8x8;
> >
> > > + if(no_up && no_left)
> > > + itype = DC_128_PRED8x8;
> > > + else if(no_up){
> > > + if(itype == VERT_PRED8x8) itype = HOR_PRED8x8;
> > > + if(itype == DC_PRED8x8) itype = LEFT_DC_PRED8x8;
> > > + }else if(no_left){
> > > + if(itype == HOR_PRED8x8) itype = VERT_PRED8x8;
> > > + if(itype == DC_PRED8x8) itype = TOP_DC_PRED8x8;
> > > + }
> >
> > duplicate
>
> Actually it's similar but not duplicate - case 3(PLANE_PRED) is treated as DC
> prediction for chroma blocks, so on corner cases it results in different types
> of prediction.
the code:
if(no_up && no_left)
itype = DC_128_PRED8x8;
else if(no_up){
if(itype == PLANE_PRED8x8)itype = HOR_PRED8x8;
if(itype == VERT_PRED8x8) itype = HOR_PRED8x8;
if(itype == DC_PRED8x8) itype = LEFT_DC_PRED8x8;
}else if(no_left){
if(itype == PLANE_PRED8x8)itype = VERT_PRED8x8;
if(itype == HOR_PRED8x8) itype = VERT_PRED8x8;
if(itype == DC_PRED8x8) itype = TOP_DC_PRED8x8;
}
is duplicated, it will work exactly correctly in both cases, as the second
case does not have a PLANE_PRED8x8 it has been removed by:
if(itype == PLANE_PRED8x8) itype = DC_PRED8x8;
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070920/b6405969/attachment.pgp>
More information about the ffmpeg-devel
mailing list