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 "get_bits.h"
#include "huffyuvdsp.h"
#include "internal.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 (HuffEntry he[], uint16_t codes_count[33], VLC *vlc, int nb_elems)
 
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, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold int magy_decode_init (AVCodecContext *avctx)
 
static av_cold int magy_decode_end (AVCodecContext *avctx)
 

Variables

AVCodec ff_magicyuv_decoder
 

Macro Definition Documentation

#define CACHED_BITSTREAM_READER   !ARCH_X86_32

Definition at line 25 of file magicyuv.c.

Enumeration Type Documentation

enum Prediction
Enumerator
LEFT 
GRADIENT 
MEDIAN 
LEFT 
GRADIENT 
MEDIAN 

Definition at line 42 of file magicyuv.c.

Function Documentation

static int huff_build ( HuffEntry  he[],
uint16_t  codes_count[33],
VLC vlc,
int  nb_elems 
)
static

Definition at line 75 of file magicyuv.c.

Referenced by build_huffman().

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 97 of file magicyuv.c.

Referenced by magy_decode_slice10().

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

Definition at line 118 of file magicyuv.c.

Referenced by magy_decode_frame().

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

Definition at line 250 of file magicyuv.c.

Referenced by magy_decode_frame().

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

Definition at line 381 of file magicyuv.c.

Referenced by magy_decode_frame().

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

Definition at line 434 of file magicyuv.c.

static av_cold int magy_decode_init ( AVCodecContext avctx)
static

Definition at line 677 of file magicyuv.c.

static av_cold int magy_decode_end ( AVCodecContext avctx)
static

Definition at line 684 of file magicyuv.c.

Variable Documentation

AVCodec ff_magicyuv_decoder
Initial value:
= {
.name = "magicyuv",
.long_name = NULL_IF_CONFIG_SMALL("MagicYUV video"),
.priv_data_size = sizeof(MagicYUVContext),
.close = magy_decode_end,
.capabilities = AV_CODEC_CAP_DR1 |
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
#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: internal.h:40
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:153
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: codec.h:106
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition: codec.h:110
static av_cold int magy_decode_init(AVCodecContext *avctx)
Definition: magicyuv.c:677
static int magy_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: magicyuv.c:434
static av_cold int magy_decode_end(AVCodecContext *avctx)
Definition: magicyuv.c:684
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:50

Definition at line 698 of file magicyuv.c.