[FFmpeg-soc] [soc]: r325 - in rv40: rv40.c rv40data.h
kostya
subversion at mplayerhq.hu
Fri Jul 6 16:20:22 CEST 2007
Author: kostya
Date: Fri Jul 6 16:20:22 2007
New Revision: 325
Log:
Use base 16 instead of base 10 for mode-2 pattern
Modified:
rv40/rv40.c
rv40/rv40data.h
Modified: rv40/rv40.c
==============================================================================
--- rv40/rv40.c (original)
+++ rv40/rv40.c Fri Jul 6 16:20:22 2007
@@ -460,14 +460,14 @@ static int rv40_decode_intra_types(RV40D
for(j = 0; j < 4; j++){
/* Coefficients are read using VLC chosen by prediction pattern
* First one (used for retrieving a pair of coefficients) is
- * (top right) + 10 * top + 100 * left
+ * constructed from top, top right and left coefficients
* Second one (used for retrieving only one coefficient) is
* top + 10 * left
*/
A = i ? ptr[-3] : dst[j+1]; // it won't be used for the last coefficient in a row
B = i ? ptr[-4] : dst[j];
C = j ? ptr[-1] : ptr[3];
- pattern = A + B*10 + C*100;
+ pattern = A + (B << 4) + (C << 8);
for(k = 0; k < MODE2_PATTERNS_NUM; k++)
if(pattern == rv40_aic_table_index[k])
break;
Modified: rv40/rv40data.h
==============================================================================
--- rv40/rv40data.h (original)
+++ rv40/rv40data.h Fri Jul 6 16:20:22 2007
@@ -93,16 +93,16 @@ static const uint8_t modulo_three_table[
/**
* Intra types table
*
- * These values are actually base 10 coded 3-tuples
+ * These values are actually coded 3-tuples
* used for detecting standard block configurations
*/
static const uint16_t rv40_aic_table_index[MODE2_PATTERNS_NUM] = {
- 0, 100, 200,
- 11, 111, 211, 511, 611,
- 22, 122, 222, 722,
- 272, 227,
- 822, 282, 228,
- 112, 116, 221
+ 0x000, 0x100, 0x200,
+ 0x011, 0x111, 0x211, 0x511, 0x611,
+ 0x022, 0x122, 0x222, 0x722,
+ 0x272, 0x227,
+ 0x822, 0x282, 0x228,
+ 0x112, 0x116, 0x221
};
#endif /* RV40DATA_H */
More information about the FFmpeg-soc
mailing list