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

Commit 1790bb5d authored by Ram Mohan's avatar Ram Mohan Committed by Dichen Zhang
Browse files

ultrahdr: do not select less accurate integer method during dct

At high quality setting, less accurate integer method can have
larger psnr drops. Switch to default setting

Bug: 286617381
Test: ./libultrahdr_app -p inp_p010.yuv -y inp_420p.yuv -w 1920 -h 1080 -o 0

Change-Id: Ide126b87262e1c9a20edca7873b6ca27fc52b2cb
parent 69d1bc22
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ bool JpegDecoderHelper::decode(const void* image, int length, bool decodeToRGBA)
        cinfo.raw_data_out = TRUE;
    }

    cinfo.dct_method = JDCT_IFAST;
    cinfo.dct_method = JDCT_ISLOW;

    jpeg_start_decompress(&cinfo);

+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ void JpegEncoderHelper::setJpegCompressStruct(int width, int height, int quality
    jpeg_set_quality(cinfo, quality, TRUE);
    jpeg_set_colorspace(cinfo, isSingleChannel ? JCS_GRAYSCALE : JCS_YCbCr);
    cinfo->raw_data_in = TRUE;
    cinfo->dct_method = JDCT_IFAST;
    cinfo->dct_method = JDCT_ISLOW;

    if (!isSingleChannel) {
        // Configure sampling factors. The sampling factor is JPEG subsampling 420 because the