Encoder  4.4
VC-5 Sample Encoder
dpxfile.h
Go to the documentation of this file.
1 
7 #ifndef _DPXFILE_H
8 #define _DPXFILE_H
9 
13 typedef struct DPX_file_info
14 {
16  uint32_t offset;
17  uint32_t width;
18  uint32_t height;
19  uint8_t descriptor;
20  uint8_t bit_size;
21 
23 
24 } DPX_FileInfo;
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 uint32_t Pack10(uint32_t R, uint32_t G, uint32_t B);
31 
32 void Unpack10(uint32_t word, uint16_t *R, uint16_t *G, uint16_t *B);
33 CODEC_ERROR PackBufferRowsToDPX0(PIXEL *input_buffer, size_t input_pitch,
34  PIXEL *output_buffer, size_t output_pitch,
36 
37 CODEC_ERROR ConvertBufferRowsToDPX0(PIXEL *input_buffer, size_t input_pitch,
38  PIXEL *output_buffer, size_t output_pitch,
39  DIMENSION width, DIMENSION height);
40 
41 CODEC_ERROR PackBayerRowsToDPX0(PIXEL *input_buffer, size_t input_pitch,
42  PIXEL *output_buffer, size_t output_pitch,
43  DIMENSION width, DIMENSION height);
44 
45 CODEC_ERROR DPX_ReadFile(IMAGE *image, const char *pathname);
46 
47 CODEC_ERROR DPX_ParseHeader(IMAGE *image, DPX_FileInfo *info);
48 
49 CODEC_ERROR UnpackImageRowDPX0(uint8_t *input, DIMENSION width, PIXEL *buffer[],
50  PRECISION bits_per_component[], int channel_count,
51  ENABLED_PARTS enabled_parts);
52 
53 CODEC_ERROR PackLowpassBandsToDPX0(void **lowpass_buffer_array,
54  size_t *lowpass_pitch_array,
55  DIMENSION width,
56  DIMENSION height,
58  int shift,
59  IMAGE *output);
60 
62 
63 CODEC_ERROR DPX_WriteImage(const IMAGE *image, const char *pathname);
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 
69 #endif
uint8_t bit_size
Number of bits of precision.
Definition: dpxfile.h:20
CODEC_ERROR ConvertBufferRowsToDPX0(PIXEL *input_buffer, size_t input_pitch, PIXEL *output_buffer, size_t output_pitch, DIMENSION width, DIMENSION height)
Convert the intermediate decoded image into the output image in DPX pixel format. ...
Definition: dpxfile.c:628
CODEC_ERROR DPX_WriteImage(const IMAGE *image, const char *pathname)
Write an image to the specified file in DPX format.
Definition: dpxfile.c:1104
Data structure for information about a DPX file.
Definition: dpxfile.h:13
struct DPX_file_info DPX_FileInfo
Data structure for information about a DPX file.
uint8_t descriptor
Pixel format of the DPX image (Cineon standard)
Definition: dpxfile.h:19
CODEC_ERROR UnpackImageRowDPX0(uint8_t *input, DIMENSION width, PIXEL *buffer[], PRECISION bits_per_component[], int channel_count, ENABLED_PARTS enabled_parts)
Unpack a row of DPX pixels into separate component array rows.
Definition: dpxfile.c:420
uint_least16_t DIMENSION
Data type for image and frame dimensions.
Definition: types.h:24
PIXEL_FORMAT format
Pixel format of the DPX image (reference codec)
Definition: dpxfile.h:22
uint32_t Pack10(uint32_t R, uint32_t G, uint32_t B)
Pack the color components into a 32-bit word.
Definition: dpxfile.c:372
int16_t PIXEL
Data type for pixels.
Definition: pixel.h:22
CODEC_ERROR PackBufferRowsToDPX0(PIXEL *input_buffer, size_t input_pitch, PIXEL *output_buffer, size_t output_pitch, DIMENSION width, DIMENSION height)
Pack the intermediate decoded image into the output image in DPX pixel format.
Definition: dpxfile.c:587
CODEC_ERROR PackLowpassBandsToDPX0(void **lowpass_buffer_array, size_t *lowpass_pitch_array, DIMENSION width, DIMENSION height, PIXEL_FORMAT format, int shift, IMAGE *output)
Pack lowpass bands from a set of wavelets into an image in DPX0 format.
Definition: dpxfile.c:1055
enum _pixel_format PIXEL_FORMAT
Pixels formats supported by the codec.
CODEC_ERROR DPX_SetByteSwapFlag()
Prepare to write a DPX file.
Definition: dpxfile.c:1094
uint_least8_t PRECISION
Number of bits in a component value.
Definition: types.h:51
CODEC_ERROR PackBayerRowsToDPX0(PIXEL *input_buffer, size_t input_pitch, PIXEL *output_buffer, size_t output_pitch, DIMENSION width, DIMENSION height)
Pack the intermediate decoded image into the output image in DPX pixel format.
Definition: dpxfile.c:718
uint32_t width
Width of the DPX image.
Definition: dpxfile.h:17
uint32_t offset
Byte offset to the start of the image in the DPX file.
Definition: dpxfile.h:16
uint32_t height
Height of the DPX image.
Definition: dpxfile.h:18
enum _codec_error CODEC_ERROR
Codec error codes.
bool byte_swap_flag
Flags indicating whether values in the file are byte swapped.
Definition: dpxfile.h:15
Data structure for an image input to the unpacking process.
Definition: image.h:25
uint32_t ENABLED_PARTS
Data type for the bit mask that represents enabled parts.
Definition: types.h:70