You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Fix deblocking filter for field pictures by properly looking for first
row in bottom fields and preventing the use of "fast" deblocking for such. Originally committed as revision 10950 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -6371,12 +6371,13 @@ static void filter_mb_edgech( H264Context *h, uint8_t *pix, int stride, int16_t
|
|||||||
|
|
||||||
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) {
|
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) {
|
||||||
MpegEncContext * const s = &h->s;
|
MpegEncContext * const s = &h->s;
|
||||||
|
int mb_y_firstrow = s->picture_structure == PICT_BOTTOM_FIELD;
|
||||||
int mb_xy, mb_type;
|
int mb_xy, mb_type;
|
||||||
int qp, qp0, qp1, qpc, qpc0, qpc1, qp_thresh;
|
int qp, qp0, qp1, qpc, qpc0, qpc1, qp_thresh;
|
||||||
|
|
||||||
mb_xy = mb_x + mb_y*s->mb_stride;
|
mb_xy = mb_x + mb_y*s->mb_stride;
|
||||||
|
|
||||||
if(mb_x==0 || mb_y==0 || !s->dsp.h264_loop_filter_strength || h->pps.chroma_qp_diff ||
|
if(mb_x==0 || mb_y==mb_y_firstrow || !s->dsp.h264_loop_filter_strength || h->pps.chroma_qp_diff ||
|
||||||
(h->deblocking_filter == 2 && (h->slice_table[mb_xy] != h->slice_table[h->top_mb_xy] ||
|
(h->deblocking_filter == 2 && (h->slice_table[mb_xy] != h->slice_table[h->top_mb_xy] ||
|
||||||
h->slice_table[mb_xy] != h->slice_table[mb_xy - 1]))) {
|
h->slice_table[mb_xy] != h->slice_table[mb_xy - 1]))) {
|
||||||
filter_mb(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize);
|
filter_mb(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize);
|
||||||
|
Reference in New Issue
Block a user