FFmpeg
Data Structures | Macros | Functions | Variables
libuavs3d.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/avutil.h"
#include "libavutil/common.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "avs3.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, void *data, int *got_frame, AVPacket *avpkt)
 

Variables

AVCodec 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 43 of file libuavs3d.c.

◆ UAVS3D_CHECK_INVALID_RANGE

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

Definition at line 143 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 45 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 68 of file libuavs3d.c.

Referenced by libuavs3d_init().

◆ libuavs3d_init()

static av_cold int libuavs3d_init ( AVCodecContext avctx)
static

Definition at line 103 of file libuavs3d.c.

◆ libuavs3d_end()

static av_cold int libuavs3d_end ( AVCodecContext avctx)
static

Definition at line 120 of file libuavs3d.c.

◆ libuavs3d_flush()

static void libuavs3d_flush ( AVCodecContext avctx)
static

Definition at line 134 of file libuavs3d.c.

◆ libuavs3d_decode_frame()

static int libuavs3d_decode_frame ( AVCodecContext avctx,
void *  data,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 144 of file libuavs3d.c.

Variable Documentation

◆ ff_libuavs3d_decoder

AVCodec ff_libuavs3d_decoder
Initial value:
= {
.name = "libuavs3d",
.long_name = NULL_IF_CONFIG_SMALL("libuavs3d AVS3-P2/IEEE1857.10"),
.priv_data_size = sizeof(uavs3d_context),
.close = libuavs3d_end,
.caps_internal = FF_CODEC_CAP_AUTO_THREADS,
.wrapper_name = "libuavs3d",
}

Definition at line 249 of file libuavs3d.c.

AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
libuavs3d_decode_frame
static int libuavs3d_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: libuavs3d.c:144
uavs3d_context
Definition: libuavs3d.c:35
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:159
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
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:122
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:309
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:245
libuavs3d_flush
static void libuavs3d_flush(AVCodecContext *avctx)
Definition: libuavs3d.c:134
flush
static void flush(AVCodecContext *avctx)
Definition: aacdec_template.c:592
FF_CODEC_CAP_AUTO_THREADS
#define FF_CODEC_CAP_AUTO_THREADS
Codec handles avctx->thread_count == 0 (auto) internally.
Definition: internal.h:80
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:77
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
libuavs3d_init
static av_cold int libuavs3d_init(AVCodecContext *avctx)
Definition: libuavs3d.c:103
libuavs3d_end
static av_cold int libuavs3d_end(AVCodecContext *avctx)
Definition: libuavs3d.c:120