diff options
author | Michael Niedermayer | 2003-07-29 02:09:12 +0000 |
---|---|---|
committer | Michael Niedermayer | 2003-07-29 02:09:12 +0000 |
commit | 7d1c3fc1d683d53982a1dec14f0f9749a07ae48d (patch) | |
tree | 23a9984eef372f9710641e2cb6f302ea9af1727f /libavcodec/error_resilience.c | |
parent | 80adda8efd35c920c7ba0c43d530102a2fd22bc3 (diff) |
rate distortion mb decision support
fix decoding of old %16!=0 divx
fix assertion failure in motion_est.c
Originally committed as revision 2094 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/error_resilience.c')
-rw-r--r-- | libavcodec/error_resilience.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index fd7eb37737..b13eea2f70 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -30,6 +30,14 @@ #include "mpegvideo.h" #include "common.h" +static void decode_mb(MpegEncContext *s){ + s->dest[0] = s->current_picture.data[0] + (s->mb_y * 16* s->linesize ) + s->mb_x * 16; + s->dest[1] = s->current_picture.data[1] + (s->mb_y * 8 * s->uvlinesize) + s->mb_x * 8; + s->dest[2] = s->current_picture.data[2] + (s->mb_y * 8 * s->uvlinesize) + s->mb_x * 8; + + MPV_decode_mb(s, s->block); +} + /** * replaces the current MB with a flat dc only version. */ @@ -346,7 +354,7 @@ static void guess_mv(MpegEncContext *s){ s->mb_y= mb_y; s->mv[0][0][0]= 0; s->mv[0][0][1]= 0; - MPV_decode_mb(s, s->block); + decode_mb(s); } } return; @@ -480,7 +488,7 @@ int score_sum=0; s->motion_val[mot_index][0]= s->mv[0][0][0]= mv_predictor[j][0]; s->motion_val[mot_index][1]= s->mv[0][0][1]= mv_predictor[j][1]; - MPV_decode_mb(s, s->block); + decode_mb(s); if(mb_x>0 && fixed[mb_xy-1]){ int k; @@ -513,7 +521,7 @@ score_sum+= best_score; s->motion_val[mot_index][0]= s->mv[0][0][0]= mv_predictor[best_pred][0]; s->motion_val[mot_index][1]= s->mv[0][0][1]= mv_predictor[best_pred][1]; - MPV_decode_mb(s, s->block); + decode_mb(s); if(s->mv[0][0][0] != prev_x || s->mv[0][0][1] != prev_y){ @@ -848,7 +856,7 @@ void ff_er_frame_end(MpegEncContext *s){ s->mb_x= mb_x; s->mb_y= mb_y; - MPV_decode_mb(s, s->block); + decode_mb(s); } } @@ -888,7 +896,7 @@ void ff_er_frame_end(MpegEncContext *s){ s->dsp.clear_blocks(s->block[0]); s->mb_x= mb_x; s->mb_y= mb_y; - MPV_decode_mb(s, s->block); + decode_mb(s); } } }else |