1026
static inline int decode_dc(GetBitContext *gb, int component)
1030
if (component == 0) {
1031
code = get_vlc2(gb, dc_lum_vlc.table, DC_VLC_BITS, 2);
1033
code = get_vlc2(gb, dc_chroma_vlc.table, DC_VLC_BITS, 2);
1036
av_log(NULL, AV_LOG_ERROR, "invalid dc code at\n");
1042
diff = get_xbits(gb, code);
1047
static inline int mpeg1_decode_block_intra(MpegEncContext *s,
1051
int level, dc, diff, i, j, run;
1053
RLTable *rl = &rl_mpeg1;
1054
uint8_t * const scantable= s->intra_scantable.permutated;
1055
const uint16_t *quant_matrix= s->intra_matrix;
1056
const int qscale= s->qscale;
1059
component = (n <= 3 ? 0 : n - 4 + 1);
1060
diff = decode_dc(&s->gb, component);
1063
dc = s->last_dc[component];
1065
s->last_dc[component] = dc;
1067
dprintf("dc=%d diff=%d\n", dc, diff);
1070
OPEN_READER(re, &s->gb);
1071
/* now quantify & encode AC coefs */
1073
UPDATE_CACHE(re, &s->gb);
1074
GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2);
1078
} else if(level != 0) {
1081
level= (level*qscale*quant_matrix[j])>>4;
1083
level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
1084
LAST_SKIP_BITS(re, &s->gb, 1);
1087
run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6);
1088
UPDATE_CACHE(re, &s->gb);
1089
level = SHOW_SBITS(re, &s->gb, 8); SKIP_BITS(re, &s->gb, 8);
1090
if (level == -128) {
1091
level = SHOW_UBITS(re, &s->gb, 8) - 256; LAST_SKIP_BITS(re, &s->gb, 8);
1092
} else if (level == 0) {
1093
level = SHOW_UBITS(re, &s->gb, 8) ; LAST_SKIP_BITS(re, &s->gb, 8);
1099
level= (level*qscale*quant_matrix[j])>>4;
1103
level= (level*qscale*quant_matrix[j])>>4;
1108
av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y);
1114
CLOSE_READER(re, &s->gb);
1116
s->block_last_index[n] = i;
1120
static inline int mpeg1_decode_block_inter(MpegEncContext *s,
1124
int level, i, j, run;
1125
RLTable *rl = &rl_mpeg1;
1126
uint8_t * const scantable= s->intra_scantable.permutated;
1127
const uint16_t *quant_matrix= s->inter_matrix;
1128
const int qscale= s->qscale;
1132
OPEN_READER(re, &s->gb);
1134
/* special case for the first coef. no need to add a second vlc table */
1135
UPDATE_CACHE(re, &s->gb);
1136
v= SHOW_UBITS(re, &s->gb, 2);
1138
LAST_SKIP_BITS(re, &s->gb, 2);
1139
level= (3*qscale*quant_matrix[0])>>5;
1147
/* now quantify & encode AC coefs */
1149
UPDATE_CACHE(re, &s->gb);
1150
GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2);
1154
} else if(level != 0) {
1157
level= ((level*2+1)*qscale*quant_matrix[j])>>5;
1159
level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
1160
LAST_SKIP_BITS(re, &s->gb, 1);
1163
run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6);
1164
UPDATE_CACHE(re, &s->gb);
1165
level = SHOW_SBITS(re, &s->gb, 8); SKIP_BITS(re, &s->gb, 8);
1166
if (level == -128) {
1167
level = SHOW_UBITS(re, &s->gb, 8) - 256; LAST_SKIP_BITS(re, &s->gb, 8);
1168
} else if (level == 0) {
1169
level = SHOW_UBITS(re, &s->gb, 8) ; LAST_SKIP_BITS(re, &s->gb, 8);
1175
level= ((level*2+1)*qscale*quant_matrix[j])>>5;
1179
level= ((level*2+1)*qscale*quant_matrix[j])>>5;
1184
av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y);
1190
CLOSE_READER(re, &s->gb);
1192
s->block_last_index[n] = i;
1196
/* Also does unquantization here, since I will never support mpeg2
1198
static inline int mpeg2_decode_block_non_intra(MpegEncContext *s,
1202
int level, i, j, run;
1203
RLTable *rl = &rl_mpeg1;
1204
uint8_t * const scantable= s->intra_scantable.permutated;
1205
const uint16_t *quant_matrix;
1206
const int qscale= s->qscale;
1213
OPEN_READER(re, &s->gb);
1216
quant_matrix = s->inter_matrix;
1218
quant_matrix = s->chroma_inter_matrix;
1220
/* special case for the first coef. no need to add a second vlc table */
1221
UPDATE_CACHE(re, &s->gb);
1222
v= SHOW_UBITS(re, &s->gb, 2);
1224
LAST_SKIP_BITS(re, &s->gb, 2);
1225
level= (3*qscale*quant_matrix[0])>>5;
1233
/* now quantify & encode AC coefs */
1235
UPDATE_CACHE(re, &s->gb);
1236
GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2);
1240
} else if(level != 0) {
1243
level= ((level*2+1)*qscale*quant_matrix[j])>>5;
1244
level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
1245
LAST_SKIP_BITS(re, &s->gb, 1);
1248
run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6);
1249
UPDATE_CACHE(re, &s->gb);
1250
level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12);
1255
level= ((-level*2+1)*qscale*quant_matrix[j])>>5;
1258
level= ((level*2+1)*qscale*quant_matrix[j])>>5;
1262
av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y);
1269
CLOSE_READER(re, &s->gb);
1271
block[63] ^= (mismatch & 1);
1273
s->block_last_index[n] = i;
1277
static inline int mpeg2_decode_block_intra(MpegEncContext *s,
1281
int level, dc, diff, i, j, run;
1284
uint8_t * const scantable= s->intra_scantable.permutated;
1285
const uint16_t *quant_matrix;
1286
const int qscale= s->qscale;
1291
quant_matrix = s->intra_matrix;
1294
quant_matrix = s->chroma_intra_matrix;
1295
component = (n&1) + 1;
1297
diff = decode_dc(&s->gb, component);
1300
dc = s->last_dc[component];
1302
s->last_dc[component] = dc;
1303
block[0] = dc << (3 - s->intra_dc_precision);
1304
dprintf("dc=%d\n", block[0]);
1305
mismatch = block[0] ^ 1;
1307
if (s->intra_vlc_format)
1313
OPEN_READER(re, &s->gb);
1314
/* now quantify & encode AC coefs */
1316
UPDATE_CACHE(re, &s->gb);
1317
GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2);
1321
} else if(level != 0) {
1324
level= (level*qscale*quant_matrix[j])>>4;
1325
level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
1326
LAST_SKIP_BITS(re, &s->gb, 1);
1329
run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6);
1330
UPDATE_CACHE(re, &s->gb);
1331
level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12);
1335
level= (-level*qscale*quant_matrix[j])>>4;
1338
level= (level*qscale*quant_matrix[j])>>4;
1342
av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y);
1349
CLOSE_READER(re, &s->gb);
1351
block[63]^= mismatch&1;
1353
s->block_last_index[n] = i;
1357
1051
/* motion type (for mpeg2) */
1358
1052
#define MT_FIELD 1
1359
1053
#define MT_FRAME 2
1758
1481
/* modulo decoding */
1760
val = ((val + l)&(l*2-1)) - l;
1482
l= INT_BIT - 5 - shift;
1487
static inline int decode_dc(GetBitContext *gb, int component)
1491
if (component == 0) {
1492
code = get_vlc2(gb, dc_lum_vlc.table, DC_VLC_BITS, 2);
1494
code = get_vlc2(gb, dc_chroma_vlc.table, DC_VLC_BITS, 2);
1497
av_log(NULL, AV_LOG_ERROR, "invalid dc code at\n");
1503
diff = get_xbits(gb, code);
1508
static inline int mpeg1_decode_block_intra(MpegEncContext *s,
1512
int level, dc, diff, i, j, run;
1514
RLTable *rl = &rl_mpeg1;
1515
uint8_t * const scantable= s->intra_scantable.permutated;
1516
const uint16_t *quant_matrix= s->intra_matrix;
1517
const int qscale= s->qscale;
1520
component = (n <= 3 ? 0 : n - 4 + 1);
1521
diff = decode_dc(&s->gb, component);
1524
dc = s->last_dc[component];
1526
s->last_dc[component] = dc;
1528
dprintf("dc=%d diff=%d\n", dc, diff);
1531
OPEN_READER(re, &s->gb);
1532
/* now quantify & encode AC coefs */
1534
UPDATE_CACHE(re, &s->gb);
1535
GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
1539
} else if(level != 0) {
1542
level= (level*qscale*quant_matrix[j])>>4;
1544
level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
1545
LAST_SKIP_BITS(re, &s->gb, 1);
1548
run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6);
1549
UPDATE_CACHE(re, &s->gb);
1550
level = SHOW_SBITS(re, &s->gb, 8); SKIP_BITS(re, &s->gb, 8);
1551
if (level == -128) {
1552
level = SHOW_UBITS(re, &s->gb, 8) - 256; LAST_SKIP_BITS(re, &s->gb, 8);
1553
} else if (level == 0) {
1554
level = SHOW_UBITS(re, &s->gb, 8) ; LAST_SKIP_BITS(re, &s->gb, 8);
1560
level= (level*qscale*quant_matrix[j])>>4;
1564
level= (level*qscale*quant_matrix[j])>>4;
1569
av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y);
1575
CLOSE_READER(re, &s->gb);
1577
s->block_last_index[n] = i;
1581
static inline int mpeg1_decode_block_inter(MpegEncContext *s,
1585
int level, i, j, run;
1586
RLTable *rl = &rl_mpeg1;
1587
uint8_t * const scantable= s->intra_scantable.permutated;
1588
const uint16_t *quant_matrix= s->inter_matrix;
1589
const int qscale= s->qscale;
1592
OPEN_READER(re, &s->gb);
1594
/* special case for the first coef. no need to add a second vlc table */
1595
UPDATE_CACHE(re, &s->gb);
1596
if (((int32_t)GET_CACHE(re, &s->gb)) < 0) {
1597
level= (3*qscale*quant_matrix[0])>>5;
1599
if(GET_CACHE(re, &s->gb)&0x40000000)
1603
SKIP_BITS(re, &s->gb, 2);
1604
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
1608
/* now quantify & encode AC coefs */
1610
GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
1615
level= ((level*2+1)*qscale*quant_matrix[j])>>5;
1617
level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
1618
SKIP_BITS(re, &s->gb, 1);
1621
run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6);
1622
UPDATE_CACHE(re, &s->gb);
1623
level = SHOW_SBITS(re, &s->gb, 8); SKIP_BITS(re, &s->gb, 8);
1624
if (level == -128) {
1625
level = SHOW_UBITS(re, &s->gb, 8) - 256; SKIP_BITS(re, &s->gb, 8);
1626
} else if (level == 0) {
1627
level = SHOW_UBITS(re, &s->gb, 8) ; SKIP_BITS(re, &s->gb, 8);
1633
level= ((level*2+1)*qscale*quant_matrix[j])>>5;
1637
level= ((level*2+1)*qscale*quant_matrix[j])>>5;
1642
av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y);
1647
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
1649
UPDATE_CACHE(re, &s->gb);
1652
LAST_SKIP_BITS(re, &s->gb, 2);
1653
CLOSE_READER(re, &s->gb);
1655
s->block_last_index[n] = i;
1659
static inline int mpeg1_fast_decode_block_inter(MpegEncContext *s, DCTELEM *block, int n)
1661
int level, i, j, run;
1662
RLTable *rl = &rl_mpeg1;
1663
uint8_t * const scantable= s->intra_scantable.permutated;
1664
const int qscale= s->qscale;
1667
OPEN_READER(re, &s->gb);
1669
/* special case for the first coef. no need to add a second vlc table */
1670
UPDATE_CACHE(re, &s->gb);
1671
if (((int32_t)GET_CACHE(re, &s->gb)) < 0) {
1672
level= (3*qscale)>>1;
1674
if(GET_CACHE(re, &s->gb)&0x40000000)
1678
SKIP_BITS(re, &s->gb, 2);
1679
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
1683
/* now quantify & encode AC coefs */
1685
GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
1690
level= ((level*2+1)*qscale)>>1;
1692
level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
1693
SKIP_BITS(re, &s->gb, 1);
1696
run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6);
1697
UPDATE_CACHE(re, &s->gb);
1698
level = SHOW_SBITS(re, &s->gb, 8); SKIP_BITS(re, &s->gb, 8);
1699
if (level == -128) {
1700
level = SHOW_UBITS(re, &s->gb, 8) - 256; SKIP_BITS(re, &s->gb, 8);
1701
} else if (level == 0) {
1702
level = SHOW_UBITS(re, &s->gb, 8) ; SKIP_BITS(re, &s->gb, 8);
1708
level= ((level*2+1)*qscale)>>1;
1712
level= ((level*2+1)*qscale)>>1;
1718
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
1720
UPDATE_CACHE(re, &s->gb);
1723
LAST_SKIP_BITS(re, &s->gb, 2);
1724
CLOSE_READER(re, &s->gb);
1726
s->block_last_index[n] = i;
1731
static inline int mpeg2_decode_block_non_intra(MpegEncContext *s,
1735
int level, i, j, run;
1736
RLTable *rl = &rl_mpeg1;
1737
uint8_t * const scantable= s->intra_scantable.permutated;
1738
const uint16_t *quant_matrix;
1739
const int qscale= s->qscale;
1745
OPEN_READER(re, &s->gb);
1748
quant_matrix = s->inter_matrix;
1750
quant_matrix = s->chroma_inter_matrix;
1752
/* special case for the first coef. no need to add a second vlc table */
1753
UPDATE_CACHE(re, &s->gb);
1754
if (((int32_t)GET_CACHE(re, &s->gb)) < 0) {
1755
level= (3*qscale*quant_matrix[0])>>5;
1756
if(GET_CACHE(re, &s->gb)&0x40000000)
1761
SKIP_BITS(re, &s->gb, 2);
1762
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
1766
/* now quantify & encode AC coefs */
1768
GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
1773
level= ((level*2+1)*qscale*quant_matrix[j])>>5;
1774
level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
1775
SKIP_BITS(re, &s->gb, 1);
1778
run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6);
1779
UPDATE_CACHE(re, &s->gb);
1780
level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12);
1785
level= ((-level*2+1)*qscale*quant_matrix[j])>>5;
1788
level= ((level*2+1)*qscale*quant_matrix[j])>>5;
1792
av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y);
1798
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
1800
UPDATE_CACHE(re, &s->gb);
1803
LAST_SKIP_BITS(re, &s->gb, 2);
1804
CLOSE_READER(re, &s->gb);
1806
block[63] ^= (mismatch & 1);
1808
s->block_last_index[n] = i;
1812
static inline int mpeg2_fast_decode_block_non_intra(MpegEncContext *s,
1816
int level, i, j, run;
1817
RLTable *rl = &rl_mpeg1;
1818
uint8_t * const scantable= s->intra_scantable.permutated;
1819
const int qscale= s->qscale;
1820
OPEN_READER(re, &s->gb);
1823
/* special case for the first coef. no need to add a second vlc table */
1824
UPDATE_CACHE(re, &s->gb);
1825
if (((int32_t)GET_CACHE(re, &s->gb)) < 0) {
1826
level= (3*qscale)>>1;
1827
if(GET_CACHE(re, &s->gb)&0x40000000)
1831
SKIP_BITS(re, &s->gb, 2);
1832
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
1836
/* now quantify & encode AC coefs */
1838
GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
1843
level= ((level*2+1)*qscale)>>1;
1844
level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
1845
SKIP_BITS(re, &s->gb, 1);
1848
run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6);
1849
UPDATE_CACHE(re, &s->gb);
1850
level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12);
1855
level= ((-level*2+1)*qscale)>>1;
1858
level= ((level*2+1)*qscale)>>1;
1863
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
1865
UPDATE_CACHE(re, &s->gb);
1868
LAST_SKIP_BITS(re, &s->gb, 2);
1869
CLOSE_READER(re, &s->gb);
1870
s->block_last_index[n] = i;
1875
static inline int mpeg2_decode_block_intra(MpegEncContext *s,
1879
int level, dc, diff, i, j, run;
1882
uint8_t * const scantable= s->intra_scantable.permutated;
1883
const uint16_t *quant_matrix;
1884
const int qscale= s->qscale;
1889
quant_matrix = s->intra_matrix;
1892
quant_matrix = s->chroma_intra_matrix;
1893
component = (n&1) + 1;
1895
diff = decode_dc(&s->gb, component);
1898
dc = s->last_dc[component];
1900
s->last_dc[component] = dc;
1901
block[0] = dc << (3 - s->intra_dc_precision);
1902
dprintf("dc=%d\n", block[0]);
1903
mismatch = block[0] ^ 1;
1905
if (s->intra_vlc_format)
1911
OPEN_READER(re, &s->gb);
1912
/* now quantify & encode AC coefs */
1914
UPDATE_CACHE(re, &s->gb);
1915
GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
1919
} else if(level != 0) {
1922
level= (level*qscale*quant_matrix[j])>>4;
1923
level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
1924
LAST_SKIP_BITS(re, &s->gb, 1);
1927
run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6);
1928
UPDATE_CACHE(re, &s->gb);
1929
level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12);
1933
level= (-level*qscale*quant_matrix[j])>>4;
1936
level= (level*qscale*quant_matrix[j])>>4;
1940
av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y);
1947
CLOSE_READER(re, &s->gb);
1949
block[63]^= mismatch&1;
1951
s->block_last_index[n] = i;
1955
static inline int mpeg2_fast_decode_block_intra(MpegEncContext *s,
1959
int level, dc, diff, j, run;
1962
uint8_t * scantable= s->intra_scantable.permutated;
1963
const uint16_t *quant_matrix;
1964
const int qscale= s->qscale;
1968
quant_matrix = s->intra_matrix;
1971
quant_matrix = s->chroma_intra_matrix;
1972
component = (n&1) + 1;
1974
diff = decode_dc(&s->gb, component);
1977
dc = s->last_dc[component];
1979
s->last_dc[component] = dc;
1980
block[0] = dc << (3 - s->intra_dc_precision);
1981
if (s->intra_vlc_format)
1987
OPEN_READER(re, &s->gb);
1988
/* now quantify & encode AC coefs */
1990
UPDATE_CACHE(re, &s->gb);
1991
GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
1995
} else if(level != 0) {
1998
level= (level*qscale*quant_matrix[j])>>4;
1999
level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
2000
LAST_SKIP_BITS(re, &s->gb, 1);
2003
run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6);
2004
UPDATE_CACHE(re, &s->gb);
2005
level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12);
2009
level= (-level*qscale*quant_matrix[j])>>4;
2012
level= (level*qscale*quant_matrix[j])>>4;
2018
CLOSE_READER(re, &s->gb);
2021
s->block_last_index[n] = scantable - s->intra_scantable.permutated;
1764
2025
typedef struct Mpeg1Context {
1765
2026
MpegEncContext mpeg_enc_ctx;
1766
2027
int mpeg_enc_ctx_allocated; /* true if decoding context allocated */