FFmpeg
|
#include <stdlib.h>
#include <string.h>
#include "libavutil/cpu.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/qsort.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "encode.h"
#include "put_bits.h"
#include "lossless_videoencdsp.h"
Go to the source code of this file.
Data Structures | |
struct | HuffEntry |
struct | PTable |
Used to assign a occurrence count or "probability" to an input value. More... | |
struct | Slice |
struct | MagicYUVContext |
struct | PackageMergerList |
Used to store intermediate lists in the package merge algorithm. More... | |
Macros | |
#define | MAGICYUV_EXTRADATA_SIZE 32 |
#define | OFFSET(x) offsetof(MagicYUVContext, x) |
#define | VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
Enumerations | |
enum | Prediction { LEFT = 1, GRADIENT, MEDIAN, LEFT = 1, GRADIENT, MEDIAN } |
Functions | |
static void | left_predict (MagicYUVContext *s, const uint8_t *src, uint8_t *dst, ptrdiff_t stride, int width, int height) |
static void | gradient_predict (MagicYUVContext *s, const uint8_t *src, uint8_t *dst, ptrdiff_t stride, int width, int height) |
static void | median_predict (MagicYUVContext *s, const uint8_t *src, uint8_t *dst, ptrdiff_t stride, int width, int height) |
static av_cold int | magy_encode_init (AVCodecContext *avctx) |
static void | calculate_codes (HuffEntry *he, uint16_t codes_count[33]) |
static void | count_usage (const uint8_t *src, int width, int height, PTable *counts) |
static int | compare_by_prob (const void *a, const void *b) |
static void | magy_huffman_compute_bits (PTable *prob_table, HuffEntry *distincts, uint16_t codes_counts[33], int size, int max_length) |
static int | count_plane_slice (AVCodecContext *avctx, int n, int plane) |
static int | encode_table (AVCodecContext *avctx, PutBitContext *pb, HuffEntry *he, int plane) |
static int | encode_plane_slice_raw (const uint8_t *src, uint8_t *dst, unsigned dst_size, int width, int height, int prediction) |
static int | encode_plane_slice (const uint8_t *src, uint8_t *dst, unsigned dst_size, int width, int height, HuffEntry *he, int prediction) |
static int | encode_slice (AVCodecContext *avctx, void *tdata, int n, int threadnr) |
static int | predict_slice (AVCodecContext *avctx, void *tdata, int n, int threadnr) |
static int | magy_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet) |
static av_cold int | magy_encode_close (AVCodecContext *avctx) |
Variables | |
static const AVOption | options [] |
static const AVClass | magicyuv_class |
const FFCodec | ff_magicyuv_encoder |
#define MAGICYUV_EXTRADATA_SIZE 32 |
Definition at line 38 of file magicyuvenc.c.
#define OFFSET | ( | x | ) | offsetof(MagicYUVContext, x) |
Definition at line 664 of file magicyuvenc.c.
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
Definition at line 665 of file magicyuvenc.c.
enum Prediction |
Enumerator | |
---|---|
LEFT | |
GRADIENT | |
MEDIAN | |
LEFT | |
GRADIENT | |
MEDIAN |
Definition at line 40 of file magicyuvenc.c.
|
static |
Definition at line 83 of file magicyuvenc.c.
Referenced by magy_encode_init().
|
static |
Definition at line 107 of file magicyuvenc.c.
Referenced by magy_encode_init().
|
static |
Definition at line 135 of file magicyuvenc.c.
Referenced by magy_encode_init().
|
static |
Definition at line 156 of file magicyuvenc.c.
|
static |
Definition at line 275 of file magicyuvenc.c.
Referenced by encode_table().
|
static |
Definition at line 289 of file magicyuvenc.c.
Referenced by count_plane_slice().
|
static |
Definition at line 306 of file magicyuvenc.c.
Referenced by magy_huffman_compute_bits().
|
static |
Definition at line 313 of file magicyuvenc.c.
Referenced by encode_table().
|
static |
Definition at line 375 of file magicyuvenc.c.
Referenced by predict_slice().
|
static |
Definition at line 393 of file magicyuvenc.c.
Referenced by magy_encode_frame().
|
static |
Definition at line 425 of file magicyuvenc.c.
Referenced by encode_plane_slice().
|
static |
Definition at line 442 of file magicyuvenc.c.
Referenced by encode_slice().
|
static |
Definition at line 476 of file magicyuvenc.c.
Referenced by magy_encode_frame().
|
static |
Definition at line 499 of file magicyuvenc.c.
Referenced by magy_encode_frame().
|
static |
Definition at line 559 of file magicyuvenc.c.
|
static |
Definition at line 648 of file magicyuvenc.c.
|
static |
Definition at line 666 of file magicyuvenc.c.
|
static |
Definition at line 674 of file magicyuvenc.c.
const FFCodec ff_magicyuv_encoder |
Definition at line 681 of file magicyuvenc.c.