[FFmpeg-soc] [soc]: r5598 - indeo5/ivi_common.c
kostya
subversion at mplayerhq.hu
Wed Jan 27 17:02:59 CET 2010
Author: kostya
Date: Wed Jan 27 17:02:59 2010
New Revision: 5598
Log:
deobfuscate variable meaning and calculating
Modified:
indeo5/ivi_common.c
Modified: indeo5/ivi_common.c
==============================================================================
--- indeo5/ivi_common.c Wed Jan 27 16:58:06 2010 (r5597)
+++ indeo5/ivi_common.c Wed Jan 27 17:02:59 2010 (r5598)
@@ -52,7 +52,7 @@ static uint16_t inv_bits(uint16_t val, i
int ff_ivi_create_huff_from_desc(const IVIHuffDesc *cb, VLC *vlc,
const int flag)
{
- int pos, i, j, codes_per_row, prefix, last_row;
+ int pos, i, j, codes_per_row, prefix, not_last_row;
uint16_t codewords[256]; /* FIXME: move this temporal storage out? */
uint8_t bits[256];
@@ -60,14 +60,14 @@ int ff_ivi_create_huff_from_desc(const I
for (i = 0; i < cb->num_rows; i++) {
codes_per_row = 1 << cb->xbits[i];
- last_row = !!(i - cb->num_rows + 1); /* = 0 for the last row */
- prefix = ((1 << i) - 1) << (cb->xbits[i] + last_row);
+ not_last_row = (i != cb->num_rows - 1);
+ prefix = ((1 << i) - 1) << (cb->xbits[i] + not_last_row);
for (j = 0; j < codes_per_row; j++) {
if (pos >= 256) /* Some Indeo5 codebooks can have more than 256 */
break; /* elements, but only 256 codes are allowed! */
- bits[pos] = i + cb->xbits[i] + last_row;
+ bits[pos] = i + cb->xbits[i] + not_last_row;
if (bits[pos] > IVI_VLC_BITS)
return -1; /* invalid descriptor */
More information about the FFmpeg-soc
mailing list