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

Commit 0fce333c authored by Dichen Zhang's avatar Dichen Zhang Committed by Android (Google) Code Review
Browse files

Merge "JpegR refactor: rename recoverymap to jpegr"

parents effe0ad8 f84ed400
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -294,7 +294,7 @@ bool P010Yuv420ToJpegREncoder::encode(JNIEnv* env,
        return false;
    }

    RecoveryMap recoveryMap;
    JpegR jpegREncoder;

    jpegr_uncompressed_struct p010;
    p010.data = hdr;
@@ -314,7 +314,7 @@ bool P010Yuv420ToJpegREncoder::encode(JNIEnv* env,
    std::unique_ptr<uint8_t[]> jpegr_data = std::make_unique<uint8_t[]>(jpegR.maxLength);
    jpegR.data = jpegr_data.get();

    if (int success = recoveryMap.encodeJPEGR(&p010, &yuv420,
    if (int success = jpegREncoder.encodeJPEGR(&p010, &yuv420,
            hdrTransferFunction,
            &jpegR, jpegQuality, nullptr); success != android::OK) {
        ALOGW("Encode JPEG/R failed, error code: %d.", success);
+2 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
#define _ANDROID_GRAPHICS_YUV_TO_JPEG_ENCODER_H_

#include <android/data_space.h>
#include <jpegrecoverymap/recoverymap.h>
#include <jpegrecoverymap/jpegr.h>

extern "C" {
    #include "jpeglib.h"
@@ -77,7 +77,7 @@ private:
class P010Yuv420ToJpegREncoder {
public:
    /** Encode YUV data to jpeg/r,  which is output to a stream.
     *  This method will call RecoveryMap::EncodeJPEGR() method. If encoding failed,
     *  This method will call JpegR::EncodeJPEGR() method. If encoding failed,
     *  Corresponding error code (defined in jpegrerrorcode.h) will be printed and this
     *  method will be terminated and return false.
     *