1 /*
2 ** SPDX-License-Identifier: BSD-3-Clause
3 ** Copyright Contributors to the OpenEXR Project.
4 */
5 
6 #include "internal_compress.h"
7 #include "internal_decompress.h"
8 
9 #include "internal_xdr.h"
10 #include "internal_structs.h"
11 
12 #include <string.h>
13 
14 /**************************************/
15 
16 exr_result_t
internal_exr_apply_dwaa(exr_encode_pipeline_t * encode)17 internal_exr_apply_dwaa (exr_encode_pipeline_t* encode)
18 {
19     EXR_PROMOTE_CONST_CONTEXT_AND_PART_OR_ERROR_NO_LOCK (
20         encode->context, encode->part_index);
21     return pctxt->report_error (
22         pctxt,
23         EXR_ERR_FEATURE_NOT_IMPLEMENTED,
24         "DWA/A compression not yet implemented in C");
25 }
26 
27 /**************************************/
28 
29 exr_result_t
internal_exr_apply_dwab(exr_encode_pipeline_t * encode)30 internal_exr_apply_dwab (exr_encode_pipeline_t* encode)
31 {
32     EXR_PROMOTE_CONST_CONTEXT_AND_PART_OR_ERROR_NO_LOCK (
33         encode->context, encode->part_index);
34     return pctxt->report_error (
35         pctxt,
36         EXR_ERR_FEATURE_NOT_IMPLEMENTED,
37         "DWA/B compression not yet implemented in C");
38 }
39 
40 exr_result_t
internal_exr_undo_dwaa(exr_decode_pipeline_t * decode,const void * compressed_data,uint64_t comp_buf_size,void * uncompressed_data,uint64_t uncompressed_size)41 internal_exr_undo_dwaa (
42     exr_decode_pipeline_t* decode,
43     const void*            compressed_data,
44     uint64_t               comp_buf_size,
45     void*                  uncompressed_data,
46     uint64_t               uncompressed_size)
47 {
48     (void)compressed_data;
49     (void)comp_buf_size;
50     (void)uncompressed_data;
51     (void)uncompressed_size;
52     EXR_PROMOTE_CONST_CONTEXT_AND_PART_OR_ERROR_NO_LOCK (
53         decode->context, decode->part_index);
54     return pctxt->report_error (
55         pctxt,
56         EXR_ERR_FEATURE_NOT_IMPLEMENTED,
57         "DWA/A decompression not yet implemented in C");
58 }
59 
60 exr_result_t
internal_exr_undo_dwab(exr_decode_pipeline_t * decode,const void * compressed_data,uint64_t comp_buf_size,void * uncompressed_data,uint64_t uncompressed_size)61 internal_exr_undo_dwab (
62     exr_decode_pipeline_t* decode,
63     const void*            compressed_data,
64     uint64_t               comp_buf_size,
65     void*                  uncompressed_data,
66     uint64_t               uncompressed_size)
67 {
68     (void)compressed_data;
69     (void)comp_buf_size;
70     (void)uncompressed_data;
71     (void)uncompressed_size;
72     EXR_PROMOTE_CONST_CONTEXT_AND_PART_OR_ERROR_NO_LOCK (
73         decode->context, decode->part_index);
74     return pctxt->report_error (
75         pctxt,
76         EXR_ERR_FEATURE_NOT_IMPLEMENTED,
77         "DWA/B decompression not yet implemented in C");
78 }
79