Commit f80a0581 authored by Fergus Simpson's avatar Fergus Simpson

hbd: remove unused variable "use_hbd"

The variable "use_hbd" was defined but not used in four places in the
codebase. The warning that it wasn't used was missed by Jenkins
because it only tries one experimental flag at a time, but these
definitions were inside nested experimental flag conditions. Both
CONFIG_WARPED_MOTION and CONFIG_AOM_HIGHBITDEPTH had to be set for the
variables to be defined.

This patch deletes the unused definitions to remove the unused variable
warnings when the AV1 encoder and/or decoder are built with warped
motion and high bitdepth configured.

Change-Id: I9e80523db05a7a19cebe3ec8085a4a1e4b198c52
parent 8e55c2eb
...@@ -1701,10 +1701,6 @@ static void decode_token_and_recon_block(AV1Decoder *const pbi, ...@@ -1701,10 +1701,6 @@ static void decode_token_and_recon_block(AV1Decoder *const pbi,
#if CONFIG_WARPED_MOTION #if CONFIG_WARPED_MOTION
if (mbmi->motion_mode == WARPED_CAUSAL) { if (mbmi->motion_mode == WARPED_CAUSAL) {
int i; int i;
#if CONFIG_AOM_HIGHBITDEPTH
int use_hbd = xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH;
#endif // CONFIG_AOM_HIGHBITDEPTH
for (i = 0; i < 3; ++i) { for (i = 0; i < 3; ++i) {
const struct macroblockd_plane *pd = &xd->plane[i]; const struct macroblockd_plane *pd = &xd->plane[i];
......
...@@ -5705,10 +5705,6 @@ static void encode_superblock(const AV1_COMP *const cpi, ThreadData *td, ...@@ -5705,10 +5705,6 @@ static void encode_superblock(const AV1_COMP *const cpi, ThreadData *td,
#if CONFIG_WARPED_MOTION #if CONFIG_WARPED_MOTION
if (mbmi->motion_mode == WARPED_CAUSAL) { if (mbmi->motion_mode == WARPED_CAUSAL) {
int i; int i;
#if CONFIG_AOM_HIGHBITDEPTH
int use_hbd = xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH;
#endif // CONFIG_AOM_HIGHBITDEPTH
for (i = 0; i < 3; ++i) { for (i = 0; i < 3; ++i) {
const struct macroblockd_plane *pd = &xd->plane[i]; const struct macroblockd_plane *pd = &xd->plane[i];
......
...@@ -8810,10 +8810,6 @@ static int64_t handle_inter_mode( ...@@ -8810,10 +8810,6 @@ static int64_t handle_inter_mode(
if (find_projection(mbmi->num_proj_ref[0], pts, pts_inref, if (find_projection(mbmi->num_proj_ref[0], pts, pts_inref,
&mbmi->wm_params[0], mi_row, mi_col) == 0) { &mbmi->wm_params[0], mi_row, mi_col) == 0) {
int plane; int plane;
#if CONFIG_AOM_HIGHBITDEPTH
int use_hbd = xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH;
#endif // CONFIG_AOM_HIGHBITDEPTH
for (plane = 0; plane < 3; ++plane) { for (plane = 0; plane < 3; ++plane) {
const struct macroblockd_plane *pd = &xd->plane[plane]; const struct macroblockd_plane *pd = &xd->plane[plane];
...@@ -10701,12 +10697,9 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data, ...@@ -10701,12 +10697,9 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
if (is_inter_mode(mbmi->mode)) { if (is_inter_mode(mbmi->mode)) {
#if CONFIG_WARPED_MOTION #if CONFIG_WARPED_MOTION
if (mbmi->motion_mode == WARPED_CAUSAL) { if (mbmi->motion_mode == WARPED_CAUSAL) {
int plane;
#if CONFIG_AOM_HIGHBITDEPTH
int use_hbd = xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH;
#endif // CONFIG_AOM_HIGHBITDEPTH
assert(!has_second_ref(mbmi)); assert(!has_second_ref(mbmi));
int plane;
for (plane = 0; plane < 3; ++plane) { for (plane = 0; plane < 3; ++plane) {
const struct macroblockd_plane *pd = &xd->plane[plane]; const struct macroblockd_plane *pd = &xd->plane[plane];
......
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