diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-07-28 01:06:32 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-28 14:20:19 +0200 |
commit | a5c621aa852522c79146035b2db4b89d2e096d3c (patch) | |
tree | 4e0cba792cf9349b16da5b8149d099084227fadb /libavcodec/hevc.c | |
parent | e0492311c8541da55a4b08641364ce8e1a169740 (diff) | |
download | ffmpeg-a5c621aa852522c79146035b2db4b89d2e096d3c.tar.gz |
hevc: rename variable in boundary strength to b more explicit
Signed-off-by: Mickaƫl Raulet <mraulet@insa-rennes.fr>
cherry picked from commit 348bebedc0012aae201419669fca1eb61ec93ca6
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r-- | libavcodec/hevc.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 409be5257b..4473c270fb 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2205,9 +2205,6 @@ static void hls_decode_neighbour(HEVCContext *s, int x_ctb, int y_ctb, int ctb_addr_rs = s->pps->ctb_addr_ts_to_rs[ctb_addr_ts]; int ctb_addr_in_slice = ctb_addr_rs - s->sh.slice_addr; - int tile_left_boundary, tile_up_boundary; - int slice_left_boundary, slice_up_boundary; - s->tab_slice_address[ctb_addr_rs] = s->sh.slice_addr; if (s->pps->entropy_coding_sync_enabled_flag) { @@ -2226,25 +2223,24 @@ static void hls_decode_neighbour(HEVCContext *s, int x_ctb, int y_ctb, lc->end_of_tiles_y = FFMIN(y_ctb + ctb_size, s->sps->height); + lc->boundary_flags = 0; if (s->pps->tiles_enabled_flag) { - tile_left_boundary = x_ctb > 0 && - s->pps->tile_id[ctb_addr_ts] != s->pps->tile_id[s->pps->ctb_addr_rs_to_ts[ctb_addr_rs-1]]; - slice_left_boundary = x_ctb > 0 && - s->tab_slice_address[ctb_addr_rs] != s->tab_slice_address[ctb_addr_rs - 1]; - tile_up_boundary = y_ctb > 0 && - s->pps->tile_id[ctb_addr_ts] != s->pps->tile_id[s->pps->ctb_addr_rs_to_ts[ctb_addr_rs - s->sps->ctb_width]]; - slice_up_boundary = y_ctb > 0 && - s->tab_slice_address[ctb_addr_rs] != s->tab_slice_address[ctb_addr_rs - s->sps->ctb_width]; + if (x_ctb > 0 && s->pps->tile_id[ctb_addr_ts] != s->pps->tile_id[s->pps->ctb_addr_rs_to_ts[ctb_addr_rs-1]]) + lc->boundary_flags |= BOUNDARY_LEFT_TILE; + if (x_ctb > 0 && s->tab_slice_address[ctb_addr_rs] != s->tab_slice_address[ctb_addr_rs - 1]) + lc->boundary_flags |= BOUNDARY_LEFT_SLICE; + if (y_ctb > 0 && s->pps->tile_id[ctb_addr_ts] != s->pps->tile_id[s->pps->ctb_addr_rs_to_ts[ctb_addr_rs - s->sps->ctb_width]]) + lc->boundary_flags |= BOUNDARY_UPPER_TILE; + if (y_ctb > 0 && s->tab_slice_address[ctb_addr_rs] != s->tab_slice_address[ctb_addr_rs - s->sps->ctb_width]) + lc->boundary_flags |= BOUNDARY_UPPER_SLICE; } else { - tile_left_boundary = - tile_up_boundary = 0; - slice_left_boundary = ctb_addr_in_slice <= 0; - slice_up_boundary = ctb_addr_in_slice < s->sps->ctb_width; - } - lc->slice_or_tiles_left_boundary = slice_left_boundary + (tile_left_boundary << 1); - lc->slice_or_tiles_up_boundary = slice_up_boundary + (tile_up_boundary << 1); - lc->ctb_left_flag = ((x_ctb > 0) && (ctb_addr_in_slice > 0) && !tile_left_boundary); - lc->ctb_up_flag = ((y_ctb > 0) && (ctb_addr_in_slice >= s->sps->ctb_width) && !tile_up_boundary); + if (!ctb_addr_in_slice > 0) + lc->boundary_flags |= BOUNDARY_LEFT_SLICE; + if (ctb_addr_in_slice < s->sps->ctb_width) + lc->boundary_flags |= BOUNDARY_UPPER_SLICE; + } + lc->ctb_left_flag = ((x_ctb > 0) && (ctb_addr_in_slice > 0) && !(lc->boundary_flags & BOUNDARY_LEFT_TILE)); + lc->ctb_up_flag = ((y_ctb > 0) && (ctb_addr_in_slice >= s->sps->ctb_width) && !(lc->boundary_flags & BOUNDARY_UPPER_TILE)); lc->ctb_up_right_flag = ((y_ctb > 0) && (ctb_addr_in_slice+1 >= s->sps->ctb_width) && (s->pps->tile_id[ctb_addr_ts] == s->pps->tile_id[s->pps->ctb_addr_rs_to_ts[ctb_addr_rs+1 - s->sps->ctb_width]])); lc->ctb_up_left_flag = ((x_ctb > 0) && (y_ctb > 0) && (ctb_addr_in_slice-1 >= s->sps->ctb_width) && (s->pps->tile_id[ctb_addr_ts] == s->pps->tile_id[s->pps->ctb_addr_rs_to_ts[ctb_addr_rs-1 - s->sps->ctb_width]])); } |