From 93cc10fa9c38b90015425f3f5cbe09117eff00e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Thu, 7 Jun 2007 13:51:06 +0000 Subject: [PATCH] =?UTF-8?q?h264:=20use=20'simple'=20in=20border=20backup?= =?UTF-8?q?=20/=20xchg=20patch=20by=20Andreas=20=C3=96man:=20[andreas=20ol?= =?UTF-8?q?ebyn=20nu]=20original=20thread:=20subject:=20[FFmpeg-devel]=20[?= =?UTF-8?q?patch]=20h264:=20use=20'simple'=20in=20border=20backup=20/=20xc?= =?UTF-8?q?hg=20date:=2006/07/2007=2003:24=20PM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originally committed as revision 9237 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/h264.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 57531d765b..f70ad50ce4 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2988,7 +2988,7 @@ static int frame_start(H264Context *h){ return 0; } -static inline void backup_mb_border(H264Context *h, uint8_t *src_y, uint8_t *src_cb, uint8_t *src_cr, int linesize, int uvlinesize){ +static inline void backup_mb_border(H264Context *h, uint8_t *src_y, uint8_t *src_cb, uint8_t *src_cr, int linesize, int uvlinesize, int simple){ MpegEncContext * const s = &h->s; int i; @@ -3006,7 +3006,7 @@ static inline void backup_mb_border(H264Context *h, uint8_t *src_y, uint8_t *src *(uint64_t*)(h->top_borders[0][s->mb_x]+0)= *(uint64_t*)(src_y + 16*linesize); *(uint64_t*)(h->top_borders[0][s->mb_x]+8)= *(uint64_t*)(src_y +8+16*linesize); - if(!(s->flags&CODEC_FLAG_GRAY)){ + if(simple || !(s->flags&CODEC_FLAG_GRAY)){ h->left_border[17 ]= h->top_borders[0][s->mb_x][16+7]; h->left_border[17+9]= h->top_borders[0][s->mb_x][24+7]; for(i=1; i<9; i++){ @@ -3018,7 +3018,7 @@ static inline void backup_mb_border(H264Context *h, uint8_t *src_y, uint8_t *src } } -static inline void xchg_mb_border(H264Context *h, uint8_t *src_y, uint8_t *src_cb, uint8_t *src_cr, int linesize, int uvlinesize, int xchg){ +static inline void xchg_mb_border(H264Context *h, uint8_t *src_y, uint8_t *src_cb, uint8_t *src_cr, int linesize, int uvlinesize, int xchg, int simple){ MpegEncContext * const s = &h->s; int temp8, i; uint64_t temp64; @@ -3049,7 +3049,7 @@ b= t; } } - if(!(s->flags&CODEC_FLAG_GRAY)){ + if(simple || !(s->flags&CODEC_FLAG_GRAY)){ if(deblock_left){ for(i = !deblock_top; i<9; i++){ XCHG(h->left_border[i+17 ], src_cb[i*uvlinesize], temp8, xchg); @@ -3256,7 +3256,7 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple){ } else { if(IS_INTRA(mb_type)){ if(h->deblocking_filter && (simple || !FRAME_MBAFF)) - xchg_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 1); + xchg_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 1, simple); if(simple || !(s->flags&CODEC_FLAG_GRAY)){ h->pred8x8[ h->chroma_pred_mode ](dest_cb, uvlinesize); @@ -3319,7 +3319,7 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple){ svq3_luma_dc_dequant_idct_c(h->mb, s->qscale); } if(h->deblocking_filter && (simple || !FRAME_MBAFF)) - xchg_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 0); + xchg_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 0, simple); }else if(is_h264){ hl_motion(h, dest_y, dest_cb, dest_cr, s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab, @@ -3419,7 +3419,7 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple){ filter_mb(h, mb_x, mb_y+1, dest_y, dest_cb, dest_cr, linesize, uvlinesize); } else { tprintf(h->s.avctx, "call filter_mb\n"); - backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize); + backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, simple); fill_caches(h, mb_type, 1); //FIXME don't fill stuff which isn't used by filter_mb filter_mb_fast(h, mb_x, mb_y, dest_y, dest_cb, dest_cr, linesize, uvlinesize); }