FFmpeg
Data Structures | Macros | Functions | Variables
libuavs3d.c File Reference
#include "libavutil/avutil.h"
#include "libavutil/common.h"
#include "libavutil/cpu.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "avs3.h"
#include "codec_internal.h"
#include "internal.h"
#include "uavs3d.h"

Go to the source code of this file.

Data Structures

struct  uavs3d_context
 

Macros

#define UAVS3D_CHECK_START_CODE(data_ptr, PIC_START_CODE)   (AV_RL32(data_ptr) != (PIC_START_CODE << 24) + AVS3_NAL_START_CODE)
 
#define UAVS3D_CHECK_INVALID_RANGE(v, l, r)   ((v)<(l)||(v)>(r))
 

Functions

static int uavs3d_find_next_start_code (const unsigned char *bs_data, int bs_len, int *left)
 
static void uavs3d_output_callback (uavs3d_io_frm_t *dec_frame)
 
static av_cold int libuavs3d_init (AVCodecContext *avctx)
 
static av_cold int libuavs3d_end (AVCodecContext *avctx)
 
static void libuavs3d_flush (AVCodecContext *avctx)
 
static int libuavs3d_decode_frame (AVCodecContext *avctx, AVFrame *frm, int *got_frame, AVPacket *avpkt)
 

Variables

const FFCodec ff_libuavs3d_decoder
 

Macro Definition Documentation

◆ UAVS3D_CHECK_START_CODE

#define UAVS3D_CHECK_START_CODE (   data_ptr,
  PIC_START_CODE 
)    (AV_RL32(data_ptr) != (PIC_START_CODE << 24) + AVS3_NAL_START_CODE)

Definition at line 44 of file libuavs3d.c.

◆ UAVS3D_CHECK_INVALID_RANGE

#define UAVS3D_CHECK_INVALID_RANGE (   v,
  l,
  r 
)    ((v)<(l)||(v)>(r))

Definition at line 144 of file libuavs3d.c.

Function Documentation

◆ uavs3d_find_next_start_code()

static int uavs3d_find_next_start_code ( const unsigned char *  bs_data,
int  bs_len,
int left 
)
static

Definition at line 46 of file libuavs3d.c.

Referenced by libuavs3d_decode_frame().

◆ uavs3d_output_callback()

static void uavs3d_output_callback ( uavs3d_io_frm_t *  dec_frame)
static

Definition at line 69 of file libuavs3d.c.

Referenced by libuavs3d_init().

◆ libuavs3d_init()

static av_cold int libuavs3d_init ( AVCodecContext avctx)
static

Definition at line 104 of file libuavs3d.c.

◆ libuavs3d_end()

static av_cold int libuavs3d_end ( AVCodecContext avctx)
static

Definition at line 121 of file libuavs3d.c.

◆ libuavs3d_flush()

static void libuavs3d_flush ( AVCodecContext avctx)
static

Definition at line 135 of file libuavs3d.c.

◆ libuavs3d_decode_frame()

static int libuavs3d_decode_frame ( AVCodecContext avctx,
AVFrame frm,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 145 of file libuavs3d.c.

Variable Documentation

◆ ff_libuavs3d_decoder

const FFCodec ff_libuavs3d_decoder
Initial value:
= {
.p.name = "libuavs3d",
.p.long_name = NULL_IF_CONFIG_SMALL("libuavs3d AVS3-P2/IEEE1857.10"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(uavs3d_context),
.close = libuavs3d_end,
.flush = libuavs3d_flush,
.p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
.p.wrapper_name = "libuavs3d",
}

Definition at line 249 of file libuavs3d.c.

AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
FF_CODEC_CAP_NOT_INIT_THREADSAFE
#define FF_CODEC_CAP_NOT_INIT_THREADSAFE
The codec is not known to be init-threadsafe (i.e.
Definition: codec_internal.h:33
init
static int init
Definition: av_tx.c:47
libuavs3d_decode_frame
static int libuavs3d_decode_frame(AVCodecContext *avctx, AVFrame *frm, int *got_frame, AVPacket *avpkt)
Definition: libuavs3d.c:145
uavs3d_context
Definition: libuavs3d.c:36
AV_PIX_FMT_YUV420P10LE
@ AV_PIX_FMT_YUV420P10LE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:149
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:260
AV_CODEC_CAP_OTHER_THREADS
#define AV_CODEC_CAP_OTHER_THREADS
Codec supports multithreading through a method other than slice- or frame-level multithreading.
Definition: codec.h:127
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:66
AV_CODEC_ID_AVS3
@ AV_CODEC_ID_AVS3
Definition: codec_id.h:246
libuavs3d_flush
static void libuavs3d_flush(AVCodecContext *avctx)
Definition: libuavs3d.c:135
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
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AV_CODEC_CAP_DELAY
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: codec.h:82
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
FF_CODEC_CAP_AUTO_THREADS
#define FF_CODEC_CAP_AUTO_THREADS
Codec handles avctx->thread_count == 0 (auto) internally.
Definition: codec_internal.h:72
libuavs3d_init
static av_cold int libuavs3d_init(AVCodecContext *avctx)
Definition: libuavs3d.c:104
libuavs3d_end
static av_cold int libuavs3d_end(AVCodecContext *avctx)
Definition: libuavs3d.c:121