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

Commit 3db9e2ed authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Codec2BufferUtils: Use cropped dimensions in RGB to YUV conversion" into sc-dev

parents 723fc22c 3ee0378a
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -551,8 +551,8 @@ status_t ConvertRGBToPlanarYUV(
    uint8_t maxLvlChroma =  colorRange == C2Color::RANGE_FULL ? 255 : 240;
    uint8_t maxLvlChroma =  colorRange == C2Color::RANGE_FULL ? 255 : 240;


#define CLIP3(min,v,max) (((v) < (min)) ? (min) : (((max) > (v)) ? (v) : (max)))
#define CLIP3(min,v,max) (((v) < (min)) ? (min) : (((max) > (v)) ? (v) : (max)))
    for (size_t y = 0; y < src.height(); ++y) {
    for (size_t y = 0; y < src.crop().height; ++y) {
        for (size_t x = 0; x < src.width(); ++x) {
        for (size_t x = 0; x < src.crop().width; ++x) {
            uint8_t r = *pRed;
            uint8_t r = *pRed;
            uint8_t g = *pGreen;
            uint8_t g = *pGreen;
            uint8_t b = *pBlue;
            uint8_t b = *pBlue;