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

Commit 42bafe99 authored by Harish Mahendrakar's avatar Harish Mahendrakar Committed by Cherrypicker Worker
Browse files

SimpleC2Component: Fix YUV to RGB conversion for 10-bit decode

Coefficients used in color conversion from YUV to RGB in 10-bit
path were wrongly accessed.

For eg BT.2020 LR, 2200 is to be used to multiply "U" sample, but
it was being used to multiply "V" sample.

Bug: 238381159
Test: atest CtsMediaV2TestCases:CodecDecoderSurfaceTest

Change-Id: I4e9f4310c36c1ab292054f3bf217bde907ce4cae
(cherry picked from commit 36bd794f)
Merged-In: I4e9f4310c36c1ab292054f3bf217bde907ce4cae
parent 6565142a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -190,7 +190,7 @@ static C2ColorAspectsStruct FillMissingColorAspects(
// matrix conversion coefficients
// (see media/libstagefright/colorconverter/ColorConverter.cpp for more details)
struct Coeffs {
    int32_t _y, _b_u, _g_u, _g_v, _r_v, _c16;
    int32_t _y, _r_v, _g_u, _g_v, _b_u, _c16;
};

static const struct Coeffs GetCoeffsForAspects(const C2ColorAspectsStruct &aspects) {