[FFmpeg-devel] [PATCH] RV40 Decoder - 1/3 - Loop Filter

Jason Garrett-Glaser darkshikari
Fri Nov 28 10:33:08 CET 2008


On Thu, Nov 27, 2008 at 11:03 PM, Kostya <kostya.shishkov at gmail.com> wrote:
> On Thu, Nov 27, 2008 at 10:04:40PM +0100, Michael Niedermayer wrote:
>> On Thu, Nov 27, 2008 at 09:23:21AM +0200, Kostya wrote:
>> > $subj
>> >
>> > Fixed several bugs in chroma loop filtering introduced during
>> > refactoring, now it's bitexact again.
>>
>> [...]
>>
>> > +    for(s->mb_y = 0; s->mb_y < s->mb_height; s->mb_y++){
>> > +        mb_pos = s->mb_y * s->mb_stride;
>> > +        for(s->mb_x = 0; s->mb_x < s->mb_width; s->mb_x++, mb_pos++){
>> > +            int mbtype = s->current_picture_ptr->mb_type[mb_pos];
>> > +            if(IS_INTRA(mbtype) || IS_SEPARATE_DC(mbtype))
>> > +                r->cbp_luma  [mb_pos] = 0xFFFF;
>> > +            if(IS_INTRA(mbtype))
>> > +                r->cbp_chroma[mb_pos] = 0xFF;
>> > +        }
>> > +    }
>> > +    for(s->mb_y = 0; s->mb_y < s->mb_height; s->mb_y++){
>> > +        mb_pos = s->mb_y * s->mb_stride;
>> > +        for(s->mb_x = 0; s->mb_x < s->mb_width; s->mb_x++, mb_pos++){
>>
>> loop filtering should be done after each block or row of blocks has been
>> decoded to maximize the chance that things still are in the cache
>
> I'd rather leave it as is since loop filter affects bottom macroblock edge
> too so filtering the row above just decoded one is a bit strange.

Not doing line-by-line filtering also makes frame-based threading impossible.

Dark Shikari




More information about the ffmpeg-devel mailing list