diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-03-17 05:59:12 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-03-17 05:59:12 +0300 |
commit | 68f0bc7e62c27909c175d0796c7eee97011cd6fa (patch) | |
tree | 3c9a298f6ef1e20c05347209e6dedd3d4cec0c65 /libavcodec/error_resilience.c | |
parent | c7f625eecff0fb76f077d516c15a586576466e67 (diff) |
Use H264s MC instead of mpeg4-asp qpel for h264 error resilience.
Originally committed as revision 22572 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/error_resilience.c')
-rw-r--r-- | libavcodec/error_resilience.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index c0c786f8e3..2751878230 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -43,7 +43,18 @@ static void decode_mb(MpegEncContext *s){ s->dest[1] = s->current_picture.data[1] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift); s->dest[2] = s->current_picture.data[2] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift); + if(s->codec_id == CODEC_ID_H264){ + H264Context *h= (void*)s; + h->mb_xy= s->mb_x + s->mb_y*s->mb_stride; + memset(h->non_zero_count_cache, 0, sizeof(h->non_zero_count_cache)); + fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, 0, 1); + fill_rectangle(h->mv_cache[0][ scan8[0] ], 4, 4, 8, pack16to32(s->mv[0][0][0],s->mv[0][0][1]), 4); + assert(h->list_count==1); + assert(!FRAME_MBAFF); + ff_h264_hl_decode_mb(h); + }else{ MPV_decode_mb(s, s->block); + } } /** |