summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDebargha Mukherjee <debargha@google.com>2018-01-10 18:12:22 -0800
committerDebargha Mukherjee <debargha@google.com>2018-01-11 20:04:17 +0000
commitf340fece2c18f068dc3c0c9219b2e5a5eee7ba79 (patch)
treeff86731f36f26b91ca96190cc9882c15d3638771 /examples
parentf9a50ea3d3eb73d295ce11eda10d67862067135c (diff)
No colorspace for mono-video f/ CICP compatibility
Change-Id: I03c6cf0b58f9e1d74c7d30d76e846be9a640dab7
Diffstat (limited to 'examples')
-rw-r--r--examples/encoder_util.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/encoder_util.c b/examples/encoder_util.c
index 0b0344069..016315c0a 100644
--- a/examples/encoder_util.c
+++ b/examples/encoder_util.c
@@ -40,6 +40,7 @@ static void find_mismatch_plane(const aom_image_t *const img1,
assert(img1->x_chroma_shift == img2->x_chroma_shift &&
img1->y_chroma_shift == img2->y_chroma_shift);
loc[0] = loc[1] = loc[2] = loc[3] = -1;
+ if (img1->monochrome && img2->monochrome && plane) return;
int match = 1;
uint32_t i, j;
for (i = 0; match && i < c_h; i += bsizey) {
@@ -105,13 +106,9 @@ int aom_compare_img(const aom_image_t *const img1,
#else
assert(img1->cs == img2->cs);
#endif
+ assert(img1->monochrome == img2->monochrome);
-#if CONFIG_CICP
- int num_planes = 3; // We need to decide on monochrome video based
- // on something else than the color space
-#else
- int num_planes = img1->cs == AOM_CS_MONOCHROME ? 1 : 3;
-#endif
+ int num_planes = img1->monochrome ? 1 : 3;
uint32_t l_w = img1->d_w;
uint32_t c_w = (img1->d_w + img1->x_chroma_shift) >> img1->x_chroma_shift;