Loading libs/jpegrecoverymap/include/jpegrecoverymap/recoverymap.h +3 −12 Original line number Diff line number Diff line Loading @@ -82,16 +82,13 @@ public: * @param quality target quality of the JPEG encoding, must be in range of 0-100 where 100 is * the highest quality * @param exif pointer to the exif metadata. * @param hdr_ratio HDR ratio. If not configured, this value will be calculated by the JPEG/R * encoder. * @return NO_ERROR if encoding succeeds, error code if error occurs. */ status_t encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, jr_uncompressed_ptr uncompressed_yuv_420_image, jr_compressed_ptr dest, int quality, jr_exif_ptr exif, float hdr_ratio = 0.0f); jr_exif_ptr exif); /* * Compress JPEGR image from 10-bit HDR YUV, 8-bit SDR YUV and compressed 8-bit JPEG. Loading @@ -104,15 +101,12 @@ public: * @param uncompressed_yuv_420_image uncompressed SDR image in YUV_420 color format * @param compressed_jpeg_image compressed 8-bit JPEG image * @param dest destination of the compressed JPEGR image * @param hdr_ratio HDR ratio. If not configured, this value will be calculated by the JPEG/R * encoder. * @return NO_ERROR if encoding succeeds, error code if error occurs. */ status_t encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, jr_uncompressed_ptr uncompressed_yuv_420_image, jr_compressed_ptr compressed_jpeg_image, jr_compressed_ptr dest, float hdr_ratio = 0.0f); jr_compressed_ptr dest); /* * Compress JPEGR image from 10-bit HDR YUV and 8-bit SDR YUV. Loading @@ -125,14 +119,11 @@ public: * @param uncompressed_p010_image uncompressed HDR image in P010 color format * @param compressed_jpeg_image compressed 8-bit JPEG image * @param dest destination of the compressed JPEGR image * @param hdr_ratio HDR ratio. If not configured, this value will be calculated by the JPEG/R * encoder. * @return NO_ERROR if encoding succeeds, error code if error occurs. */ status_t encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, jr_compressed_ptr compressed_jpeg_image, jr_compressed_ptr dest, float hdr_ratio = 0.0f); jr_compressed_ptr dest); /* * Decompress JPEGR image. Loading libs/jpegrecoverymap/recoverymap.cpp +4 −8 Original line number Diff line number Diff line Loading @@ -83,8 +83,7 @@ status_t RecoveryMap::encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, jr_uncompressed_ptr uncompressed_yuv_420_image, jr_compressed_ptr dest, int quality, jr_exif_ptr /* exif */, float /* hdr_ratio */) { jr_exif_ptr /* exif */) { if (uncompressed_p010_image == nullptr || uncompressed_yuv_420_image == nullptr || dest == nullptr) { Loading Loading @@ -114,11 +113,10 @@ status_t RecoveryMap::encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, JPEGR_CHECK(compressRecoveryMap(&map, &compressed_map)); JpegEncoder jpeg_encoder; // TODO: what quality to use? // TODO: ICC data - need color space information if (!jpeg_encoder.compressImage(uncompressed_yuv_420_image->data, uncompressed_yuv_420_image->width, uncompressed_yuv_420_image->height, 95, nullptr, 0)) { uncompressed_yuv_420_image->height, quality, nullptr, 0)) { return ERROR_JPEGR_ENCODE_ERROR; } jpegr_compressed_struct jpeg; Loading @@ -133,8 +131,7 @@ status_t RecoveryMap::encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, status_t RecoveryMap::encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, jr_uncompressed_ptr uncompressed_yuv_420_image, jr_compressed_ptr compressed_jpeg_image, jr_compressed_ptr dest, float /* hdr_ratio */) { jr_compressed_ptr dest) { if (uncompressed_p010_image == nullptr || uncompressed_yuv_420_image == nullptr || compressed_jpeg_image == nullptr Loading Loading @@ -167,8 +164,7 @@ status_t RecoveryMap::encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, status_t RecoveryMap::encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, jr_compressed_ptr compressed_jpeg_image, jr_compressed_ptr dest, float /* hdr_ratio */) { jr_compressed_ptr dest) { if (uncompressed_p010_image == nullptr || compressed_jpeg_image == nullptr || dest == nullptr) { Loading Loading
libs/jpegrecoverymap/include/jpegrecoverymap/recoverymap.h +3 −12 Original line number Diff line number Diff line Loading @@ -82,16 +82,13 @@ public: * @param quality target quality of the JPEG encoding, must be in range of 0-100 where 100 is * the highest quality * @param exif pointer to the exif metadata. * @param hdr_ratio HDR ratio. If not configured, this value will be calculated by the JPEG/R * encoder. * @return NO_ERROR if encoding succeeds, error code if error occurs. */ status_t encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, jr_uncompressed_ptr uncompressed_yuv_420_image, jr_compressed_ptr dest, int quality, jr_exif_ptr exif, float hdr_ratio = 0.0f); jr_exif_ptr exif); /* * Compress JPEGR image from 10-bit HDR YUV, 8-bit SDR YUV and compressed 8-bit JPEG. Loading @@ -104,15 +101,12 @@ public: * @param uncompressed_yuv_420_image uncompressed SDR image in YUV_420 color format * @param compressed_jpeg_image compressed 8-bit JPEG image * @param dest destination of the compressed JPEGR image * @param hdr_ratio HDR ratio. If not configured, this value will be calculated by the JPEG/R * encoder. * @return NO_ERROR if encoding succeeds, error code if error occurs. */ status_t encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, jr_uncompressed_ptr uncompressed_yuv_420_image, jr_compressed_ptr compressed_jpeg_image, jr_compressed_ptr dest, float hdr_ratio = 0.0f); jr_compressed_ptr dest); /* * Compress JPEGR image from 10-bit HDR YUV and 8-bit SDR YUV. Loading @@ -125,14 +119,11 @@ public: * @param uncompressed_p010_image uncompressed HDR image in P010 color format * @param compressed_jpeg_image compressed 8-bit JPEG image * @param dest destination of the compressed JPEGR image * @param hdr_ratio HDR ratio. If not configured, this value will be calculated by the JPEG/R * encoder. * @return NO_ERROR if encoding succeeds, error code if error occurs. */ status_t encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, jr_compressed_ptr compressed_jpeg_image, jr_compressed_ptr dest, float hdr_ratio = 0.0f); jr_compressed_ptr dest); /* * Decompress JPEGR image. Loading
libs/jpegrecoverymap/recoverymap.cpp +4 −8 Original line number Diff line number Diff line Loading @@ -83,8 +83,7 @@ status_t RecoveryMap::encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, jr_uncompressed_ptr uncompressed_yuv_420_image, jr_compressed_ptr dest, int quality, jr_exif_ptr /* exif */, float /* hdr_ratio */) { jr_exif_ptr /* exif */) { if (uncompressed_p010_image == nullptr || uncompressed_yuv_420_image == nullptr || dest == nullptr) { Loading Loading @@ -114,11 +113,10 @@ status_t RecoveryMap::encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, JPEGR_CHECK(compressRecoveryMap(&map, &compressed_map)); JpegEncoder jpeg_encoder; // TODO: what quality to use? // TODO: ICC data - need color space information if (!jpeg_encoder.compressImage(uncompressed_yuv_420_image->data, uncompressed_yuv_420_image->width, uncompressed_yuv_420_image->height, 95, nullptr, 0)) { uncompressed_yuv_420_image->height, quality, nullptr, 0)) { return ERROR_JPEGR_ENCODE_ERROR; } jpegr_compressed_struct jpeg; Loading @@ -133,8 +131,7 @@ status_t RecoveryMap::encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, status_t RecoveryMap::encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, jr_uncompressed_ptr uncompressed_yuv_420_image, jr_compressed_ptr compressed_jpeg_image, jr_compressed_ptr dest, float /* hdr_ratio */) { jr_compressed_ptr dest) { if (uncompressed_p010_image == nullptr || uncompressed_yuv_420_image == nullptr || compressed_jpeg_image == nullptr Loading Loading @@ -167,8 +164,7 @@ status_t RecoveryMap::encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, status_t RecoveryMap::encodeJPEGR(jr_uncompressed_ptr uncompressed_p010_image, jr_compressed_ptr compressed_jpeg_image, jr_compressed_ptr dest, float /* hdr_ratio */) { jr_compressed_ptr dest) { if (uncompressed_p010_image == nullptr || compressed_jpeg_image == nullptr || dest == nullptr) { Loading