39 #define MB_INTRA_VLC_BITS 9
44 static const int offset_table2[9] = { 0, 1, 3, 7, 15, 31, 63, 127, 255 };
70 int topleft_mb_pos, top_mb_pos;
71 int stride_y, fieldtx = 0;
87 v_dist = (16 - fieldtx) >> (fieldtx == 0);
112 v_dist = fieldtx ? 15 : 8;
134 #define inc_blk_idx(idx) do { \
136 if (idx >= v->n_allocated_blks) \
157 #define GET_MQUANT() \
158 if (v->dquantfrm) { \
160 if (v->dqprofile == DQPROFILE_ALL_MBS) { \
161 if (v->dqbilevel) { \
162 mquant = (get_bits1(gb)) ? v->altpq : v->pq; \
164 mqdiff = get_bits(gb, 3); \
166 mquant = v->pq + mqdiff; \
168 mquant = get_bits(gb, 5); \
171 if (v->dqprofile == DQPROFILE_SINGLE_EDGE) \
172 edges = 1 << v->dqsbedge; \
173 else if (v->dqprofile == DQPROFILE_DOUBLE_EDGES) \
174 edges = (3 << v->dqsbedge) % 15; \
175 else if (v->dqprofile == DQPROFILE_FOUR_EDGES) \
177 if ((edges&1) && !s->mb_x) \
179 if ((edges&2) && s->first_slice_line) \
181 if ((edges&4) && s->mb_x == (s->mb_width - 1)) \
183 if ((edges&8) && s->mb_y == (s->mb_height - 1)) \
185 if (!mquant || mquant > 31) { \
186 av_log(v->s.avctx, AV_LOG_ERROR, \
187 "Overriding invalid mquant %d\n", mquant); \
199 #define GET_MVDATA(_dmv_x, _dmv_y) \
200 index = 1 + get_vlc2(gb, ff_vc1_mv_diff_vlc[s->mv_table_index].table, \
201 VC1_MV_DIFF_VLC_BITS, 2); \
209 _dmv_x = _dmv_y = 0; \
210 } else if (index == 35) { \
211 _dmv_x = get_bits(gb, v->k_x - 1 + s->quarter_sample); \
212 _dmv_y = get_bits(gb, v->k_y - 1 + s->quarter_sample); \
213 } else if (index == 36) { \
218 index1 = index % 6; \
219 if (!s->quarter_sample && index1 == 5) val = 1; \
221 if (size_table[index1] - val > 0) \
222 val = get_bits(gb, size_table[index1] - val); \
224 sign = 0 - (val&1); \
225 _dmv_x = (sign ^ ((val>>1) + offset_table[index1])) - sign; \
227 index1 = index / 6; \
228 if (!s->quarter_sample && index1 == 5) val = 1; \
230 if (size_table[index1] - val > 0) \
231 val = get_bits(gb, size_table[index1] - val); \
233 sign = 0 - (val & 1); \
234 _dmv_y = (sign ^ ((val >> 1) + offset_table[index1])) - sign; \
238 int *dmv_y,
int *pred_flag)
241 int extend_x = 0, extend_y = 0;
262 extend_x = extend_y = 1;
271 *pred_flag = *dmv_y & 1;
272 *dmv_y = (*dmv_y + *pred_flag) >> 1;
274 *dmv_y = (*dmv_y + (*dmv_y & 1)) >> 1;
284 index1 = (index + 1) % 9;
286 val =
get_bits(gb, index1 + extend_x);
288 *dmv_x = (sign ^ ((val >> 1) + offs_tab[index1])) - sign;
295 index1 = (index + 1) / 9;
298 sign = 0 - (val & 1);
299 *dmv_y = (sign ^ ((val >> 1) + offs_tab[index1 >> v->
numref])) - sign;
302 if (v->
numref && pred_flag)
303 *pred_flag = index1 & 1;
310 int direct,
int mode)
336 int16_t **dc_val_ptr,
int *dir_ptr)
340 static const uint16_t dcpred[32] = {
341 -1, 1024, 512, 341, 256, 205, 171, 146, 128,
342 114, 102, 93, 85, 79, 73, 68, 64,
343 60, 57, 54, 51, 49, 47, 45, 43,
344 41, 39, 38, 37, 35, 34, 33
358 b = dc_val[ - 1 -
wrap];
361 if (pq < 9 || !overlap) {
364 b = a = dcpred[scale];
365 if (s->
mb_x == 0 && (n != 1 && n != 3))
366 b = c = dcpred[scale];
371 if (s->
mb_x == 0 && (n != 1 && n != 3))
375 if (abs(a - b) <= abs(b - c)) {
384 *dc_val_ptr = &dc_val[0];
401 int a_avail,
int c_avail,
402 int16_t **dc_val_ptr,
int *dir_ptr)
417 b = dc_val[ - 1 -
wrap];
422 if (dqscale_index < 0)
424 if (c_avail && (n != 1 && n != 3)) {
429 if (a_avail && (n != 2 && n != 3)) {
434 if (a_avail && c_avail && (n != 3)) {
445 if (a_avail && c_avail) {
446 if (abs(a - b) <= abs(b - c)) {
453 }
else if (a_avail) {
456 }
else if (c_avail) {
465 *dc_val_ptr = &dc_val[0];
514 int *
value,
int codingset)
580 int coded,
int codingset)
587 int16_t *ac_val, *ac_val2;
601 if (dcdiff == 119 ) {
604 else if (v->
pq == 2) dcdiff =
get_bits(gb, 9);
608 dcdiff = (dcdiff << 2) +
get_bits(gb, 2) - 3;
610 dcdiff = (dcdiff << 1) +
get_bits1(gb) - 1;
635 int last = 0, skip,
value;
662 block[zz_table[i++]] =
value;
668 for (k = 1; k < 8; k++)
671 for (k = 1; k < 8; k++)
676 for (k = 1; k < 8; k++) {
682 for (k = 1; k < 64; k++)
686 block[k] += (block[k] < 0) ? -v->
pq : v->
pq;
700 memset(ac_val2, 0, 16 * 2);
704 memcpy(ac_val2, ac_val, 8 * 2);
708 memcpy(ac_val2 + 8, ac_val + 8, 8 * 2);
714 for (k = 1; k < 8; k++) {
720 for (k = 1; k < 8; k++) {
721 block[k << v->
top_blk_sh] = ac_val[k + 8] * scale;
743 int coded,
int codingset,
int mquant)
749 int16_t *dc_val = NULL;
750 int16_t *ac_val, *ac_val2;
769 if (dcdiff == 119 ) {
771 if (mquant == 1) dcdiff =
get_bits(gb, 10);
772 else if (mquant == 2) dcdiff =
get_bits(gb, 9);
776 dcdiff = (dcdiff << 2) +
get_bits(gb, 2) - 3;
777 else if (mquant == 2)
778 dcdiff = (dcdiff << 1) +
get_bits1(gb) - 1;
799 if (!a_avail && !c_avail)
804 scale = mquant * 2 + ((mquant == v->
pq) ? v->
halfpq : 0);
812 if ( dc_pred_dir && c_avail && mb_pos)
814 if (!dc_pred_dir && a_avail && mb_pos >= s->
mb_stride)
816 if ( dc_pred_dir && n == 1)
818 if (!dc_pred_dir && n == 2)
824 int last = 0, skip,
value;
849 block[zz_table[i++]] =
value;
855 if (q2 && q1 != q2) {
856 q1 = q1 * 2 + ((q1 == v->
pq) ? v->
halfpq : 0) - 1;
857 q2 = q2 * 2 + ((q2 == v->
pq) ? v->
halfpq : 0) - 1;
862 for (k = 1; k < 8; k++)
865 for (k = 1; k < 8; k++)
870 for (k = 1; k < 8; k++)
873 for (k = 1; k < 8; k++)
879 for (k = 1; k < 8; k++) {
885 for (k = 1; k < 64; k++)
889 block[k] += (block[k] < 0) ? -mquant : mquant;
892 if (use_pred) i = 63;
896 memset(ac_val2, 0, 16 * 2);
899 memcpy(ac_val2, ac_val, 8 * 2);
900 if (q2 && q1 != q2) {
901 q1 = q1 * 2 + ((q1 == v->
pq) ? v->
halfpq : 0) - 1;
902 q2 = q2 * 2 + ((q2 == v->
pq) ? v->
halfpq : 0) - 1;
905 for (k = 1; k < 8; k++)
906 ac_val2[k] = (ac_val2[k] * q2 *
ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18;
911 memcpy(ac_val2 + 8, ac_val + 8, 8 * 2);
912 if (q2 && q1 != q2) {
913 q1 = q1 * 2 + ((q1 == v->
pq) ? v->
halfpq : 0) - 1;
914 q2 = q2 * 2 + ((q2 == v->
pq) ? v->
halfpq : 0) - 1;
917 for (k = 1; k < 8; k++)
918 ac_val2[k + 8] = (ac_val2[k + 8] * q2 *
ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18;
926 for (k = 1; k < 8; k++) {
932 for (k = 1; k < 8; k++) {
933 block[k << v->
top_blk_sh] = ac_val2[k + 8] * scale;
955 int coded,
int mquant,
int codingset)
961 int16_t *dc_val = NULL;
962 int16_t *ac_val, *ac_val2;
973 mquant = (mquant < 1) ? 0 : ((mquant > 31) ? 31 : mquant);
990 if (dcdiff == 119 ) {
992 if (mquant == 1) dcdiff =
get_bits(gb, 10);
993 else if (mquant == 2) dcdiff =
get_bits(gb, 9);
997 dcdiff = (dcdiff << 2) +
get_bits(gb, 2) - 3;
998 else if (mquant == 2)
999 dcdiff = (dcdiff << 1) +
get_bits1(gb) - 1;
1021 if (!a_avail) dc_pred_dir = 1;
1022 if (!c_avail) dc_pred_dir = 0;
1023 if (!a_avail && !c_avail) use_pred = 0;
1027 scale = mquant * 2 + v->
halfpq;
1035 if (dc_pred_dir && c_avail && mb_pos)
1037 if (!dc_pred_dir && a_avail && mb_pos >= s->
mb_stride)
1039 if ( dc_pred_dir && n == 1)
1041 if (!dc_pred_dir && n == 2)
1043 if (n == 3) q2 = q1;
1046 int last = 0, skip,
value;
1071 if (q2 && q1 != q2) {
1072 q1 = q1 * 2 + ((q1 == v->
pq) ? v->
halfpq : 0) - 1;
1073 q2 = q2 * 2 + ((q2 == v->
pq) ? v->
halfpq : 0) - 1;
1078 for (k = 1; k < 8; k++)
1081 for (k = 1; k < 8; k++)
1086 for (k = 1; k < 8; k++)
1089 for (k = 1; k < 8; k++)
1095 for (k = 1; k < 8; k++) {
1101 for (k = 1; k < 64; k++)
1105 block[k] += (block[k] < 0) ? -mquant : mquant;
1108 if (use_pred) i = 63;
1112 memset(ac_val2, 0, 16 * 2);
1115 memcpy(ac_val2, ac_val, 8 * 2);
1116 if (q2 && q1 != q2) {
1117 q1 = q1 * 2 + ((q1 == v->
pq) ? v->
halfpq : 0) - 1;
1118 q2 = q2 * 2 + ((q2 == v->
pq) ? v->
halfpq : 0) - 1;
1121 for (k = 1; k < 8; k++)
1122 ac_val2[k] = (ac_val2[k] * q2 *
ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18;
1127 memcpy(ac_val2 + 8, ac_val + 8, 8 * 2);
1128 if (q2 && q1 != q2) {
1129 q1 = q1 * 2 + ((q1 == v->
pq) ? v->
halfpq : 0) - 1;
1130 q2 = q2 * 2 + ((q2 == v->
pq) ? v->
halfpq : 0) - 1;
1133 for (k = 1; k < 8; k++)
1134 ac_val2[k + 8] = (ac_val2[k + 8] * q2 *
ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18;
1142 for (k = 1; k < 8; k++) {
1148 for (k = 1; k < 8; k++) {
1149 block[k << v->
top_blk_sh] = ac_val2[k + 8] * scale;
1165 int mquant,
int ttmb,
int first_block,
1166 uint8_t *dst,
int linesize,
int skip_block,
1173 int scale, off, idx, last, skip,
value;
1174 int ttblk = ttmb & 7;
1186 && ((v->
ttmbf || (ttmb != -1 && (ttmb & 8) && !first_block))
1196 scale = 2 * mquant + ((v->
pq == mquant) ? v->
halfpq : 0);
1221 block[idx] = value * scale;
1223 block[idx] += (block[idx] < 0) ? -mquant : mquant;
1235 pat = ~subblkpat & 0xF;
1236 for (j = 0; j < 4; j++) {
1237 last = subblkpat & (1 << (3 - j));
1239 off = (j & 1) * 4 + (j & 2) * 16;
1249 block[idx + off] = value * scale;
1251 block[idx + off] += (block[idx + off] < 0) ? -mquant : mquant;
1253 if (!(subblkpat & (1 << (3 - j))) && !skip_block) {
1262 pat = ~((subblkpat & 2) * 6 + (subblkpat & 1) * 3) & 0xF;
1263 for (j = 0; j < 2; j++) {
1264 last = subblkpat & (1 << (1 - j));
1273 idx = v->
zz_8x4[i++] + off;
1276 block[idx] = value * scale;
1278 block[idx] += (block[idx] < 0) ? -mquant : mquant;
1280 if (!(subblkpat & (1 << (1 - j))) && !skip_block) {
1289 pat = ~(subblkpat * 5) & 0xF;
1290 for (j = 0; j < 2; j++) {
1291 last = subblkpat & (1 << (1 - j));
1300 idx = v->
zz_4x8[i++] + off;
1303 block[idx] = value * scale;
1305 block[idx] += (block[idx] < 0) ? -mquant : mquant;
1307 if (!(subblkpat & (1 << (1 - j))) && !skip_block) {
1317 *ttmb_out |= ttblk << (n * 4);
1336 int ttmb = v->
ttfrm;
1338 int mb_has_coeffs = 1;
1342 int first_block = 1;
1344 int skipped, fourmv;
1345 int block_cbp = 0, pat, block_tt = 0, block_intra = 0;
1370 if (s->
mb_intra && !mb_has_coeffs) {
1374 }
else if (mb_has_coeffs) {
1390 for (i = 0; i < 6; i++) {
1393 val = ((cbp >> (5 - i)) & 1);
1394 off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->
linesize);
1401 if (i == 1 || i == 3 || s->
mb_x)
1410 for (j = 0; j < 64; j++)
1411 s->
block[i][j] <<= 1;
1413 s->
dest[dst_idx] + off,
1422 block_cbp |= 0xF << (i << 2);
1423 block_intra |= 1 << i;
1428 block_cbp |= pat << (i << 2);
1429 if (!v->
ttmbf && ttmb < 8)
1436 for (i = 0; i < 6; i++) {
1447 int intra_count = 0, coded_inter = 0;
1448 int is_intra[6], is_coded[6];
1451 for (i = 0; i < 6; i++) {
1452 val = ((cbp >> (5 - i)) & 1);
1467 is_coded[i] = mb_has_coeffs;
1470 is_intra[i] = (intra_count >= 3);
1477 coded_inter = !is_intra[i] & is_coded[i];
1481 if (!intra_count && !coded_inter)
1488 for (i = 0; i < 6; i++)
1501 if (!v->
ttmbf && coded_inter)
1503 for (i = 0; i < 6; i++) {
1505 off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->
linesize);
1512 if (i == 1 || i == 3 || s->
mb_x)
1521 for (j = 0; j < 64; j++)
1522 s->
block[i][j] <<= 1;
1524 s->
dest[dst_idx] + off,
1533 block_cbp |= 0xF << (i << 2);
1534 block_intra |= 1 << i;
1535 }
else if (is_coded[i]) {
1537 first_block, s->
dest[dst_idx] + off,
1541 block_cbp |= pat << (i << 2);
1542 if (!v->
ttmbf && ttmb < 8)
1550 for (i = 0; i < 6; i++) {
1554 for (i = 0; i < 4; i++) {
1580 int ttmb = v->
ttfrm;
1582 int mb_has_coeffs = 1;
1585 int first_block = 1;
1587 int skipped, fourmv = 0, twomv = 0;
1588 int block_cbp = 0, pat, block_tt = 0;
1589 int idx_mbmode = 0, mvbp;
1590 int stride_y, fieldtx;
1634 for (i = 0; i < 4; i++) {
1652 for (i = 0; i < 6; i++) {
1657 val = ((cbp >> (5 - i)) & 1);
1660 if (i == 1 || i == 3 || s->
mb_x)
1669 off = (fieldtx) ? ((i & 1) * 8) + ((i & 2) >> 1) * s->
linesize : (i & 1) * 8 + 4 * (i & 2) * s->
linesize;
1675 s->
dest[dst_idx] + off,
1693 for (i = 0; i < 6; i++)
1700 for (i = 0; i < 6; i++) {
1703 val = ((mvbp >> (3 - i)) & 1);
1709 }
else if (i == 4) {
1742 if (!v->
ttmbf && cbp)
1744 for (i = 0; i < 6; i++) {
1747 val = ((cbp >> (5 - i)) & 1);
1749 off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->
linesize);
1751 off = (i & 4) ? 0 : ((i & 1) * 8 + ((i > 1) * s->
linesize));
1754 first_block, s->
dest[dst_idx] + off,
1757 block_cbp |= pat << (i << 2);
1758 if (!v->
ttmbf && ttmb < 8)
1766 for (i = 0; i < 6; i++) {
1792 int ttmb = v->
ttfrm;
1794 int mb_has_coeffs = 1;
1797 int first_block = 1;
1800 int block_cbp = 0, pat, block_tt = 0;
1806 if (idx_mbmode <= 1) {
1818 mb_has_coeffs = idx_mbmode & 1;
1822 for (i = 0; i < 6; i++) {
1827 val = ((cbp >> (5 - i)) & 1);
1830 if (i == 1 || i == 3 || s->
mb_x)
1838 off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->
linesize);
1840 s->
dest[dst_idx] + off,
1849 if (idx_mbmode <= 5) {
1850 dmv_x = dmv_y = pred_flag = 0;
1851 if (idx_mbmode & 1) {
1856 mb_has_coeffs = !(idx_mbmode & 2);
1859 for (i = 0; i < 6; i++) {
1861 dmv_x = dmv_y = pred_flag = 0;
1862 val = ((v->
fourmvbp >> (3 - i)) & 1);
1871 mb_has_coeffs = idx_mbmode & 1;
1879 if (!v->
ttmbf && cbp) {
1883 for (i = 0; i < 6; i++) {
1886 val = ((cbp >> (5 - i)) & 1);
1887 off = (i & 4) ? 0 : (i & 1) * 8 + (i & 2) * 4 * s->
linesize;
1890 first_block, s->
dest[dst_idx] + off,
1894 block_cbp |= pat << (i << 2);
1895 if (!v->
ttmbf && ttmb < 8) ttmb = -1;
1915 int ttmb = v->
ttfrm;
1916 int mb_has_coeffs = 0;
1919 int first_block = 1;
1921 int skipped, direct;
1922 int dmv_x[2], dmv_y[2];
1937 dmv_x[0] = dmv_x[1] = dmv_y[0] = dmv_y[1] = 0;
1938 for (i = 0; i < 6; i++) {
1947 dmv_x[1] = dmv_x[0];
1948 dmv_y[1] = dmv_y[0];
1961 dmv_x[0] = dmv_y[0] = 0;
1965 for (i = 0; i < 6; i++)
1972 vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);
1982 dmv_x[0] = dmv_y[0] = dmv_x[1] = dmv_y[1] = 0;
1984 vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);
1986 if (!mb_has_coeffs && !s->
mb_intra) {
1989 vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);
1992 if (s->
mb_intra && !mb_has_coeffs) {
2001 if (!mb_has_coeffs) {
2004 vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);
2010 vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);
2022 for (i = 0; i < 6; i++) {
2025 val = ((cbp >> (5 - i)) & 1);
2026 off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->
linesize);
2033 if (i == 1 || i == 3 || s->
mb_x)
2042 for (j = 0; j < 64; j++)
2043 s->
block[i][j] <<= 1;
2045 s->
dest[dst_idx] + off,
2050 first_block, s->
dest[dst_idx] + off,
2053 if (!v->
ttmbf && ttmb < 8)
2070 int ttmb = v->
ttfrm;
2071 int mb_has_coeffs = 0;
2073 int first_block = 1;
2076 int dmv_x[2], dmv_y[2], pred_flag[2];
2084 if (idx_mbmode <= 1) {
2096 mb_has_coeffs = idx_mbmode & 1;
2100 for (i = 0; i < 6; i++) {
2105 val = ((cbp >> (5 - i)) & 1);
2108 if (i == 1 || i == 3 || s->
mb_x)
2117 for (j = 0; j < 64; j++)
2118 s->
block[i][j] <<= 1;
2119 off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->
linesize);
2121 s->
dest[dst_idx] + off,
2134 if (idx_mbmode <= 5) {
2136 dmv_x[0] = dmv_x[1] = dmv_y[0] = dmv_y[1] = 0;
2137 pred_flag[0] = pred_flag[1] = 0;
2162 dmv_x[0] = dmv_y[0] = pred_flag[0] = 0;
2163 dmv_x[1] = dmv_y[1] = pred_flag[0] = 0;
2171 mb_has_coeffs = !(idx_mbmode & 2);
2177 for (i = 0; i < 6; i++) {
2179 dmv_x[0] = dmv_y[0] = pred_flag[0] = 0;
2180 dmv_x[1] = dmv_y[1] = pred_flag[1] = 0;
2181 val = ((v->
fourmvbp >> (3 - i)) & 1);
2192 mb_has_coeffs = idx_mbmode & 1;
2200 if (!v->
ttmbf && cbp) {
2204 for (i = 0; i < 6; i++) {
2207 val = ((cbp >> (5 - i)) & 1);
2208 off = (i & 4) ? 0 : (i & 1) * 8 + (i & 2) * 4 * s->
linesize;
2211 first_block, s->
dest[dst_idx] + off,
2214 if (!v->
ttmbf && ttmb < 8)
2232 int ttmb = v->
ttfrm;
2234 int mb_has_coeffs = 1;
2237 int first_block = 1;
2239 int skipped, direct, twomv = 0;
2240 int block_cbp = 0, pat, block_tt = 0;
2241 int idx_mbmode = 0, mvbp;
2242 int stride_y, fieldtx;
2288 for (i = 1; i < 4; i += 2) {
2295 for (i = 1; i < 4; i++) {
2305 for (i = 0; i < 4; i++) {
2325 for (i = 0; i < 6; i++) {
2330 val = ((cbp >> (5 - i)) & 1);
2333 if (i == 1 || i == 3 || s->
mb_x)
2343 off = (fieldtx) ? ((i & 1) * 8) + ((i & 2) >> 1) * s->
linesize : (i & 1) * 8 + 4 * (i & 2) * s->
linesize;
2349 s->
dest[dst_idx] + off,
2385 for (i = 0; i < 6; i++)
2392 for (i = 0; i < 4; i++) {
2404 for (i = 0; i < 4; i++) {
2407 val = ((mvbp >> (3 - i)) & 1);
2450 for (i = 0; i < 2; i++) {
2480 for (i = 0; i < 2; i++) {
2490 if (!v->
ttmbf && cbp)
2492 for (i = 0; i < 6; i++) {
2495 val = ((cbp >> (5 - i)) & 1);
2497 off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->
linesize);
2499 off = (i & 4) ? 0 : ((i & 1) * 8 + ((i > 1) * s->
linesize));
2502 first_block, s->
dest[dst_idx] + off,
2505 block_cbp |= pat << (i << 2);
2506 if (!v->
ttmbf && ttmb < 8)
2514 for (i = 0; i < 6; i++) {
2536 for (i = 0; i < 2; i++) {
2548 for (i = 0; i < 2; i++) {
2618 dst[0] = s->
dest[0];
2619 dst[1] = dst[0] + 8;
2621 dst[3] = dst[2] + 8;
2622 dst[4] = s->
dest[1];
2623 dst[5] = s->
dest[2];
2635 for (k = 0; k < 6; k++) {
2636 val = ((cbp >> (5 - k)) & 1);
2643 cbp |= val << (5 - k);
2652 for (j = 0; j < 64; j++)
2653 s->
block[k][j] <<= 1;
2659 for (j = 0; j < 64; j++)
2794 for (k = 0; k < 6; k++) {
2795 val = ((cbp >> (5 - k)) & 1);
2802 cbp |= val << (5 - k);
2913 if (apply_loop_filter) {