diff options
author | Andreas Ă–man <andreas@olebyn.nu> | 2007-06-21 07:52:06 +0000 |
---|---|---|
committer | Guillaume Poirier <gpoirier@mplayerhq.hu> | 2007-06-21 07:52:06 +0000 |
commit | b69378e2955b8a1efceb4867719b7da1200702e5 (patch) | |
tree | cb798dc52800b71405acceacca9a4d73bafad3fd /libavcodec/h264.c | |
parent | c0ad72a787b1e2ade82d8313c2c18b342a9a23c7 (diff) | |
download | ffmpeg-streaming-b69378e2955b8a1efceb4867719b7da1200702e5.zip ffmpeg-streaming-b69378e2955b8a1efceb4867719b7da1200702e5.tar.gz |
Don't swap back un-deblocked lines for intra prediction when
at slice boundaries for deblocking-type 2 content.
This is needed for slice based threading only and doesn't do much
good or bad otherwise.
Patch by Andreas Oman %andreas A olebyn P nu%
Original thread:
date: Jun 18, 2007 1:21 PM
subject: Re: [FFmpeg-devel] [PATCH] h264 parallelized,
Originally committed as revision 9380 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 99e104e..cab2841 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3024,8 +3024,18 @@ static inline void xchg_mb_border(H264Context *h, uint8_t *src_y, uint8_t *src_c MpegEncContext * const s = &h->s; int temp8, i; uint64_t temp64; - int deblock_left = (s->mb_x > 0); - int deblock_top = (s->mb_y > 0); + int deblock_left; + int deblock_top; + int mb_xy; + + if(h->deblocking_filter == 2) { + mb_xy = s->mb_x + s->mb_y*s->mb_stride; + deblock_left = h->slice_table[mb_xy] == h->slice_table[mb_xy - 1]; + deblock_top = h->slice_table[mb_xy] == h->slice_table[h->top_mb_xy]; + } else { + deblock_left = (s->mb_x > 0); + deblock_top = (s->mb_y > 0); + } src_y -= linesize + 1; src_cb -= uvlinesize + 1; |