Mercurial > libavcodec.hg
comparison error_resilience.c @ 11502:eb86fea1146b libavcodec
Use H264s MC instead of mpeg4-asp qpel for h264 error resilience.
author | michael |
---|---|
date | Wed, 17 Mar 2010 02:59:12 +0000 |
parents | 5330f17dc769 |
children | 927b985f73f4 |
comparison
equal
deleted
inserted
replaced
11501:cd71b238e78b | 11502:eb86fea1146b |
---|---|
41 static void decode_mb(MpegEncContext *s){ | 41 static void decode_mb(MpegEncContext *s){ |
42 s->dest[0] = s->current_picture.data[0] + (s->mb_y * 16* s->linesize ) + s->mb_x * 16; | 42 s->dest[0] = s->current_picture.data[0] + (s->mb_y * 16* s->linesize ) + s->mb_x * 16; |
43 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); | 43 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); |
44 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); | 44 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); |
45 | 45 |
46 if(s->codec_id == CODEC_ID_H264){ | |
47 H264Context *h= (void*)s; | |
48 h->mb_xy= s->mb_x + s->mb_y*s->mb_stride; | |
49 memset(h->non_zero_count_cache, 0, sizeof(h->non_zero_count_cache)); | |
50 fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, 0, 1); | |
51 fill_rectangle(h->mv_cache[0][ scan8[0] ], 4, 4, 8, pack16to32(s->mv[0][0][0],s->mv[0][0][1]), 4); | |
52 assert(h->list_count==1); | |
53 assert(!FRAME_MBAFF); | |
54 ff_h264_hl_decode_mb(h); | |
55 }else{ | |
46 MPV_decode_mb(s, s->block); | 56 MPV_decode_mb(s, s->block); |
57 } | |
47 } | 58 } |
48 | 59 |
49 /** | 60 /** |
50 * @param stride the number of MVs to get to the next row | 61 * @param stride the number of MVs to get to the next row |
51 * @param mv_step the number of MVs per row or column in a macroblock | 62 * @param mv_step the number of MVs per row or column in a macroblock |