summaryrefslogtreecommitdiffstats
path: root/third_party/aom/test/encode_test_driver.cc
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-18 21:53:44 -0500
committertrav90 <travawine@palemoon.org>2018-10-18 21:53:44 -0500
commitec910d81405c736a4490383a250299a7837c2e64 (patch)
tree4f27cc226f93a863121aef6c56313e4153a69b3e /third_party/aom/test/encode_test_driver.cc
parent01eb57073ba97b2d6cbf20f745dfcc508197adc3 (diff)
downloadUXP-ec910d81405c736a4490383a250299a7837c2e64.tar
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.gz
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.lz
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.xz
UXP-ec910d81405c736a4490383a250299a7837c2e64.zip
Update aom to commit id e87fb2378f01103d5d6e477a4ef6892dc714e614
Diffstat (limited to 'third_party/aom/test/encode_test_driver.cc')
-rw-r--r--third_party/aom/test/encode_test_driver.cc36
1 files changed, 9 insertions, 27 deletions
diff --git a/third_party/aom/test/encode_test_driver.cc b/third_party/aom/test/encode_test_driver.cc
index ec168e969..6941f0148 100644
--- a/third_party/aom/test/encode_test_driver.cc
+++ b/third_party/aom/test/encode_test_driver.cc
@@ -149,11 +149,6 @@ static bool compare_img(const aom_image_t *img1, const aom_image_t *img2,
int *const mismatch_row, int *const mismatch_col,
int *const mismatch_plane, int *const mismatch_pix1,
int *const mismatch_pix2) {
- const unsigned int w_y = img1->d_w;
- const unsigned int h_y = img1->d_h;
- const unsigned int w_uv = ROUND_POWER_OF_TWO(w_y, img1->x_chroma_shift);
- const unsigned int h_uv = ROUND_POWER_OF_TWO(h_y, img1->y_chroma_shift);
-
if (img1->fmt != img2->fmt || img1->cs != img2->cs ||
img1->d_w != img2->d_w || img1->d_h != img2->d_h) {
if (mismatch_row != NULL) *mismatch_row = -1;
@@ -161,28 +156,15 @@ static bool compare_img(const aom_image_t *img1, const aom_image_t *img2,
return false;
}
- if (!compare_plane(img1->planes[AOM_PLANE_Y], img1->stride[AOM_PLANE_Y],
- img2->planes[AOM_PLANE_Y], img2->stride[AOM_PLANE_Y], w_y,
- h_y, mismatch_row, mismatch_col, mismatch_pix1,
- mismatch_pix2)) {
- if (mismatch_plane != NULL) *mismatch_plane = AOM_PLANE_Y;
- return false;
- }
-
- if (!compare_plane(img1->planes[AOM_PLANE_U], img1->stride[AOM_PLANE_U],
- img2->planes[AOM_PLANE_U], img2->stride[AOM_PLANE_U], w_uv,
- h_uv, mismatch_row, mismatch_col, mismatch_pix1,
- mismatch_pix2)) {
- if (mismatch_plane != NULL) *mismatch_plane = AOM_PLANE_U;
- return false;
- }
-
- if (!compare_plane(img1->planes[AOM_PLANE_V], img1->stride[AOM_PLANE_V],
- img2->planes[AOM_PLANE_V], img2->stride[AOM_PLANE_V], w_uv,
- h_uv, mismatch_row, mismatch_col, mismatch_pix1,
- mismatch_pix2)) {
- if (mismatch_plane != NULL) *mismatch_plane = AOM_PLANE_U;
- return false;
+ for (int plane = 0; plane < 3; plane++) {
+ if (!compare_plane(img1->planes[plane], img1->stride[plane],
+ img2->planes[plane], img2->stride[plane],
+ aom_img_plane_width(img1, plane),
+ aom_img_plane_height(img1, plane), mismatch_row,
+ mismatch_col, mismatch_pix1, mismatch_pix2)) {
+ if (mismatch_plane != NULL) *mismatch_plane = plane;
+ return false;
+ }
}
return true;