Mercurial > libavcodec.hg
changeset 2088:19d4d5c6a8f4 libavcodec
1000l to myself for FFMIN(...,0) instead of ...,6)
some more checks
author | michael |
---|---|
date | Sat, 19 Jun 2004 01:25:02 +0000 |
parents | a4d3699c6636 |
children | 9e0b49e1c7ff |
files | svq3.c |
diffstat | 1 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/svq3.c Sat Jun 19 01:14:13 2004 +0000 +++ b/svq3.c Sat Jun 19 01:25:02 2004 +0000 @@ -453,9 +453,11 @@ 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 @@ /* 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));