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 "decode.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 149 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 109 of file libuavs3d.c.

◆ libuavs3d_end()

static av_cold int libuavs3d_end ( AVCodecContext avctx)
static

Definition at line 126 of file libuavs3d.c.

◆ libuavs3d_flush()

static void libuavs3d_flush ( AVCodecContext avctx)
static

Definition at line 140 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 150 of file libuavs3d.c.

Variable Documentation

◆ ff_libuavs3d_decoder

const FFCodec ff_libuavs3d_decoder
Initial value:
= {
.p.name = "libuavs3d",
CODEC_LONG_NAME("libuavs3d AVS3-P2/IEEE1857.10"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(uavs3d_context),
.close = libuavs3d_end,
.flush = libuavs3d_flush,
.p.wrapper_name = "libuavs3d",
}

Definition at line 258 of file libuavs3d.c.

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:34
libuavs3d_decode_frame
static int libuavs3d_decode_frame(AVCodecContext *avctx, AVFrame *frm, int *got_frame, AVPacket *avpkt)
Definition: libuavs3d.c:150
uavs3d_context
Definition: libuavs3d.c:36
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:287
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:124
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
AV_CODEC_ID_AVS3
@ AV_CODEC_ID_AVS3
Definition: codec_id.h:248
libuavs3d_flush
static void libuavs3d_flush(AVCodecContext *avctx)
Definition: libuavs3d.c:140
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
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
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:76
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:73
libuavs3d_init
static av_cold int libuavs3d_init(AVCodecContext *avctx)
Definition: libuavs3d.c:109
libuavs3d_end
static av_cold int libuavs3d_end(AVCodecContext *avctx)
Definition: libuavs3d.c:126