FFmpeg
Loading...
Searching...
No Matches
apv_decode.c File Reference
#include <stdatomic.h>
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/mastering_display_metadata.h"
#include "libavutil/mem_internal.h"
#include "libavutil/pixdesc.h"
#include "libavutil/thread.h"
#include "apv.h"
#include "apv_decode.h"
#include "avcodec.h"
#include "cbs_apv.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.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 enum AVPixelFormat get_pixel_format (AVCodecContext *avctx, enum AVPixelFormat pix_fmt)
 
static int apv_decode_check_format (AVCodecContext *avctx, const APVRawFrameHeader *header)
 
static av_cold void apv_entropy_build_decode_lut (void)
 
static av_cold int apv_decode_init (AVCodecContext *avctx)
 
static av_cold void apv_decode_flush (AVCodecContext *avctx)
 
static av_cold int apv_decode_close (AVCodecContext *avctx)
 
static int apv_decode_block (AVCodecContext *avctx, void *output, ptrdiff_t pitch, GetBitContext *gbc, APVEntropyState *entropy_state, int bit_depth, int qp_shift, const uint16_t *qmatrix)
 
static int apv_decode_tile_component (AVCodecContext *avctx, void *data, int job, int thread)
 
static void apv_derive_tile_info (APVDerivedTileInfo *ti, const APVRawFrameHeader *fh)
 
static int apv_decode (AVCodecContext *avctx, AVFrame *output, APVRawFrame *input)
 
static int apv_decode_metadata (AVCodecContext *avctx, AVFrame *frame, const APVRawMetadata *md)
 
static int apv_receive_frame_internal (AVCodecContext *avctx, AVFrame *frame)
 
static int apv_receive_frame (AVCodecContext *avctx, AVFrame *frame)
 

Variables

static enum AVPixelFormat apv_format_table [5][4]
 
APVVLCLUT ff_apv_decode_lut
 
static const CodedBitstreamUnitType apv_decompose_unit_types []
 
static AVOnce apv_entropy_once = AV_ONCE_INIT
 
const FFCodec ff_apv_decoder
 

Function Documentation

◆ get_pixel_format()

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

Definition at line 50 of file apv_decode.c.

Referenced by apv_decode_check_format().

◆ apv_decode_check_format()

static int apv_decode_check_format ( AVCodecContext * avctx,
const APVRawFrameHeader * header )
static

Definition at line 64 of file apv_decode.c.

Referenced by apv_decode().

◆ apv_entropy_build_decode_lut()

static av_cold void apv_entropy_build_decode_lut ( void )
static

Definition at line 133 of file apv_decode.c.

Referenced by apv_decode_init().

◆ apv_decode_init()

static av_cold int apv_decode_init ( AVCodecContext * avctx)
static

Definition at line 138 of file apv_decode.c.

◆ apv_decode_flush()

static av_cold void apv_decode_flush ( AVCodecContext * avctx)
static

Definition at line 166 of file apv_decode.c.

◆ apv_decode_close()

static av_cold int apv_decode_close ( AVCodecContext * avctx)
static

Definition at line 176 of file apv_decode.c.

◆ apv_decode_block()

static int apv_decode_block ( AVCodecContext * avctx,
void * output,
ptrdiff_t pitch,
GetBitContext * gbc,
APVEntropyState * entropy_state,
int bit_depth,
int qp_shift,
const uint16_t * qmatrix )
static

Definition at line 186 of file apv_decode.c.

Referenced by apv_decode_tile_component().

◆ apv_decode_tile_component()

static int apv_decode_tile_component ( AVCodecContext * avctx,
void * data,
int job,
int thread )
static

Definition at line 212 of file apv_decode.c.

Referenced by apv_decode().

◆ apv_derive_tile_info()

static void apv_derive_tile_info ( APVDerivedTileInfo * ti,
const APVRawFrameHeader * fh )
static

Definition at line 330 of file apv_decode.c.

Referenced by apv_decode().

◆ apv_decode()

static int apv_decode ( AVCodecContext * avctx,
AVFrame * output,
APVRawFrame * input )
static

Definition at line 356 of file apv_decode.c.

Referenced by apv_receive_frame_internal().

◆ apv_decode_metadata()

static int apv_decode_metadata ( AVCodecContext * avctx,
AVFrame * frame,
const APVRawMetadata * md )
static

