Browse Source

ivi_common: Initialize a variable at declaration in ff_ivi_decode_blocks().

This simplifies the code a bit and avoids an uninitialized variable warning.
tags/n0.11
Diego Biurrun 13 years ago
parent
commit
b1563d0cf9
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      libavcodec/ivi_common.c

+ 2
- 4
libavcodec/ivi_common.c View File

@@ -330,7 +330,7 @@ int ff_ivi_dec_tile_data_size(GetBitContext *gb)
int ff_ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile) int ff_ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile)
{ {
int mbn, blk, num_blocks, num_coeffs, blk_size, scan_pos, run, val, int mbn, blk, num_blocks, num_coeffs, blk_size, scan_pos, run, val,
pos, is_intra, mc_type, mv_x, mv_y, col_mask;
pos, is_intra, mc_type = 0, mv_x, mv_y, col_mask;
uint8_t col_flags[8]; uint8_t col_flags[8];
int32_t prev_dc, trvec[64]; int32_t prev_dc, trvec[64];
uint32_t cbp, sym, lo, hi, quant, buf_offs, q; uint32_t cbp, sym, lo, hi, quant, buf_offs, q;
@@ -370,9 +370,7 @@ int ff_ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile)
if (!is_intra) { if (!is_intra) {
mv_x = mb->mv_x; mv_x = mb->mv_x;
mv_y = mb->mv_y; mv_y = mb->mv_y;
if (!band->is_halfpel) {
mc_type = 0; /* we have only fullpel vectors */
} else {
if (band->is_halfpel) {
mc_type = ((mv_y & 1) << 1) | (mv_x & 1); mc_type = ((mv_y & 1) << 1) | (mv_x & 1);
mv_x >>= 1; mv_x >>= 1;
mv_y >>= 1; /* convert halfpel vectors into fullpel ones */ mv_y >>= 1; /* convert halfpel vectors into fullpel ones */


Loading…
Cancel
Save