Mercurial > libavcodec.hg
comparison h264_loopfilter.c @ 10922:8945125b5ae6 libavcodec
Use h->slice_num where possible.
author | michael |
---|---|
date | Mon, 18 Jan 2010 20:13:53 +0000 |
parents | 6d4f65057d0d |
children | fb0307a3355e |
comparison
equal
deleted
inserted
replaced
10921:6d4f65057d0d | 10922:8945125b5ae6 |
---|---|
335 | 335 |
336 if(mb_x==0 || mb_y==mb_y_firstrow || !s->dsp.h264_loop_filter_strength || h->pps.chroma_qp_diff || | 336 if(mb_x==0 || mb_y==mb_y_firstrow || !s->dsp.h264_loop_filter_strength || h->pps.chroma_qp_diff || |
337 !(h->slice_type_nos == FF_I_TYPE || | 337 !(h->slice_type_nos == FF_I_TYPE || |
338 h->slice_type_nos == FF_P_TYPE || | 338 h->slice_type_nos == FF_P_TYPE || |
339 (s->flags2 & CODEC_FLAG2_FAST)) || | 339 (s->flags2 & CODEC_FLAG2_FAST)) || |
340 (h->deblocking_filter == 2 && (h->slice_table[mb_xy] != h->slice_table[h->top_mb_xy] || //use slice_num | 340 (h->deblocking_filter == 2 && (h->slice_num != h->slice_table[h->top_mb_xy] || |
341 h->slice_table[mb_xy] != h->slice_table[mb_xy - 1]))) { | 341 h->slice_num != h->slice_table[mb_xy - 1]))) { |
342 ff_h264_filter_mb(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize); | 342 ff_h264_filter_mb(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize); |
343 return; | 343 return; |
344 } | 344 } |
345 assert(!FRAME_MBAFF); | 345 assert(!FRAME_MBAFF); |
346 | 346 |
459 | 459 |
460 if (first_vertical_edge_done) { | 460 if (first_vertical_edge_done) { |
461 start = 1; | 461 start = 1; |
462 } | 462 } |
463 | 463 |
464 if (h->deblocking_filter==2 && h->slice_table[mbm_xy] != h->slice_table[mb_xy]) | 464 if (h->deblocking_filter==2 && h->slice_table[mbm_xy] != h->slice_num) |
465 start = 1; | 465 start = 1; |
466 | 466 |
467 if (FRAME_MBAFF && (dir == 1) && ((mb_y&1) == 0) && start == 0 | 467 if (FRAME_MBAFF && (dir == 1) && ((mb_y&1) == 0) && start == 0 |
468 && !IS_INTERLACED(mb_type) | 468 && !IS_INTERLACED(mb_type) |
469 && IS_INTERLACED(mbm_type) | 469 && IS_INTERLACED(mbm_type) |
654 // left mb is in picture | 654 // left mb is in picture |
655 && h->slice_table[mb_xy-1] != 0xFFFF | 655 && h->slice_table[mb_xy-1] != 0xFFFF |
656 // and current and left pair do not have the same interlaced type | 656 // and current and left pair do not have the same interlaced type |
657 && (IS_INTERLACED(mb_type) != IS_INTERLACED(s->current_picture.mb_type[mb_xy-1])) | 657 && (IS_INTERLACED(mb_type) != IS_INTERLACED(s->current_picture.mb_type[mb_xy-1])) |
658 // and left mb is in the same slice if deblocking_filter == 2 | 658 // and left mb is in the same slice if deblocking_filter == 2 |
659 && (h->deblocking_filter!=2 || h->slice_table[mb_xy-1] == h->slice_table[mb_xy])) { | 659 && (h->deblocking_filter!=2 || h->slice_table[mb_xy-1] == h->slice_num)) { |
660 /* First vertical edge is different in MBAFF frames | 660 /* First vertical edge is different in MBAFF frames |
661 * There are 8 different bS to compute and 2 different Qp | 661 * There are 8 different bS to compute and 2 different Qp |
662 */ | 662 */ |
663 const int pair_xy = mb_x + (mb_y&~1)*s->mb_stride; | 663 const int pair_xy = mb_x + (mb_y&~1)*s->mb_stride; |
664 const int left_mb_xy[2] = { pair_xy-1, pair_xy-1+s->mb_stride }; | 664 const int left_mb_xy[2] = { pair_xy-1, pair_xy-1+s->mb_stride }; |