--- encoder.c 2003/02/19 10:08:20 1.94 +++ encoder.c 2003/02/19 21:30:52 1.95 @@ -26,7 +26,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: encoder.c,v 1.94 2003/02/19 10:08:20 chl Exp $ + * $Id: encoder.c,v 1.95 2003/02/19 21:30:52 edgomez Exp $ * ****************************************************************************/ @@ -677,7 +677,7 @@ uint16_t x, y; Bitstream bs; uint32_t bits; - int mode; + int mode = -1; /* Just to shut up compiler warning */ int input_valid = 1; int bframes_count = 0; @@ -1434,9 +1434,8 @@ return; } - pEnc->current->fcode = - (hint->rawhints) ? hint->mvhint.fcode : BitstreamGetBits(&bs, - FCODEBITS); + pEnc->current->fcode = (hint->rawhints) ? + (uint32_t)hint->mvhint.fcode : BitstreamGetBits(&bs, FCODEBITS); length = pEnc->current->fcode + 5; high = 1 << (length - 1); @@ -1451,20 +1450,17 @@ VECTOR tmp; int vec; - pMB->mode = - (hint->rawhints) ? bhint->mode : BitstreamGetBits(&bs, - MODEBITS); + pMB->mode = (hint->rawhints) ? + (uint32_t)bhint->mode : BitstreamGetBits(&bs, MODEBITS); pMB->mode = (pMB->mode == MODE_INTER_Q) ? MODE_INTER : pMB->mode; pMB->mode = (pMB->mode == MODE_INTRA_Q) ? MODE_INTRA : pMB->mode; if (pMB->mode == MODE_INTER) { - tmp.x = - (hint->rawhints) ? bhint->mvs[0].x : BitstreamGetBits(&bs, - length); - tmp.y = - (hint->rawhints) ? bhint->mvs[0].y : BitstreamGetBits(&bs, - length); + tmp.x = (hint->rawhints) ? + bhint->mvs[0].x : (int)BitstreamGetBits(&bs, length); + tmp.y = (hint->rawhints) ? + bhint->mvs[0].y : (int)BitstreamGetBits(&bs, length); tmp.x -= (tmp.x >= high) ? high * 2 : 0; tmp.y -= (tmp.y >= high) ? high * 2 : 0; @@ -1478,12 +1474,10 @@ } } else if (pMB->mode == MODE_INTER4V) { for (vec = 0; vec < 4; ++vec) { - tmp.x = - (hint->rawhints) ? bhint->mvs[vec]. - x : BitstreamGetBits(&bs, length); - tmp.y = - (hint->rawhints) ? bhint->mvs[vec]. - y : BitstreamGetBits(&bs, length); + tmp.x = (hint->rawhints) ? + bhint->mvs[vec].x : (int)BitstreamGetBits(&bs, length); + tmp.y = (hint->rawhints) ? + bhint->mvs[vec].y : (int)BitstreamGetBits(&bs, length); tmp.x -= (tmp.x >= high) ? high * 2 : 0; tmp.y -= (tmp.y >= high) ? high * 2 : 0;