Definition at line 441 of file apv_decode.c.

Referenced by apv_receive_frame_internal().

◆ apv_receive_frame_internal()

static int apv_receive_frame_internal ( AVCodecContext * avctx,
AVFrame * frame )
static

Definition at line 506 of file apv_decode.c.

Referenced by apv_receive_frame().

◆ apv_receive_frame()

static int apv_receive_frame ( AVCodecContext * avctx,
AVFrame * frame )
static

Definition at line 567 of file apv_decode.c.

Variable Documentation

◆ apv_format_table

enum AVPixelFormat apv_format_table[5][4]
static
Initial value:
= {
}
#define AV_PIX_FMT_YUV444P12
Definition pixfmt.h:552
#define AV_PIX_FMT_YUVA444P10
Definition pixfmt.h:598
#define AV_PIX_FMT_YUV422P12
Definition pixfmt.h:550
#define AV_PIX_FMT_YUV422P10
Definition pixfmt.h:546
#define AV_PIX_FMT_GRAY12
Definition pixfmt.h:526
@ AV_PIX_FMT_NONE
Definition pixfmt.h:72
#define AV_PIX_FMT_YUV422P14
Definition pixfmt.h:554
#define AV_PIX_FMT_GRAY10
Definition pixfmt.h:525
#define AV_PIX_FMT_GRAY14
Definition pixfmt.h:527
#define AV_PIX_FMT_YUV422P16
Definition pixfmt.h:557
#define AV_PIX_FMT_GRAY16
Definition pixfmt.h:528
#define AV_PIX_FMT_YUVA444P16
Definition pixfmt.h:603
#define AV_PIX_FMT_YUV444P14
Definition pixfmt.h:555
#define AV_PIX_FMT_YUVA444P12
Definition pixfmt.h:600
#define AV_PIX_FMT_YUV444P16
Definition pixfmt.h:558
#define AV_PIX_FMT_YUV444P10
Definition pixfmt.h:548

Definition at line 40 of file apv_decode.c.

Referenced by apv_decode_check_format(), and parse().

◆ ff_apv_decode_lut

APVVLCLUT ff_apv_decode_lut

Definition at line 48 of file apv_decode.c.

Referenced by apv_decode_tile_component(), and apv_entropy_build_decode_lut().

◆ apv_decompose_unit_types

const CodedBitstreamUnitType apv_decompose_unit_types[]
static
Initial value:
= {
}
@ APV_PBU_PRIMARY_FRAME
Definition apv.h:27
@ APV_PBU_METADATA
Definition apv.h:33

Definition at line 126 of file apv_decode.c.

Referenced by apv_decode_init().

◆ apv_entropy_once

AVOnce apv_entropy_once = AV_ONCE_INIT
static

Definition at line 131 of file apv_decode.c.

Referenced by apv_decode_init().

◆ ff_apv_decoder

const FFCodec ff_apv_decoder
Initial value:
= {
.p.name = "apv",
CODEC_LONG_NAME("Advanced Professional Video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_APV,
.priv_data_size = sizeof(APVDecodeContext),
UPDATE_THREAD_CONTEXT(update_thread_context),
.p.capabilities = AV_CODEC_CAP_DR1 |
.hw_configs = (const AVCodecHWConfigInternal *const []) {
},
}
static av_cold void apv_decode_flush(AVCodecContext *avctx)
Definition apv_decode.c:166
static av_cold int apv_decode_init(AVCodecContext *avctx)
Definition apv_decode.c:138
static av_cold int apv_decode_close(AVCodecContext *avctx)
Definition apv_decode.c:176
static int apv_receive_frame(AVCodecContext *avctx, AVFrame *frame)
Definition apv_decode.c:567
static av_cold void close(AVCodecParserContext *s)
Definition apv_parser.c:197
#define UPDATE_THREAD_CONTEXT(func)
#define FF_CODEC_RECEIVE_FRAME_CB(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 CODEC_LONG_NAME(str)
#define NULL
Definition coverity.c:32
void(* flush)(AVBSFContext *ctx)
Definition dts2pts.c:610
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
#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_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition codec.h:102
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition codec.h:98
@ AV_CODEC_ID_APV
Definition codec_id.h:323
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200

Definition at line 609 of file apv_decode.c.