FFmpeg
Loading...
Searching...
No Matches
dpx.c File Reference
#include "libavutil/attributes.h"
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat.h"
#include "libavutil/imgutils.h"
#include "libavutil/timecode.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "dpx.h"
#include "thread.h"
#include "hwconfig.h"
#include "hwaccel_internal.h"
#include "config_components.h"

Go to the source code of this file.

Functions

static unsigned int read16 (const uint8_t **ptr, int is_big)
 
static unsigned int read32 (const uint8_t **ptr, int is_big)
 
static uint16_t read10in32_gray (const uint8_t **ptr, uint32_t *lbuf, int *n_datum, int is_big, int shift)
 
static uint16_t read10in32 (const uint8_t **ptr, uint32_t *lbuf, int *n_datum, int is_big, int shift)
 
static uint16_t read12in32 (const uint8_t **ptr, uint32_t *lbuf, int *n_datum, int is_big)
 
static void unpack_frame (AVCodecContext *avctx, AVFrame *p, const uint8_t *buf, int elements, int endian)
 
static enum AVPixelFormat get_pixel_format (AVCodecContext *avctx, enum AVPixelFormat pix_fmt)
 
static int decode_frame (AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *avpkt)
 
static av_cold int decode_end (AVCodecContext *avctx)
 
static av_cold int decode_init (AVCodecContext *avctx)
 

Variables

const FFCodec ff_dpx_decoder
 

Function Documentation

◆ read16()

static unsigned int read16 ( const uint8_t ** ptr,
int is_big )
static

Definition at line 38 of file dpx.c.

Referenced by decode_frame(), and unpack_frame().

◆ read32()

static unsigned int read32 ( const uint8_t ** ptr,
int is_big )
static

Definition at line 50 of file dpx.c.

Referenced by decode_frame(), read10in32(), read10in32_gray(), and read12in32().

◆ read10in32_gray()

static uint16_t read10in32_gray ( const uint8_t ** ptr,
uint32_t * lbuf,
int * n_datum,
int is_big,
int shift )
static

Definition at line 62 of file dpx.c.

Referenced by unpack_frame().

◆ read10in32()

static uint16_t read10in32 ( const uint8_t ** ptr,
uint32_t * lbuf,
int * n_datum,
int is_big,
int shift )
static

Definition at line 80 of file dpx.c.

Referenced by unpack_frame().

◆ read12in32()

static uint16_t read12in32 ( const uint8_t ** ptr,
uint32_t * lbuf,
int * n_datum,
int is_big )
static

Definition at line 95 of file dpx.c.

Referenced by unpack_frame().

◆ unpack_frame()

static void unpack_frame ( AVCodecContext * avctx,
AVFrame * p,
const uint8_t * buf,
int elements,
int endian )
static

Definition at line 127 of file dpx.c.

Referenced by decode_frame(), and decode_row().

◆ get_pixel_format()

static enum AVPixelFormat get_pixel_format ( AVCodecContext * avctx,
enum AVPixelFormat pix_fmt )
static

Definition at line 267 of file dpx.c.

Referenced by decode_frame().

◆ decode_frame()

static int decode_frame ( AVCodecContext * avctx,
AVFrame * p,
int * got_frame,
AVPacket * avpkt )
static

Definition at line 281 of file dpx.c.

◆ decode_end()

static av_cold int decode_end ( AVCodecContext * avctx)
static

Definition at line 818 of file dpx.c.

◆ decode_init()

static av_cold int decode_init ( AVCodecContext * avctx)
static

Definition at line 825 of file dpx.c.

Variable Documentation

◆ ff_dpx_decoder

const FFCodec ff_dpx_decoder
Initial value:
= {
.p.name = "dpx",
CODEC_LONG_NAME("DPX (Digital Picture Exchange) image"),
.priv_data_size = sizeof(DPXDecContext),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_DPX,
.init = decode_init,
.close = decode_end,
UPDATE_THREAD_CONTEXT(update_thread_context),
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP |
.hw_configs = (const AVCodecHWConfigInternal *const []) {
},
}
#define UPDATE_THREAD_CONTEXT(func)
#define FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM
The decoder extracts and fills its parameters even if the frame is skipped due to the skip_frame sett...
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
#define NULL
Definition coverity.c:32
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition codec.h:98
@ AV_CODEC_ID_DPX
Definition codec_id.h:178
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
static av_cold int decode_init(AVCodecContext *avctx)
Definition 4xm.c:998
static av_cold int decode_end(AVCodecContext *avctx)
Definition 4xm.c:980
static int decode_frame(AVCodecContext *avctx, AVFrame *picture, int *got_frame, AVPacket *avpkt)
Definition 4xm.c:837

Definition at line 832 of file dpx.c.