diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-07-27 17:49:09 +0000 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-08-09 16:13:48 +0000 |
commit | 70211539a39ca3854f8a9e97d51dc27caa079943 (patch) | |
tree | 0436ca6caf5500d6bccf584de94a148efdd9afc8 /libavcodec/hevc_filter.c | |
parent | 55019715785790836f60870180e1764b06e6591c (diff) |
hevc: deobfuscate slice/tile boundary handling for DBF
Use named constants instead of magic numbers, avoid using variables with
inverse meaning from what their name implies.
Diffstat (limited to 'libavcodec/hevc_filter.c')
-rw-r--r-- | libavcodec/hevc_filter.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libavcodec/hevc_filter.c b/libavcodec/hevc_filter.c index 88bea40fa3..03f472e33f 100644 --- a/libavcodec/hevc_filter.c +++ b/libavcodec/hevc_filter.c @@ -584,10 +584,9 @@ static int boundary_strength(HEVCContext *s, MvField *curr, } void ff_hevc_deblocking_boundary_strengths(HEVCContext *s, int x0, int y0, - int log2_trafo_size, - int slice_or_tiles_up_boundary, - int slice_or_tiles_left_boundary) + int log2_trafo_size) { + HEVCLocalContext *lc = &s->HEVClc; MvField *tab_mvf = s->ref->tab_mvf; int log2_min_pu_size = s->sps->log2_min_pu_size; int log2_min_tu_size = s->sps->log2_min_tb_size; @@ -616,11 +615,11 @@ void ff_hevc_deblocking_boundary_strengths(HEVCContext *s, int x0, int y0, bs = boundary_strength(s, curr, curr_cbf_luma, top, top_cbf_luma, top_refPicList, 1); if (!s->sh.slice_loop_filter_across_slices_enabled_flag && - (slice_or_tiles_up_boundary & 1) && + lc->boundary_flags & BOUNDARY_UPPER_SLICE && (y0 % (1 << s->sps->log2_ctb_size)) == 0) bs = 0; else if (!s->pps->loop_filter_across_tiles_enabled_flag && - (slice_or_tiles_up_boundary & 2) && + lc->boundary_flags & BOUNDARY_UPPER_TILE && (y0 % (1 << s->sps->log2_ctb_size)) == 0) bs = 0; if (bs) @@ -675,11 +674,11 @@ void ff_hevc_deblocking_boundary_strengths(HEVCContext *s, int x0, int y0, bs = boundary_strength(s, curr, curr_cbf_luma, left, left_cbf_luma, left_refPicList, 1); if (!s->sh.slice_loop_filter_across_slices_enabled_flag && - (slice_or_tiles_left_boundary & 1) && + lc->boundary_flags & BOUNDARY_LEFT_SLICE && (x0 % (1 << s->sps->log2_ctb_size)) == 0) bs = 0; else if (!s->pps->loop_filter_across_tiles_enabled_flag && - (slice_or_tiles_left_boundary & 2) && + lc->boundary_flags & BOUNDARY_LEFT_TILE && (x0 % (1 << s->sps->log2_ctb_size)) == 0) bs = 0; if (bs) |