FFmpeg
|
exr.c File Reference
OpenEXR decoder. More...
#include <zlib.h>
#include "avcodec.h"
#include "bytestream.h"
#include "mathops.h"
#include "thread.h"
#include "libavutil/imgutils.h"
#include "libavutil/avassert.h"
Include dependency graph for exr.c:

Go to the source code of this file.
Data Structures | |
struct | EXRChannel |
struct | EXRThreadData |
struct | EXRContext |
Typedefs | |
typedef struct EXRChannel | EXRChannel |
typedef struct EXRThreadData | EXRThreadData |
typedef struct EXRContext | EXRContext |
Enumerations | |
enum | ExrCompr { EXR_RAW = 0, EXR_RLE = 1, EXR_ZIP1 = 2, EXR_ZIP16 = 3, EXR_PIZ = 4, EXR_PXR24 = 5, EXR_B44 = 6, EXR_B44A = 7 } |
enum | ExrPixelType { EXR_UINT, EXR_HALF, EXR_FLOAT } |
Functions | |
static uint16_t | exr_flt2uint (uint32_t v) |
Converts from 32-bit float as uint32_t to uint16_t. More... | |
static uint16_t | exr_halflt2uint (uint16_t v) |
Converts from 16-bit float as uint16_t to uint16_t. More... | |
static unsigned int | get_header_variable_length (const uint8_t **buf, const uint8_t *buf_end) |
Gets the size of the header variable. More... | |
static int | check_header_variable (AVCodecContext *avctx, const uint8_t **buf, const uint8_t *buf_end, const char *value_name, const char *value_type, unsigned int minimum_length, unsigned int *variable_buffer_data_size) |
Checks if the variable name corresponds with it's data type. More... | |
static void | predictor (uint8_t *src, int size) |
static void | reorder_pixels (uint8_t *src, uint8_t *dst, int size) |
static int | zip_uncompress (const uint8_t *src, int compressed_size, int uncompressed_size, EXRThreadData *td) |
static int | rle_uncompress (const uint8_t *src, int compressed_size, int uncompressed_size, EXRThreadData *td) |
static int | pxr24_uncompress (EXRContext *s, const uint8_t *src, int compressed_size, int uncompressed_size, EXRThreadData *td) |
static int | decode_block (AVCodecContext *avctx, void *tdata, int jobnr, int threadnr) |
static int | decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) |
static av_cold int | decode_end (AVCodecContext *avctx) |
Variables | |
AVCodec | ff_exr_decoder |
Detailed Description
OpenEXR decoder.
For more information on the OpenEXR format, visit: http://openexr.com/
exr_flt2uint() and exr_halflt2uint() is credited to Reimar Döffinger
Definition in file exr.c.
Function Documentation
|
static |
Checks if the variable name corresponds with it's data type.
- Parameters
-
*avctx the AVCodecContext **buf the current pointer location in the header where the variable name starts *buf_end pointer location of the end of the buffer *value_name name of the varible to check *value_type type of the varible to check minimum_length minimum length of the variable data variable_buffer_data_size variable length read from the header after it's checked
- Returns
- negative if variable is invalid
|
inlinestatic |
Converts from 32-bit float as uint32_t to uint16_t.
- Parameters
-
v 32-bit float
- Returns
- normalized 16-bit unsigned int
Definition at line 104 of file exr.c.
Referenced by check_header_variable().
|
inlinestatic |
Converts from 16-bit float as uint16_t to uint16_t.
- Parameters
-
v 16-bit float
- Returns
- normalized 16-bit unsigned int
Definition at line 123 of file exr.c.
Referenced by check_header_variable().
|
static |
Gets the size of the header variable.
- Parameters
-
**buf the current pointer location in the header where the variable data starts *buf_end pointer location of the end of the buffer
- Returns
- size of variable data
Definition at line 142 of file exr.c.
Referenced by check_header_variable().
Variable Documentation
AVCodec ff_exr_decoder |
Initial value:
= {
.name = "exr",
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_EXR,
.priv_data_size = sizeof(EXRContext),
.close = decode_end,
.decode = decode_frame,
.long_name = NULL_IF_CONFIG_SMALL("OpenEXR image"),
}
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: libavcodec/avcodec.h:743
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: libavutil/internal.h:123
#define CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition: libavcodec/avcodec.h:814
Definition: exr.c:72
#define CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: libavcodec/avcodec.h:810
Generated on Sat Jun 21 2025 06:53:36 for FFmpeg by
