Commit 14af5b95 authored by Sebastien Alaiwan's avatar Sebastien Alaiwan

Simplify conditions on bitdepth

This avoids use of preprocessor when possible, and removes a
duplicated legacy check on codec name.

Change-Id: I8f0d25cf69b51d3379f25c1a69f88c8d404c4e38
parent 18605a3d
......@@ -1061,15 +1061,8 @@ static int parse_stream_params(struct AvxEncoderConfig *global,
}
}
#if CONFIG_HIGHBITDEPTH
#if CONFIG_LOWBITDEPTH
if (strcmp(global->codec->name, "av1") == 0 ||
strcmp(global->codec->name, "av1") == 0) {
config->use_16bit_internal =
test_16bit_internal | (config->cfg.g_profile > 1);
}
#else
config->use_16bit_internal = 1;
#endif
config->use_16bit_internal =
test_16bit_internal || (config->cfg.g_profile > 1) || !CONFIG_LOWBITDEPTH;
#endif
return eos_mark_found;
}
......
......@@ -3927,15 +3927,7 @@ static void read_bitdepth_colorspace_sampling(AV1_COMMON *cm,
}
#if CONFIG_HIGHBITDEPTH
if (cm->bit_depth > AOM_BITS_8) {
cm->use_highbitdepth = 1;
} else {
#if CONFIG_LOWBITDEPTH
cm->use_highbitdepth = 0;
#else
cm->use_highbitdepth = 1;
#endif
}
cm->use_highbitdepth = cm->bit_depth > AOM_BITS_8 || !CONFIG_LOWBITDEPTH;
#endif
cm->color_space = aom_rb_read_literal(rb, 3);
......
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