Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aed6aa8c authored by Max Zhang's avatar Max Zhang Committed by android-build-merger
Browse files

yukawa: adapt different YCC orders am: 59b31c9b am: b21fd17e am: 4a2baa92

am: b21fd61f

Change-Id: I2e4344503fd62cd0346c61bf745c7638f3651b3b
parents e8866a24 b21fd61f
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -282,14 +282,16 @@ class Gralloc1HalImpl : public Hal {
        }

        if (flex.planes[0].component != FLEX_COMPONENT_Y ||
            flex.planes[1].component != FLEX_COMPONENT_Cb ||
            flex.planes[2].component != FLEX_COMPONENT_Cr) {
           ((flex.planes[1].component != FLEX_COMPONENT_Cb || flex.planes[2].component != FLEX_COMPONENT_Cr) &&
           (flex.planes[2].component != FLEX_COMPONENT_Cb || flex.planes[1].component != FLEX_COMPONENT_Cr))) {
            return false;
        }

        const auto& y = flex.planes[0];
        const auto& cb = flex.planes[1];
        const auto& cr = flex.planes[2];
        const auto& cb = (flex.planes[1].component == FLEX_COMPONENT_Cb)?
                          flex.planes[1] : flex.planes[2];
        const auto& cr = (flex.planes[2].component == FLEX_COMPONENT_Cr)?
                          flex.planes[2] : flex.planes[1];

        if (cb.h_increment != cr.h_increment || cb.v_increment != cr.v_increment) {
            return false;