comparison h264.c @ 5093:f0ffa056b77c libavcodec

filter_mb_fast() doesn't handle h->deblocking_filter==2 (skip slice edges), so delegate that case to filter_mb(). Patch by Andreas ªÓman [andreas at olebyn dot nu].
author lorenm
date Sun, 03 Jun 2007 11:44:43 +0000
parents ce36118abbbb
children ddb5abe164f3
comparison
equal deleted inserted replaced
5092:fd173be649b7 5093:f0ffa056b77c
6663 static void filter_mb_fast( 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) { 6663 static void filter_mb_fast( 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) {
6664 MpegEncContext * const s = &h->s; 6664 MpegEncContext * const s = &h->s;
6665 int mb_xy, mb_type; 6665 int mb_xy, mb_type;
6666 int qp, qp0, qp1, qpc, qpc0, qpc1, qp_thresh; 6666 int qp, qp0, qp1, qpc, qpc0, qpc1, qp_thresh;
6667 6667
6668 if(mb_x==0 || mb_y==0 || !s->dsp.h264_loop_filter_strength) { 6668 mb_xy = mb_x + mb_y*s->mb_stride;
6669
6670 if(mb_x==0 || mb_y==0 || !s->dsp.h264_loop_filter_strength ||
6671 (h->deblocking_filter == 2 && (h->slice_table[mb_xy] != h->slice_table[h->top_mb_xy] ||
6672 h->slice_table[mb_xy] != h->slice_table[mb_xy - 1]))) {
6669 filter_mb(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize); 6673 filter_mb(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize);
6670 return; 6674 return;
6671 } 6675 }
6672 assert(!FRAME_MBAFF); 6676 assert(!FRAME_MBAFF);
6673 6677
6674 mb_xy = mb_x + mb_y*s->mb_stride;
6675 mb_type = s->current_picture.mb_type[mb_xy]; 6678 mb_type = s->current_picture.mb_type[mb_xy];
6676 qp = s->current_picture.qscale_table[mb_xy]; 6679 qp = s->current_picture.qscale_table[mb_xy];
6677 qp0 = s->current_picture.qscale_table[mb_xy-1]; 6680 qp0 = s->current_picture.qscale_table[mb_xy-1];
6678 qp1 = s->current_picture.qscale_table[h->top_mb_xy]; 6681 qp1 = s->current_picture.qscale_table[h->top_mb_xy];
6679 qpc = get_chroma_qp( h->pps.chroma_qp_index_offset, qp ); 6682 qpc = get_chroma_qp( h->pps.chroma_qp_index_offset, qp );