diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-06-19 01:25:02 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-06-19 01:25:02 +0000 |
commit | cbf5374fc0f733cefe304fd4d11c7b0fa21fba61 (patch) | |
tree | addfc00152fbefeb7c0b3636db20f0302e5eca56 /libavcodec/svq3.c | |
parent | cceb990ef9a62ad07108342057380a19183b9520 (diff) | |
download | ffmpeg-streaming-cbf5374fc0f733cefe304fd4d11c7b0fa21fba61.zip ffmpeg-streaming-cbf5374fc0f733cefe304fd4d11c7b0fa21fba61.tar.gz |
1000l to myself for FFMIN(...,0) instead of ...,6)
some more checks
Originally committed as revision 3238 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r-- | libavcodec/svq3.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index 442839c..cccbc2e 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -453,9 +453,11 @@ static int svq3_decode_mb (H264Context *h, unsigned int mb_type) { mb_type = MB_TYPE_SKIP; } else { - mb_type= FFMIN(s->next_picture.mb_type[mb_xy], 0); - svq3_mc_dir (h, mb_type, PREDICT_MODE, 0, 0); - svq3_mc_dir (h, mb_type, PREDICT_MODE, 1, 1); + mb_type= FFMIN(s->next_picture.mb_type[mb_xy], 6); + if(svq3_mc_dir (h, mb_type, PREDICT_MODE, 0, 0) < 0) + return -1; + if(svq3_mc_dir (h, mb_type, PREDICT_MODE, 1, 1) < 0) + return -1; mb_type = MB_TYPE_16x16; } @@ -513,17 +515,20 @@ static int svq3_decode_mb (H264Context *h, unsigned int mb_type) { /* decode motion vector(s) and form prediction(s) */ if (s->pict_type == P_TYPE) { - svq3_mc_dir (h, (mb_type - 1), mode, 0, 0); + if(svq3_mc_dir (h, (mb_type - 1), mode, 0, 0) < 0) + return -1; } else { /* B_TYPE */ if (mb_type != 2) { - svq3_mc_dir (h, 0, mode, 0, 0); + if(svq3_mc_dir (h, 0, mode, 0, 0) < 0) + return -1; } else { for (i=0; i < 4; i++) { memset (s->current_picture.motion_val[0][b_xy + i*h->b_stride], 0, 4*2*sizeof(int16_t)); } } if (mb_type != 1) { - svq3_mc_dir (h, 0, mode, 1, (mb_type == 3)); + if(svq3_mc_dir (h, 0, mode, 1, (mb_type == 3)) < 0) + return -1; } else { for (i=0; i < 4; i++) { memset (s->current_picture.motion_val[1][b_xy + i*h->b_stride], 0, 4*2*sizeof(int16_t)); |