FFmpeg
Functions | Variables
dpx.c File Reference
#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 37 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 49 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 61 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 79 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 94 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 126 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 265 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 279 of file dpx.c.

◆ decode_end()

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 815 of file dpx.c.

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 822 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.id = AV_CODEC_ID_DPX,
.init = decode_init,
.close = decode_end,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP |
.hw_configs = (const AVCodecHWConfigInternal *const []) {
},
}

Definition at line 829 of file dpx.c.

AV_CODEC_ID_DPX
@ AV_CODEC_ID_DPX
Definition: codec_id.h:180
FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: codec_internal.h:42
decode_frame
static int decode_frame(AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *avpkt)
Definition: dpx.c:279
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: dpx.c:822
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:347
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:332
AV_CODEC_CAP_FRAME_THREADS
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: codec.h:95
NULL
#define NULL
Definition: coverity.c:32
UPDATE_THREAD_CONTEXT
#define UPDATE_THREAD_CONTEXT(func)
Definition: codec_internal.h:341
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM
#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...
Definition: codec_internal.h:54
AVCodecHWConfigInternal
Definition: hwconfig.h:25
decode_end
static av_cold int decode_end(AVCodecContext *avctx)
Definition: dpx.c:815
update_thread_context
the pkt_dts and pkt_pts fields in AVFrame will work as usual Restrictions on codec whose streams don t reset across will not work because their bitstreams cannot be decoded in parallel *The contents of buffers must not be read before as well as code calling up to before the decode process starts Call have update_thread_context() run it in the next thread. Add AV_CODEC_CAP_FRAME_THREADS to the codec capabilities. There will be very little speed gain at this point but it should work. Use ff_thread_get_buffer()(or ff_progress_frame_get_buffer() in case you have inter-frame dependencies and use the ProgressFrame API) to allocate frame buffers. Call ff_progress_frame_report() after some part of the current picture has decoded. A good place to put this is where draw_horiz_band() is called - add this if it isn 't called anywhere
Windows::Graphics::DirectX::Direct3D11::p
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p
Definition: vsrc_gfxcapture_winrt.hpp:53
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:200
DPXDecContext
Definition: dpx.h:60