FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
magicyuv.c File Reference
#include <stdlib.h>
#include <string.h>
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "lossless_videodsp.h"
#include "thread.h"

Go to the source code of this file.

Data Structures

struct  Slice
 
struct  HuffEntry
 
struct  MagicYUVContext
 

Macros

#define CACHED_BITSTREAM_READER   !ARCH_X86_32
 

Enumerations

enum  Prediction {
  LEFT = 1, GRADIENT, MEDIAN, LEFT = 1,
  GRADIENT, MEDIAN
}
 

Functions

static int huff_build (const uint8_t len[], uint16_t codes_pos[33], VLC *vlc, int nb_elems, void *logctx)
 
static void magicyuv_median_pred16 (uint16_t *dst, const uint16_t *src1, const uint16_t *diff, intptr_t w, int *left, int *left_top, int max)
 
static int magy_decode_slice10 (AVCodecContext *avctx, void *tdata, int j, int threadnr)
 
static int magy_decode_slice (AVCodecContext *avctx, void *tdata, int j, int threadnr)
 
static int build_huffman (AVCodecContext *avctx, const uint8_t *table, int table_size, int max)
 
static int magy_decode_frame (AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *avpkt)
 
static av_cold int magy_decode_init (AVCodecContext *avctx)
 
static av_cold int magy_decode_end (AVCodecContext *avctx)
 

Variables

const FFCodec ff_magicyuv_decoder
 

Macro Definition Documentation

◆ CACHED_BITSTREAM_READER

#define CACHED_BITSTREAM_READER   !ARCH_X86_32

Definition at line 25 of file magicyuv.c.

Enumeration Type Documentation

◆ Prediction

enum Prediction
Enumerator
LEFT 
GRADIENT 
MEDIAN 
LEFT 
GRADIENT 
MEDIAN 

Definition at line 42 of file magicyuv.c.

Function Documentation

◆ huff_build()

static int huff_build ( const uint8_t  len[],
uint16_t  codes_pos[33],
VLC vlc,
int  nb_elems,
void *  logctx 
)
static

Definition at line 75 of file magicyuv.c.

Referenced by build_huffman().

◆ magicyuv_median_pred16()

static void magicyuv_median_pred16 ( uint16_t *  dst,
const uint16_t *  src1,
const uint16_t *  diff,
intptr_t  w,
int left,
int left_top,
int  max 
)
static

Definition at line 93 of file magicyuv.c.

Referenced by magy_decode_slice10().

◆ magy_decode_slice10()

static int magy_decode_slice10 ( AVCodecContext avctx,
void *  tdata,
int  j,
int  threadnr 
)
static

Definition at line 114 of file magicyuv.c.

Referenced by magy_decode_frame().

◆ magy_decode_slice()

static int magy_decode_slice ( AVCodecContext avctx,
void *  tdata,
int  j,
int  threadnr 
)
static

Definition at line 246 of file magicyuv.c.

Referenced by magy_decode_frame().

◆ build_huffman()

static int build_huffman ( AVCodecContext avctx,
const uint8_t *  table,
int  table_size,
int  max 
)
static

Definition at line 377 of file magicyuv.c.

Referenced by magy_decode_frame().

◆ magy_decode_frame()

static int magy_decode_frame ( AVCodecContext avctx,
AVFrame p,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 430 of file magicyuv.c.

◆ magy_decode_init()

static av_cold int magy_decode_init ( AVCodecContext avctx)
static

Definition at line 674 of file magicyuv.c.

◆ magy_decode_end()

static av_cold int magy_decode_end ( AVCodecContext avctx)
static

Definition at line 681 of file magicyuv.c.

Variable Documentation

◆ ff_magicyuv_decoder

const FFCodec ff_magicyuv_decoder
Initial value:
= {
.p.name = "magicyuv",
CODEC_LONG_NAME("MagicYUV video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(MagicYUVContext),
.close = magy_decode_end,
.p.capabilities = AV_CODEC_CAP_DR1 |
}

Definition at line 695 of file magicyuv.c.

MagicYUVContext
Definition: magicyuv.c:53
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:306
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts_bsf.c:365
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
AV_CODEC_CAP_FRAME_THREADS
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: codec.h:107
magy_decode_init
static av_cold int magy_decode_init(AVCodecContext *avctx)
Definition: magicyuv.c:674
AV_CODEC_ID_MAGICYUV
@ AV_CODEC_ID_MAGICYUV
Definition: codec_id.h:273
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_SLICE_THREADS
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition: codec.h:111
magy_decode_end
static av_cold int magy_decode_end(AVCodecContext *avctx)
Definition: magicyuv.c:681
magy_decode_frame
static int magy_decode_frame(AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *avpkt)
Definition: magicyuv.c:430
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201