blob: bd926523689b7ba076888e9dc68d353a51dc9f08 [file] [log] [blame]
Dichen Zhang85b37562022-10-11 11:08:28 -07001/*
2 * Copyright 2022 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <jpegrecoverymap/recoverymap.h>
18
19namespace android::recoverymap {
20
Dichen Zhang596a7562022-10-12 14:57:05 -070021bool RecoveryMap::decodeRecoveryMap(j_r_compressed_ptr compressed_recovery_map,
22 j_r_uncompressed_ptr dest) {
23 if (compressed_recovery_map == nullptr || dest == nullptr) {
24 return false;
25 }
26
27 // TBD
28 return true;
29}
30
31bool RecoveryMap::encodeRecoveryMap(j_r_uncompressed_ptr uncompressed_recovery_map,
32 j_r_compressed_ptr dest) {
33 if (uncompressed_recovery_map == nullptr || dest == nullptr) {
34 return false;
35 }
36
37 // TBD
38 return true;
39}
40
41bool RecoveryMap::generateRecoveryMap(j_r_uncompressed_ptr uncompressed_yuv_420_image,
42 j_r_uncompressed_ptr uncompressed_p010_image,
43 j_r_uncompressed_ptr dest) {
44 if (uncompressed_yuv_420_image == nullptr
45 || uncompressed_p010_image == nullptr
46 || dest == nullptr) {
47 return false;
48 }
49
50 // TBD
51 return true;
52}
53
54bool RecoveryMap::applyRecoveryMap(j_r_uncompressed_ptr uncompressed_yuv_420_image,
55 j_r_uncompressed_ptr uncompressed_recovery_map,
56 j_r_uncompressed_ptr dest) {
57 if (uncompressed_yuv_420_image == nullptr
58 || uncompressed_recovery_map == nullptr
59 || dest == nullptr) {
60 return false;
61 }
62
63 // TBD
64 return true;
65}
66
67j_r_compressed_ptr RecoveryMap::extractRecoveryMap(void* compressed_jpeg_r_image) {
68 if (compressed_jpeg_r_image == nullptr) {
Dichen Zhang85b37562022-10-11 11:08:28 -070069 return nullptr;
70 }
71
72 // TBD
73 return nullptr;
74}
75
Dichen Zhang596a7562022-10-12 14:57:05 -070076void* RecoveryMap::appendRecoveryMap(void* compressed_jpeg_image,
77 j_r_compressed_ptr compressed_recovery_map) {
Dichen Zhang85b37562022-10-11 11:08:28 -070078 if (compressed_jpeg_image == nullptr || compressed_recovery_map == nullptr) {
79 return nullptr;
80 }
81
82 // TBD
83 return nullptr;
84}
85
86} // namespace android::recoverymap