FFmpeg
Data Structures | Macros | Functions | Variables
utvideodec.c File Reference
#include <inttypes.h>
#include <stdlib.h>
#include "libavutil/intreadwrite.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "bswapdsp.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "get_bits.h"
#include "thread.h"
#include "utvideo.h"

Go to the source code of this file.

Data Structures

struct  HuffEntry
 

Macros

#define CACHED_BITSTREAM_READER   !ARCH_X86_32
 
#define UNCHECKED_BITSTREAM_READER   1
 
#define VLC_BITS   11
 

Functions

static int build_huff (UtvideoContext *c, const uint8_t *src, VLC *vlc, int *fsym, unsigned nb_elems)
 
static int decode_plane10 (UtvideoContext *c, int plane_no, uint16_t *dst, ptrdiff_t stride, int width, int height, const uint8_t *src, const uint8_t *huff, int use_pred)
 
static int compute_cmask (int plane_no, int interlaced, enum AVPixelFormat pix_fmt)
 
static int decode_plane (UtvideoContext *c, int plane_no, uint8_t *dst, ptrdiff_t stride, int width, int height, const uint8_t *src, int use_pred)
 
static void restore_median_planar (UtvideoContext *c, uint8_t *src, ptrdiff_t stride, int width, int height, int slices, int rmode)
 
static void restore_median_planar_il (UtvideoContext *c, uint8_t *src, ptrdiff_t stride, int width, int height, int slices, int rmode)
 
static void restore_gradient_planar (UtvideoContext *c, uint8_t *src, ptrdiff_t stride, int width, int height, int slices, int rmode)
 
static void restore_gradient_planar_il (UtvideoContext *c, uint8_t *src, ptrdiff_t stride, int width, int height, int slices, int rmode)
 
static int decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 
static av_cold int decode_init (AVCodecContext *avctx)
 
static av_cold int decode_end (AVCodecContext *avctx)
 

Variables

const FFCodec ff_utvideo_decoder
 

Detailed Description

Ut Video decoder

Definition in file utvideodec.c.

Macro Definition Documentation

◆ CACHED_BITSTREAM_READER

#define CACHED_BITSTREAM_READER   !ARCH_X86_32

Definition at line 30 of file utvideodec.c.

◆ UNCHECKED_BITSTREAM_READER

#define UNCHECKED_BITSTREAM_READER   1

Definition at line 31 of file utvideodec.c.

◆ VLC_BITS

#define VLC_BITS   11

Function Documentation

◆ build_huff()

static int build_huff ( UtvideoContext c,
const uint8_t *  src,
VLC vlc,
int fsym,
unsigned  nb_elems 
)
static

Definition at line 48 of file utvideodec.c.

Referenced by decode_plane(), and decode_plane10().

◆ decode_plane10()

static int decode_plane10 ( UtvideoContext c,
int  plane_no,
uint16_t *  dst,
ptrdiff_t  stride,
int  width,
int  height,
const uint8_t *  src,
const uint8_t *  huff,
int  use_pred 
)
static

Definition at line 90 of file utvideodec.c.

Referenced by decode_frame().

◆ compute_cmask()

static int compute_cmask ( int  plane_no,
int  interlaced,
enum AVPixelFormat  pix_fmt 
)
static

Definition at line 193 of file utvideodec.c.

Referenced by decode_plane().

◆ decode_plane()

static int decode_plane ( UtvideoContext c,
int  plane_no,
uint8_t *  dst,
ptrdiff_t  stride,
int  width,
int  height,
const uint8_t *  src,
int  use_pred 
)
static

Definition at line 203 of file utvideodec.c.

Referenced by decode_frame().

◆ restore_median_planar()

static void restore_median_planar ( UtvideoContext c,
uint8_t *  src,
ptrdiff_t  stride,
int  width,
int  height,
int  slices,
int  rmode 
)
static

Definition at line 357 of file utvideodec.c.

Referenced by decode_frame().

◆ restore_median_planar_il()

static void restore_median_planar_il ( UtvideoContext c,
uint8_t *  src,
ptrdiff_t  stride,
int  width,
int  height,
int  slices,
int  rmode 
)
static

Definition at line 409 of file utvideodec.c.

Referenced by decode_frame().

◆ restore_gradient_planar()

static void restore_gradient_planar ( UtvideoContext c,
uint8_t *  src,
ptrdiff_t  stride,
int  width,
int  height,
int  slices,
int  rmode 
)
static

Definition at line 464 of file utvideodec.c.

Referenced by decode_frame().

◆ restore_gradient_planar_il()

static void restore_gradient_planar_il ( UtvideoContext c,
uint8_t *  src,
ptrdiff_t  stride,
int  width,
int  height,
int  slices,
int  rmode 
)
static

Definition at line 505 of file utvideodec.c.

Referenced by decode_frame().

◆ decode_frame()

static int decode_frame ( AVCodecContext avctx,
AVFrame frame,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 560 of file utvideodec.c.

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 882 of file utvideodec.c.

◆ decode_end()

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 1044 of file utvideodec.c.

Variable Documentation

◆ ff_utvideo_decoder

const FFCodec ff_utvideo_decoder
Initial value:
= {
.p.name = "utvideo",
.p.long_name = NULL_IF_CONFIG_SMALL("Ut Video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(UtvideoContext),
.close = decode_end,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 1053 of file utvideodec.c.

decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: utvideodec.c:882
decode_end
static av_cold int decode_end(AVCodecContext *avctx)
Definition: utvideodec.c:1044
init
static int init
Definition: av_tx.c:47
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:254
AV_CODEC_ID_UTVIDEO
@ AV_CODEC_ID_UTVIDEO
Definition: codec_id.h:203
AV_CODEC_CAP_FRAME_THREADS
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: codec.h:113
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
decode_frame
static int decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: utvideodec.c:560
FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: codec_internal.h:31
UtvideoContext
Definition: utvideo.h:64
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201