comparison h264.c @ 10989:79f2e73f3714 libavcodec

Remove is_complex from loop_filter() its useless there in its current form.
author michael
date Sun, 24 Jan 2010 17:02:44 +0000
parents 85de0c8a19b7
children 1c8892d7a090
comparison
equal deleted inserted replaced
10988:3824ef98a6b8 10989:79f2e73f3714
2167 const int old_slice_type= h->slice_type; 2167 const int old_slice_type= h->slice_type;
2168 2168
2169 if(h->deblocking_filter) { 2169 if(h->deblocking_filter) {
2170 for(mb_x= 0; mb_x<s->mb_width; mb_x++){ 2170 for(mb_x= 0; mb_x<s->mb_width; mb_x++){
2171 for(mb_y=end_mb_y - FRAME_MBAFF; mb_y<= end_mb_y; mb_y++){ 2171 for(mb_y=end_mb_y - FRAME_MBAFF; mb_y<= end_mb_y; mb_y++){
2172 int list, mb_xy, mb_type, is_complex; 2172 int list, mb_xy, mb_type;
2173 mb_xy = h->mb_xy = mb_x + mb_y*s->mb_stride; 2173 mb_xy = h->mb_xy = mb_x + mb_y*s->mb_stride;
2174 h->slice_num= h->slice_table[mb_xy]; 2174 h->slice_num= h->slice_table[mb_xy];
2175 mb_type= s->current_picture.mb_type[mb_xy]; 2175 mb_type= s->current_picture.mb_type[mb_xy];
2176 h->list_count= h->list_counts[mb_xy]; 2176 h->list_count= h->list_counts[mb_xy];
2177 2177
2178 if(FRAME_MBAFF) 2178 if(FRAME_MBAFF)
2179 h->mb_mbaff = h->mb_field_decoding_flag = !!IS_INTERLACED(mb_type); 2179 h->mb_mbaff = h->mb_field_decoding_flag = !!IS_INTERLACED(mb_type);
2180
2181 is_complex = CONFIG_SMALL || h->is_complex || IS_INTRA_PCM(mb_type) || s->qscale == 0; //FIXME qscale might be wrong
2182 2180
2183 s->mb_x= mb_x; 2181 s->mb_x= mb_x;
2184 s->mb_y= mb_y; 2182 s->mb_y= mb_y;
2185 dest_y = s->current_picture.data[0] + (mb_x + mb_y * s->linesize ) * 16; 2183 dest_y = s->current_picture.data[0] + (mb_x + mb_y * s->linesize ) * 16;
2186 dest_cb = s->current_picture.data[1] + (mb_x + mb_y * s->uvlinesize) * 8; 2184 dest_cb = s->current_picture.data[1] + (mb_x + mb_y * s->uvlinesize) * 8;
2197 } 2195 }
2198 } else { 2196 } else {
2199 linesize = h->mb_linesize = s->linesize; 2197 linesize = h->mb_linesize = s->linesize;
2200 uvlinesize = h->mb_uvlinesize = s->uvlinesize; 2198 uvlinesize = h->mb_uvlinesize = s->uvlinesize;
2201 } 2199 }
2202 backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, !is_complex); 2200 backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 0);
2203 if(fill_filter_caches(h, mb_type) < 0) 2201 if(fill_filter_caches(h, mb_type) < 0)
2204 continue; 2202 continue;
2205 h->chroma_qp[0] = get_chroma_qp(h, 0, s->current_picture.qscale_table[mb_xy]); 2203 h->chroma_qp[0] = get_chroma_qp(h, 0, s->current_picture.qscale_table[mb_xy]);
2206 h->chroma_qp[1] = get_chroma_qp(h, 1, s->current_picture.qscale_table[mb_xy]); 2204 h->chroma_qp[1] = get_chroma_qp(h, 1, s->current_picture.qscale_table[mb_xy]);
2207 2205
2208 if (is_complex && FRAME_MBAFF) { 2206 if (FRAME_MBAFF) {
2209 ff_h264_filter_mb (h, mb_x, mb_y, dest_y, dest_cb, dest_cr, linesize, uvlinesize); 2207 ff_h264_filter_mb (h, mb_x, mb_y, dest_y, dest_cb, dest_cr, linesize, uvlinesize);
2210 } else { 2208 } else {
2211 ff_h264_filter_mb_fast(h, mb_x, mb_y, dest_y, dest_cb, dest_cr, linesize, uvlinesize); 2209 ff_h264_filter_mb_fast(h, mb_x, mb_y, dest_y, dest_cb, dest_cr, linesize, uvlinesize);
2212 } 2210 }
2213 } 2211 }