Mercurial > libavcodec.hg
comparison h264.c @ 3029:7a92269a3ccd libavcodec
tweak h264_biweight
author | lorenm |
---|---|
date | Mon, 09 Jan 2006 03:38:37 +0000 |
parents | 1fadd4c26175 |
children | 0b546eab515d |
comparison
equal
deleted
inserted
replaced
3028:1fadd4c26175 | 3029:7a92269a3ccd |
---|---|
2707 x_offset, y_offset, qpix_put, chroma_put); | 2707 x_offset, y_offset, qpix_put, chroma_put); |
2708 | 2708 |
2709 if(h->use_weight == 2){ | 2709 if(h->use_weight == 2){ |
2710 int weight0 = h->implicit_weight[refn0][refn1]; | 2710 int weight0 = h->implicit_weight[refn0][refn1]; |
2711 int weight1 = 64 - weight0; | 2711 int weight1 = 64 - weight0; |
2712 luma_weight_avg( dest_y, tmp_y, s-> linesize, 5, weight0, weight1, 0, 0); | 2712 luma_weight_avg( dest_y, tmp_y, s-> linesize, 5, weight0, weight1, 0); |
2713 chroma_weight_avg(dest_cb, tmp_cb, s->uvlinesize, 5, weight0, weight1, 0, 0); | 2713 chroma_weight_avg(dest_cb, tmp_cb, s->uvlinesize, 5, weight0, weight1, 0); |
2714 chroma_weight_avg(dest_cr, tmp_cr, s->uvlinesize, 5, weight0, weight1, 0, 0); | 2714 chroma_weight_avg(dest_cr, tmp_cr, s->uvlinesize, 5, weight0, weight1, 0); |
2715 }else{ | 2715 }else{ |
2716 luma_weight_avg(dest_y, tmp_y, s->linesize, h->luma_log2_weight_denom, | 2716 luma_weight_avg(dest_y, tmp_y, s->linesize, h->luma_log2_weight_denom, |
2717 h->luma_weight[0][refn0], h->luma_weight[1][refn1], | 2717 h->luma_weight[0][refn0], h->luma_weight[1][refn1], |
2718 h->luma_offset[0][refn0], h->luma_offset[1][refn1]); | 2718 h->luma_offset[0][refn0] + h->luma_offset[1][refn1]); |
2719 chroma_weight_avg(dest_cb, tmp_cb, s->uvlinesize, h->chroma_log2_weight_denom, | 2719 chroma_weight_avg(dest_cb, tmp_cb, s->uvlinesize, h->chroma_log2_weight_denom, |
2720 h->chroma_weight[0][refn0][0], h->chroma_weight[1][refn1][0], | 2720 h->chroma_weight[0][refn0][0], h->chroma_weight[1][refn1][0], |
2721 h->chroma_offset[0][refn0][0], h->chroma_offset[1][refn1][0]); | 2721 h->chroma_offset[0][refn0][0] + h->chroma_offset[1][refn1][0]); |
2722 chroma_weight_avg(dest_cr, tmp_cr, s->uvlinesize, h->chroma_log2_weight_denom, | 2722 chroma_weight_avg(dest_cr, tmp_cr, s->uvlinesize, h->chroma_log2_weight_denom, |
2723 h->chroma_weight[0][refn0][1], h->chroma_weight[1][refn1][1], | 2723 h->chroma_weight[0][refn0][1], h->chroma_weight[1][refn1][1], |
2724 h->chroma_offset[0][refn0][1], h->chroma_offset[1][refn1][1]); | 2724 h->chroma_offset[0][refn0][1] + h->chroma_offset[1][refn1][1]); |
2725 } | 2725 } |
2726 }else{ | 2726 }else{ |
2727 int list = list1 ? 1 : 0; | 2727 int list = list1 ? 1 : 0; |
2728 int refn = h->ref_cache[list][ scan8[n] ]; | 2728 int refn = h->ref_cache[list][ scan8[n] ]; |
2729 Picture *ref= &h->ref_list[list][refn]; | 2729 Picture *ref= &h->ref_list[list][refn]; |