39 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
40 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
41 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
42 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
43 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
44 0, 0, 0, 0, 0, 0, 4, 4, 5, 6,
45 7, 8, 9, 10, 12, 13, 15, 17, 20, 22,
46 25, 28, 32, 36, 40, 45, 50, 56, 63, 71,
47 80, 90,101,113,127,144,162,182,203,226,
49 255,255,255,255,255,255,255,255,255,255,255,255,255,
50 255,255,255,255,255,255,255,255,255,255,255,255,255,
51 255,255,255,255,255,255,255,255,255,255,255,255,255,
52 255,255,255,255,255,255,255,255,255,255,255,255,255,
55 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
56 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
57 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
58 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
59 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
60 0, 0, 0, 0, 0, 0, 2, 2, 2, 3,
61 3, 3, 3, 4, 4, 4, 6, 6, 7, 7,
62 8, 8, 9, 9, 10, 10, 11, 11, 12, 12,
63 13, 13, 14, 14, 15, 15, 16, 16, 17, 17,
65 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
66 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
67 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
68 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
71 {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
72 {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
73 {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
74 {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
75 {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
76 {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
77 {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
78 {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
79 {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
80 {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
81 {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
82 {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 1 },
83 {-1, 0, 0, 1 }, {-1, 0, 0, 1 }, {-1, 0, 0, 1 }, {-1, 0, 1, 1 }, {-1, 0, 1, 1 }, {-1, 1, 1, 1 },
84 {-1, 1, 1, 1 }, {-1, 1, 1, 1 }, {-1, 1, 1, 1 }, {-1, 1, 1, 2 }, {-1, 1, 1, 2 }, {-1, 1, 1, 2 },
85 {-1, 1, 1, 2 }, {-1, 1, 2, 3 }, {-1, 1, 2, 3 }, {-1, 2, 2, 3 }, {-1, 2, 2, 4 }, {-1, 2, 3, 4 },
86 {-1, 2, 3, 4 }, {-1, 3, 3, 5 }, {-1, 3, 4, 6 }, {-1, 3, 4, 6 }, {-1, 4, 5, 7 }, {-1, 4, 5, 8 },
87 {-1, 4, 6, 9 }, {-1, 5, 7,10 }, {-1, 6, 8,11 }, {-1, 6, 8,13 }, {-1, 7,10,14 }, {-1, 8,11,16 },
88 {-1, 9,12,18 }, {-1,10,13,20 }, {-1,11,15,23 }, {-1,13,17,25 },
89 {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
90 {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
91 {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
92 {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
93 {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
94 {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
95 {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
96 {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
97 {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
103 unsigned int qp,
int a,
int b,
106 const unsigned int index_a = qp +
a;
109 if (alpha ==0 || beta == 0)
return;
111 if( bS[0] < 4 || !intra ) {
125 unsigned int qp,
int a,
int b,
128 const unsigned int index_a = qp +
a;
131 if (alpha ==0 || beta == 0)
return;
133 if( bS[0] < 4 || !intra ) {
147 const int16_t bS[7],
int bsi,
148 int qp,
int a,
int b,
151 const unsigned int index_a = qp +
a;
154 if (alpha ==0 || beta == 0)
return;
156 if( bS[0] < 4 || !intra ) {
171 int bsi,
int qp,
int a,
174 const unsigned int index_a = qp +
a;
177 if (alpha ==0 || beta == 0)
return;
179 if( bS[0] < 4 || !intra ) {
181 tc[0] =
tc0_table[index_a][bS[0*bsi]] + 1;
182 tc[1] =
tc0_table[index_a][bS[1*bsi]] + 1;
183 tc[2] =
tc0_table[index_a][bS[2*bsi]] + 1;
184 tc[3] =
tc0_table[index_a][bS[3*bsi]] + 1;
193 unsigned int qp,
int a,
int b,
196 const unsigned int index_a = qp +
a;
199 if (alpha ==0 || beta == 0)
return;
201 if( bS[0] < 4 || !intra ) {
215 unsigned int qp,
int a,
int b,
218 const unsigned int index_a = qp +
a;
221 if (alpha ==0 || beta == 0)
return;
223 if( bS[0] < 4 || !intra ) {
240 unsigned int linesize,
241 unsigned int uvlinesize,
264 qp0 = (qp + qp0 + 1) >> 1;
265 qp1 = (qp + qp1 + 1) >> 1;
266 qpc0 = (qpc + qpc0 + 1) >> 1;
267 qpc1 = (qpc + qpc1 + 1) >> 1;
270 static const int16_t bS4[4] = {4,4,4,4};
271 static const int16_t bS3[4] = {3,3,3,3};
274 filter_mb_edgev( &img_y[4*0<<pixel_shift], linesize, bS4, qp0, a, b, h, 1);
276 filter_mb_edgev( &img_y[4*2<<pixel_shift], linesize, bS3, qp, a, b, h, 0);
278 filter_mb_edgeh( &img_y[4*0*linesize], linesize, bSH, qp1, a, b, h, 1);
282 filter_mb_edgev( &img_y[4*1<<pixel_shift], linesize, bS3, qp, a, b, h, 0);
283 filter_mb_edgev( &img_y[4*2<<pixel_shift], linesize, bS3, qp, a, b, h, 0);
284 filter_mb_edgev( &img_y[4*3<<pixel_shift], linesize, bS3, qp, a, b, h, 0);
286 filter_mb_edgeh( &img_y[4*0*linesize], linesize, bSH, qp1, a, b, h, 1);
295 filter_mb_edgev( &img_cb[4*0<<pixel_shift], linesize, bS4, qpc0, a, b, h, 1);
296 filter_mb_edgev( &img_cr[4*0<<pixel_shift], linesize, bS4, qpc0, a, b, h, 1);
299 filter_mb_edgev( &img_cb[4*2<<pixel_shift], linesize, bS3, qpc, a, b, h, 0);
300 filter_mb_edgev( &img_cr[4*2<<pixel_shift], linesize, bS3, qpc, a, b, h, 0);
302 filter_mb_edgeh( &img_cb[4*0*linesize], linesize, bSH, qpc1, a, b, h, 1 );
303 filter_mb_edgeh( &img_cr[4*0*linesize], linesize, bSH, qpc1, a, b, h, 1 );
305 filter_mb_edgeh( &img_cb[4*2*linesize], linesize, bS3, qpc, a, b, h, 0);
306 filter_mb_edgeh( &img_cr[4*2*linesize], linesize, bS3, qpc, a, b, h, 0);
308 filter_mb_edgev( &img_cb[4*1<<pixel_shift], linesize, bS3, qpc, a, b, h, 0);
309 filter_mb_edgev( &img_cr[4*1<<pixel_shift], linesize, bS3, qpc, a, b, h, 0);
310 filter_mb_edgev( &img_cb[4*2<<pixel_shift], linesize, bS3, qpc, a, b, h, 0);
311 filter_mb_edgev( &img_cr[4*2<<pixel_shift], linesize, bS3, qpc, a, b, h, 0);
312 filter_mb_edgev( &img_cb[4*3<<pixel_shift], linesize, bS3, qpc, a, b, h, 0);
313 filter_mb_edgev( &img_cr[4*3<<pixel_shift], linesize, bS3, qpc, a, b, h, 0);
315 filter_mb_edgeh( &img_cb[4*0*linesize], linesize, bSH, qpc1, a, b, h, 1);
316 filter_mb_edgeh( &img_cr[4*0*linesize], linesize, bSH, qpc1, a, b, h, 1);
318 filter_mb_edgeh( &img_cb[4*1*linesize], linesize, bS3, qpc, a, b, h, 0);
319 filter_mb_edgeh( &img_cr[4*1*linesize], linesize, bS3, qpc, a, b, h, 0);
320 filter_mb_edgeh( &img_cb[4*2*linesize], linesize, bS3, qpc, a, b, h, 0);
321 filter_mb_edgeh( &img_cr[4*2*linesize], linesize, bS3, qpc, a, b, h, 0);
322 filter_mb_edgeh( &img_cb[4*3*linesize], linesize, bS3, qpc, a, b, h, 0);
323 filter_mb_edgeh( &img_cr[4*3*linesize], linesize, bS3, qpc, a, b, h, 0);
327 filter_mb_edgecv(&img_cb[2*0<<pixel_shift], uvlinesize, bS4, qpc0, a, b, h, 1);
328 filter_mb_edgecv(&img_cr[2*0<<pixel_shift], uvlinesize, bS4, qpc0, a, b, h, 1);
330 filter_mb_edgecv(&img_cb[2*2<<pixel_shift], uvlinesize, bS3, qpc, a, b, h, 0);
331 filter_mb_edgecv(&img_cr[2*2<<pixel_shift], uvlinesize, bS3, qpc, a, b, h, 0);
333 filter_mb_edgech(&img_cb[4*0*uvlinesize], uvlinesize, bSH, qpc1, a, b, h, 1);
334 filter_mb_edgech(&img_cr[4*0*uvlinesize], uvlinesize, bSH, qpc1, a, b, h, 1);
336 filter_mb_edgech(&img_cb[4*1*uvlinesize], uvlinesize, bS3, qpc, a, b, h, 0);
337 filter_mb_edgech(&img_cr[4*1*uvlinesize], uvlinesize, bS3, qpc, a, b, h, 0);
338 filter_mb_edgech(&img_cb[4*2*uvlinesize], uvlinesize, bS3, qpc, a, b, h, 0);
339 filter_mb_edgech(&img_cr[4*2*uvlinesize], uvlinesize, bS3, qpc, a, b, h, 0);
340 filter_mb_edgech(&img_cb[4*3*uvlinesize], uvlinesize, bS3, qpc, a, b, h, 0);
341 filter_mb_edgech(&img_cr[4*3*uvlinesize], uvlinesize, bS3, qpc, a, b, h, 0);
344 filter_mb_edgecv( &img_cb[2*0<<pixel_shift], uvlinesize, bS4, qpc0, a, b, h, 1);
345 filter_mb_edgecv( &img_cr[2*0<<pixel_shift], uvlinesize, bS4, qpc0, a, b, h, 1);
347 filter_mb_edgecv( &img_cb[2*2<<pixel_shift], uvlinesize, bS3, qpc, a, b, h, 0);
348 filter_mb_edgecv( &img_cr[2*2<<pixel_shift], uvlinesize, bS3, qpc, a, b, h, 0);
350 filter_mb_edgech( &img_cb[2*0*uvlinesize], uvlinesize, bSH, qpc1, a, b, h, 1);
351 filter_mb_edgech( &img_cr[2*0*uvlinesize], uvlinesize, bSH, qpc1, a, b, h, 1);
353 filter_mb_edgech( &img_cb[2*2*uvlinesize], uvlinesize, bS3, qpc, a, b, h, 0);
354 filter_mb_edgech( &img_cr[2*2*uvlinesize], uvlinesize, bS3, qpc, a, b, h, 0);
361 if(
IS_8x8DCT(mb_type) && (h->
cbp&7) == 7 && !chroma444 ) {
363 AV_WN64A(bS[0][0], 0x0002000200020002ULL);
364 AV_WN64A(bS[0][2], 0x0002000200020002ULL);
365 AV_WN64A(bS[1][0], 0x0002000200020002ULL);
366 AV_WN64A(bS[1][2], 0x0002000200020002ULL);
368 int mask_edge1 = (3*(((5*mb_type)>>5)&1)) | (mb_type>>4);
369 int mask_edge0 = 3*((mask_edge1>>1) & ((5*left_type)>>5)&1);
370 int step = 1+(mb_type>>24);
371 edges = 4 - 3*((mb_type>>3) & !(h->
cbp & 15));
376 AV_WN64A(bS[0][0], 0x0004000400040004ULL);
380 #define FILTER(hv,dir,edge,intra)\
381 if(AV_RN64A(bS[dir][edge])) { \
382 filter_mb_edge##hv( &img_y[4*edge*(dir?linesize:1<<pixel_shift)], linesize, bS[dir][edge], edge ? qp : qp##dir, a, b, h, intra );\
385 filter_mb_edge##hv( &img_cb[4*edge*(dir?linesize:1<<pixel_shift)], linesize, bS[dir][edge], edge ? qpc : qpc##dir, a, b, h, intra );\
386 filter_mb_edge##hv( &img_cr[4*edge*(dir?linesize:1<<pixel_shift)], linesize, bS[dir][edge], edge ? qpc : qpc##dir, a, b, h, intra );\
387 } else if(!(edge&1)) {\
388 filter_mb_edgec##hv( &img_cb[2*edge*(dir?uvlinesize:1<<pixel_shift)], uvlinesize, bS[dir][edge], edge ? qpc : qpc##dir, a, b, h, intra );\
389 filter_mb_edgec##hv( &img_cr[2*edge*(dir?uvlinesize:1<<pixel_shift)], uvlinesize, bS[dir][edge], edge ? qpc : qpc##dir, a, b, h, intra );\
464 static av_always_inline void filter_mb_dir(
H264Context *h,
int mb_x,
int mb_y,
uint8_t *img_y,
uint8_t *img_cb,
uint8_t *img_cr,
unsigned int linesize,
unsigned int uvlinesize,
int mb_xy,
int mb_type,
int mvy_limit,
int first_vertical_edge_done,
int a,
int b,
int chroma,
int dir) {
467 int chroma_qp_avg[2];
470 const int mbm_xy = dir == 0 ? mb_xy -1 : h->
top_mb_xy;
474 static const uint8_t mask_edge_tab[2][8]={{0,3,3,3,1,1,1,1},
476 const int mask_edge = mask_edge_tab[dir][(mb_type>>3)&7];
477 const int edges = mask_edge== 3 && !(h->
cbp&15) ? 1 : 4;
482 if(mbm_type && !first_vertical_edge_done){
491 unsigned int tmp_linesize = 2 * linesize;
492 unsigned int tmp_uvlinesize = 2 * uvlinesize;
496 for(j=0; j<2; j++, mbn_xy += s->
mb_stride){
500 AV_WN64A(bS, 0x0003000300030003ULL);
510 for( i = 0; i < 4; i++ ) {
518 tprintf(s->
avctx,
"filter mb:%d/%d dir:%d edge:%d, QPy:%d ls:%d uvls:%d", mb_x, mb_y, dir, edge, qp, tmp_linesize, tmp_uvlinesize);
520 filter_mb_edgeh( &img_y[j*linesize], tmp_linesize, bS, qp, a, b, h, 0 );
525 filter_mb_edgeh (&img_cb[j*uvlinesize], tmp_uvlinesize, bS, chroma_qp_avg[0], a, b, h, 0);
526 filter_mb_edgeh (&img_cr[j*uvlinesize], tmp_uvlinesize, bS, chroma_qp_avg[1], a, b, h, 0);
528 filter_mb_edgech(&img_cb[j*uvlinesize], tmp_uvlinesize, bS, chroma_qp_avg[0], a, b, h, 0);
529 filter_mb_edgech(&img_cr[j*uvlinesize], tmp_uvlinesize, bS, chroma_qp_avg[1], a, b, h, 0);
538 AV_WN64A(bS, 0x0003000300030003ULL);
542 AV_WN64A(bS, 0x0004000400040004ULL);
548 AV_WN64A(bS, 0x0001000100010001ULL);
553 int bn_idx= b_idx - (dir ? 8:1);
555 bS[0] = bS[1] = bS[2] = bS[3] =
check_mv(h, 8 + 4, bn_idx, mvy_limit);
561 for( i = 0; i < 4; i++ ) {
562 int x = dir == 0 ? 0 : i;
563 int y = dir == 0 ? i : 0;
564 int b_idx= 8 + 4 + x + 8*y;
565 int bn_idx= b_idx - (dir ? 8:1);
573 bS[i] =
check_mv(h, b_idx, bn_idx, mvy_limit);
581 if(bS[0]+bS[1]+bS[2]+bS[3]){
584 tprintf(s->
avctx,
"filter mb:%d/%d dir:%d edge:%d, QPy:%d ls:%d uvls:%d", mb_x, mb_y, dir, edge, qp, linesize, uvlinesize);
592 filter_mb_edgev ( &img_cb[0], uvlinesize, bS, chroma_qp_avg[0], a, b, h, 1);
593 filter_mb_edgev ( &img_cr[0], uvlinesize, bS, chroma_qp_avg[1], a, b, h, 1);
595 filter_mb_edgecv( &img_cb[0], uvlinesize, bS, chroma_qp_avg[0], a, b, h, 1);
596 filter_mb_edgecv( &img_cr[0], uvlinesize, bS, chroma_qp_avg[1], a, b, h, 1);
603 filter_mb_edgeh ( &img_cb[0], uvlinesize, bS, chroma_qp_avg[0], a, b, h, 1);
604 filter_mb_edgeh ( &img_cr[0], uvlinesize, bS, chroma_qp_avg[1], a, b, h, 1);
606 filter_mb_edgech( &img_cb[0], uvlinesize, bS, chroma_qp_avg[0], a, b, h, 1);
607 filter_mb_edgech( &img_cr[0], uvlinesize, bS, chroma_qp_avg[1], a, b, h, 1);
616 for( edge = 1; edge < edges; edge++ ) {
619 const int deblock_edge = !
IS_8x8DCT(mb_type & (edge<<24));
621 if (!deblock_edge && (!chroma422 || dir == 0))
625 AV_WN64A(bS, 0x0003000300030003ULL);
630 if( edge & mask_edge ) {
634 else if( mask_par0 ) {
635 int b_idx= 8 + 4 + edge * (dir ? 8:1);
636 int bn_idx= b_idx - (dir ? 8:1);
638 bS[0] = bS[1] = bS[2] = bS[3] =
check_mv(h, b_idx, bn_idx, mvy_limit);
644 for( i = 0; i < 4; i++ ) {
645 int x = dir == 0 ? edge : i;
646 int y = dir == 0 ? i : edge;
647 int b_idx= 8 + 4 + x + 8*y;
648 int bn_idx= b_idx - (dir ? 8:1);
656 bS[i] =
check_mv(h, b_idx, bn_idx, mvy_limit);
660 if(bS[0]+bS[1]+bS[2]+bS[3] == 0)
669 tprintf(s->
avctx,
"filter mb:%d/%d dir:%d edge:%d, QPy:%d ls:%d uvls:%d", mb_x, mb_y, dir, edge, qp, linesize, uvlinesize);
677 }
else if( (edge&1) == 0 ) {
685 filter_mb_edgeh(&img_y[4*edge*linesize], linesize, bS, qp, a, b, h, 0);
691 filter_mb_edgeh(&img_y[4*edge*linesize], linesize, bS, qp, a, b, h, 0);
696 }
else if ((edge&1) == 0) {
711 int first_vertical_edge_done = 0;
730 int mb_qp, mbn0_qp, mbn1_qp;
732 first_vertical_edge_done = 1;
735 AV_WN64A(&bS[0], 0x0004000400040004ULL);
736 AV_WN64A(&bS[4], 0x0004000400040004ULL);
740 {3+4*0, 3+4*0, 3+4*0, 3+4*0, 3+4*1, 3+4*1, 3+4*1, 3+4*1},
741 {3+4*2, 3+4*2, 3+4*2, 3+4*2, 3+4*3, 3+4*3, 3+4*3, 3+4*3},
743 {3+4*0, 3+4*1, 3+4*2, 3+4*3, 3+4*0, 3+4*1, 3+4*2, 3+4*3},
744 {3+4*0, 3+4*1, 3+4*2, 3+4*3, 3+4*0, 3+4*1, 3+4*2, 3+4*3},
748 for( i = 0; i < 8; i++ ) {
768 qp[0] = ( mb_qp + mbn0_qp + 1 ) >> 1;
773 qp[1] = ( mb_qp + mbn1_qp + 1 ) >> 1;
780 tprintf(s->
avctx,
"filter mb:%d/%d MBAFF, QPy:%d/%d, QPb:%d/%d QPr:%d/%d ls:%d uvls:%d", mb_x, mb_y, qp[0], qp[1], bqp[0], bqp[1], rqp[0], rqp[1], linesize, uvlinesize);
823 for( dir = 0; dir < 2; dir++ )
824 filter_mb_dir(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, mb_xy, mb_type, mvy_limit, dir ? 0 : first_vertical_edge_done, a, b, chroma, dir);
826 filter_mb_dir(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, mb_xy, mb_type, mvy_limit, first_vertical_edge_done, a, b, chroma, 0);
827 filter_mb_dir(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, mb_xy, mb_type, mvy_limit, 0, a, b, chroma, 1);