Commit a5c621aa authored by Anton Khirnov's avatar Anton Khirnov Committed by Michael Niedermayer

hevc: rename variable in boundary strength to b more explicit

Signed-off-by: 's avatarMickaël Raulet <mraulet@insa-rennes.fr>

cherry picked from commit 348bebedc0012aae201419669fca1eb61ec93ca6
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e0492311
...@@ -2205,9 +2205,6 @@ static void hls_decode_neighbour(HEVCContext *s, int x_ctb, int y_ctb, ...@@ -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_rs = s->pps->ctb_addr_ts_to_rs[ctb_addr_ts];
int ctb_addr_in_slice = ctb_addr_rs - s->sh.slice_addr; 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; s->tab_slice_address[ctb_addr_rs] = s->sh.slice_addr;
if (s->pps->entropy_coding_sync_enabled_flag) { 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, ...@@ -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->end_of_tiles_y = FFMIN(y_ctb + ctb_size, s->sps->height);
lc->boundary_flags = 0;
if (s->pps->tiles_enabled_flag) { if (s->pps->tiles_enabled_flag) {
tile_left_boundary = x_ctb > 0 && 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]])
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;
slice_left_boundary = x_ctb > 0 && if (x_ctb > 0 && s->tab_slice_address[ctb_addr_rs] != s->tab_slice_address[ctb_addr_rs - 1])
s->tab_slice_address[ctb_addr_rs] != s->tab_slice_address[ctb_addr_rs - 1]; lc->boundary_flags |= BOUNDARY_LEFT_SLICE;
tile_up_boundary = y_ctb > 0 && 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]])
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;
slice_up_boundary = y_ctb > 0 && if (y_ctb > 0 && s->tab_slice_address[ctb_addr_rs] != s->tab_slice_address[ctb_addr_rs - s->sps->ctb_width])
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 { } else {
tile_left_boundary = if (!ctb_addr_in_slice > 0)
tile_up_boundary = 0; lc->boundary_flags |= BOUNDARY_LEFT_SLICE;
slice_left_boundary = ctb_addr_in_slice <= 0; if (ctb_addr_in_slice < s->sps->ctb_width)
slice_up_boundary = ctb_addr_in_slice < s->sps->ctb_width; lc->boundary_flags |= BOUNDARY_UPPER_SLICE;
} }
lc->slice_or_tiles_left_boundary = slice_left_boundary + (tile_left_boundary << 1); lc->ctb_left_flag = ((x_ctb > 0) && (ctb_addr_in_slice > 0) && !(lc->boundary_flags & BOUNDARY_LEFT_TILE));
lc->slice_or_tiles_up_boundary = slice_up_boundary + (tile_up_boundary << 1); lc->ctb_up_flag = ((y_ctb > 0) && (ctb_addr_in_slice >= s->sps->ctb_width) && !(lc->boundary_flags & BOUNDARY_UPPER_TILE));
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);
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_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]])); 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]]));
} }
......
...@@ -779,8 +779,13 @@ typedef struct HEVCLocalContext { ...@@ -779,8 +779,13 @@ typedef struct HEVCLocalContext {
PredictionUnit pu; PredictionUnit pu;
NeighbourAvailable na; NeighbourAvailable na;
uint8_t slice_or_tiles_left_boundary; #define BOUNDARY_LEFT_SLICE (1 << 0)
uint8_t slice_or_tiles_up_boundary; #define BOUNDARY_LEFT_TILE (1 << 1)
#define BOUNDARY_UPPER_SLICE (1 << 2)
#define BOUNDARY_UPPER_TILE (1 << 3)
/* properties of the boundary of the current CTB for the purposes
* of the deblocking filter */
int boundary_flags;
} HEVCLocalContext; } HEVCLocalContext;
typedef struct HEVCContext { typedef struct HEVCContext {
......
...@@ -585,9 +585,9 @@ void ff_hevc_deblocking_boundary_strengths(HEVCContext *s, int x0, int y0, ...@@ -585,9 +585,9 @@ void ff_hevc_deblocking_boundary_strengths(HEVCContext *s, int x0, int y0,
if (y0 > 0 && (y0 & 7) == 0) { if (y0 > 0 && (y0 & 7) == 0) {
int bd_ctby = y0 & ((1 << s->sps->log2_ctb_size) - 1); int bd_ctby = y0 & ((1 << s->sps->log2_ctb_size) - 1);
int bd_slice = s->sh.slice_loop_filter_across_slices_enabled_flag || int bd_slice = s->sh.slice_loop_filter_across_slices_enabled_flag ||
!(lc->slice_or_tiles_up_boundary & 1); !(lc->boundary_flags & BOUNDARY_UPPER_SLICE);
int bd_tiles = s->pps->loop_filter_across_tiles_enabled_flag || int bd_tiles = s->pps->loop_filter_across_tiles_enabled_flag ||
!(lc->slice_or_tiles_up_boundary & 2); !(lc->boundary_flags & BOUNDARY_UPPER_TILE);
if (((bd_slice && bd_tiles) || bd_ctby)) { if (((bd_slice && bd_tiles) || bd_ctby)) {
int yp_pu = (y0 - 1) >> log2_min_pu_size; int yp_pu = (y0 - 1) >> log2_min_pu_size;
int yq_pu = y0 >> log2_min_pu_size; int yq_pu = y0 >> log2_min_pu_size;
...@@ -619,9 +619,9 @@ void ff_hevc_deblocking_boundary_strengths(HEVCContext *s, int x0, int y0, ...@@ -619,9 +619,9 @@ void ff_hevc_deblocking_boundary_strengths(HEVCContext *s, int x0, int y0,
if (x0 > 0 && (x0 & 7) == 0) { if (x0 > 0 && (x0 & 7) == 0) {
int bd_ctbx = x0 & ((1 << s->sps->log2_ctb_size) - 1); int bd_ctbx = x0 & ((1 << s->sps->log2_ctb_size) - 1);
int bd_slice = s->sh.slice_loop_filter_across_slices_enabled_flag || int bd_slice = s->sh.slice_loop_filter_across_slices_enabled_flag ||
!(lc->slice_or_tiles_left_boundary & 1); !(lc->boundary_flags & BOUNDARY_LEFT_SLICE);
int bd_tiles = s->pps->loop_filter_across_tiles_enabled_flag || int bd_tiles = s->pps->loop_filter_across_tiles_enabled_flag ||
!(lc->slice_or_tiles_left_boundary & 2); !(lc->boundary_flags & BOUNDARY_LEFT_TILE);
if (((bd_slice && bd_tiles) || bd_ctbx)) { if (((bd_slice && bd_tiles) || bd_ctbx)) {
int xp_pu = (x0 - 1) >> log2_min_pu_size; int xp_pu = (x0 - 1) >> log2_min_pu_size;
int xq_pu = x0 >> log2_min_pu_size; int xq_pu = x0 >> log2_min_pu_size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment