Mercurial > libavcodec.hg
comparison h264_loopfilter.c @ 10910:7cecaa3a6b38 libavcodec
Move the qp check to skip the loop filter up.
| author | michael |
|---|---|
| date | Mon, 18 Jan 2010 00:20:44 +0000 |
| parents | f4cf3960b8c6 |
| children | 497929e9d912 |
comparison
equal
deleted
inserted
replaced
| 10909:f4cf3960b8c6 | 10910:7cecaa3a6b38 |
|---|---|
| 649 const int mvy_limit = IS_INTERLACED(mb_type) ? 2 : 4; | 649 const int mvy_limit = IS_INTERLACED(mb_type) ? 2 : 4; |
| 650 int first_vertical_edge_done = 0; | 650 int first_vertical_edge_done = 0; |
| 651 av_unused int dir; | 651 av_unused int dir; |
| 652 int list; | 652 int list; |
| 653 | 653 |
| 654 //for sufficiently low qp, filtering wouldn't do anything | |
| 655 //this is a conservative estimate: could also check beta_offset and more accurate chroma_qp | |
| 656 if(!FRAME_MBAFF){ | |
| 657 int qp_thresh = h->qp_thresh; | |
| 658 int qp = s->current_picture.qscale_table[mb_xy]; | |
| 659 if(qp <= qp_thresh | |
| 660 && (mb_x == 0 || ((qp + s->current_picture.qscale_table[mb_xy-1] + 1)>>1) <= qp_thresh) | |
| 661 && (h->top_mb_xy < 0 || ((qp + s->current_picture.qscale_table[h->top_mb_xy] + 1)>>1) <= qp_thresh)){ | |
| 662 return; | |
| 663 } | |
| 664 } | |
| 665 // CAVLC 8x8dct requires NNZ values for residual decoding that differ from what the loop filter needs | 654 // CAVLC 8x8dct requires NNZ values for residual decoding that differ from what the loop filter needs |
| 666 if(!h->pps.cabac && h->pps.transform_8x8_mode){ | 655 if(!h->pps.cabac && h->pps.transform_8x8_mode){ |
| 667 int top_type, left_type[2]; | 656 int top_type, left_type[2]; |
| 668 top_type = s->current_picture.mb_type[h->top_mb_xy] ; | 657 top_type = s->current_picture.mb_type[h->top_mb_xy] ; |
| 669 left_type[0] = s->current_picture.mb_type[h->left_mb_xy[0]]; | 658 left_type[0] = s->current_picture.mb_type[h->left_mb_xy[0]]; |
