comparison h264.c @ 6655:22cca5d3173a libavcodec

Implement FFMAX3(a,b,c) - maximum over three arguments.
author voroshil
date Sat, 19 Apr 2008 17:07:58 +0000
parents e226f34ca284
children 5df0c730234d
comparison
equal deleted inserted replaced
6654:603c780be9ff 6655:22cca5d3173a
6500 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31}; 6500 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
6501 6501
6502 //for sufficiently low qp, filtering wouldn't do anything 6502 //for sufficiently low qp, filtering wouldn't do anything
6503 //this is a conservative estimate: could also check beta_offset and more accurate chroma_qp 6503 //this is a conservative estimate: could also check beta_offset and more accurate chroma_qp
6504 if(!FRAME_MBAFF){ 6504 if(!FRAME_MBAFF){
6505 int qp_thresh = 15 - h->slice_alpha_c0_offset - FFMAX(0, FFMAX(h->pps.chroma_qp_index_offset[0], h->pps.chroma_qp_index_offset[1])); 6505 int qp_thresh = 15 - h->slice_alpha_c0_offset - FFMAX3(0, h->pps.chroma_qp_index_offset[0], h->pps.chroma_qp_index_offset[1]);
6506 int qp = s->current_picture.qscale_table[mb_xy]; 6506 int qp = s->current_picture.qscale_table[mb_xy];
6507 if(qp <= qp_thresh 6507 if(qp <= qp_thresh
6508 && (mb_x == 0 || ((qp + s->current_picture.qscale_table[mb_xy-1] + 1)>>1) <= qp_thresh) 6508 && (mb_x == 0 || ((qp + s->current_picture.qscale_table[mb_xy-1] + 1)>>1) <= qp_thresh)
6509 && (mb_y == 0 || ((qp + s->current_picture.qscale_table[h->top_mb_xy] + 1)>>1) <= qp_thresh)){ 6509 && (mb_y == 0 || ((qp + s->current_picture.qscale_table[h->top_mb_xy] + 1)>>1) <= qp_thresh)){
6510 return; 6510 return;