[FFmpeg-devel] H264: Fix non_zero_count_cache for deblocking in fields
Jeff Downs
heydowns
Wed Dec 12 22:29:32 CET 2007
On Wed, 12 Dec 2007, Michael Niedermayer wrote:
> On Fri, Nov 30, 2007 at 10:58:23AM +0100, Martin Zlomek wrote:
[...]
> > Index: libavcodec/h264.c
> > ===================================================================
> > --- libavcodec/h264.c (revision 11112)
> > +++ libavcodec/h264.c (working copy)
> > @@ -172,7 +172,7 @@
> > int i;
> >
> > //FIXME deblocking could skip the intra and nnz parts.
> > - if(for_deblock && (h->slice_num == 1 || h->slice_table[mb_xy] == h->slice_table[mb_xy-s->mb_stride]) && !FRAME_MBAFF)
> > + if(for_deblock && (h->slice_num == 1 || h->slice_table[mb_xy] == h->slice_table[mb_xy - (s->mb_stride << FIELD_PICTURE)]) && !FRAME_MBAFF)
> > return;
> >
> > //wow what a mess, why didn't they simplify the interlacing&intra stuff, i can't imagine that these complex rules are worth it
>
> patch ok
Was about to apply, but noticed mb_xy - (mb_stride << FIELD_PICTURE) was
already being computed just below.
Attached a bit cleaner end result?
-Jeff
-------------- next part --------------
Index: libavcodec/h264.c
===================================================================
--- libavcodec/h264.c (revision 11208)
+++ libavcodec/h264.c (working copy)
@@ -171,13 +171,14 @@
int left_block[8];
int i;
+ top_xy = mb_xy - (s->mb_stride << FIELD_PICTURE);
+
//FIXME deblocking could skip the intra and nnz parts.
- if(for_deblock && (h->slice_num == 1 || h->slice_table[mb_xy] == h->slice_table[mb_xy-s->mb_stride]) && !FRAME_MBAFF)
+ if(for_deblock && (h->slice_num == 1 || h->slice_table[mb_xy] == h->slice_table[top_xy]) && !FRAME_MBAFF)
return;
//wow what a mess, why didn't they simplify the interlacing&intra stuff, i can't imagine that these complex rules are worth it
- top_xy = mb_xy - (s->mb_stride << FIELD_PICTURE);
topleft_xy = top_xy - 1;
topright_xy= top_xy + 1;
left_xy[1] = left_xy[0] = mb_xy-1;
More information about the ffmpeg-devel
mailing list