#include <stdlib.h>
#include <string.h>
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/qsort.h"
#include "avcodec.h"
#include "bytestream.h"
#include "put_bits.h"
#include "internal.h"
#include "thread.h"
#include "lossless_videoencdsp.h"
Go to the source code of this file.
|
static void | left_predict (MagicYUVContext *s, uint8_t *src, uint8_t *dst, ptrdiff_t stride, int width, int height) |
|
static void | gradient_predict (MagicYUVContext *s, uint8_t *src, uint8_t *dst, ptrdiff_t stride, int width, int height) |
|
static void | median_predict (MagicYUVContext *s, uint8_t *src, uint8_t *dst, ptrdiff_t stride, int width, int height) |
|
static av_cold int | magy_encode_init (AVCodecContext *avctx) |
|
static int | magy_huff_cmp_len (const void *a, const void *b) |
|
static int | huff_cmp_sym (const void *a, const void *b) |
|
static void | calculate_codes (HuffEntry *he) |
|
static void | count_usage (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, int size, int max_length) |
|
static int | encode_table (AVCodecContext *avctx, uint8_t *dst, int width, int height, PutBitContext *pb, HuffEntry *he) |
|
static int | encode_slice (uint8_t *src, uint8_t *dst, int dst_size, int width, int height, HuffEntry *he, int prediction) |
|
static int | magy_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet) |
|
static av_cold int | magy_encode_close (AVCodecContext *avctx) |
|
◆ OFFSET
◆ VE
◆ Prediction
Enumerator |
---|
LEFT | |
GRADIENT | |
MEDIAN | |
LEFT | |
GRADIENT | |
MEDIAN | |
Definition at line 36 of file magicyuvenc.c.
◆ left_predict()
◆ gradient_predict()
◆ median_predict()
◆ magy_encode_init()
◆ magy_huff_cmp_len()
static int magy_huff_cmp_len |
( |
const void * |
a, |
|
|
const void * |
b |
|
) |
| |
|
static |
◆ huff_cmp_sym()
static int huff_cmp_sym |
( |
const void * |
a, |
|
|
const void * |
b |
|
) |
| |
|
static |
◆ calculate_codes()
static void calculate_codes |
( |
HuffEntry * |
he | ) |
|
|
static |
◆ count_usage()
◆ compare_by_prob()
static int compare_by_prob |
( |
const void * |
a, |
|
|
const void * |
b |
|
) |
| |
|
static |
◆ magy_huffman_compute_bits()
static void magy_huffman_compute_bits |
( |
PTable * |
prob_table, |
|
|
HuffEntry * |
distincts, |
|
|
int |
size, |
|
|
int |
max_length |
|
) |
| |
|
static |
◆ encode_table()
◆ encode_slice()
◆ magy_encode_frame()
◆ magy_encode_close()
◆ options
◆ magicyuv_class
Initial value:= {
.class_name = "magicyuv",
}
Definition at line 567 of file magicyuvenc.c.
◆ ff_magicyuv_encoder
Initial value:= {
.name = "magicyuv",
},
}
Definition at line 574 of file magicyuvenc.c.
AVPixelFormat
Pixel format.
static av_cold int init(AVCodecContext *avctx)
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
static int magy_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
static const AVClass magicyuv_class
static enum AVPixelFormat pix_fmts[]
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
#define LIBAVUTIL_VERSION_INT
const char * av_default_item_name(void *ptr)
Return the context name.
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static const AVOption options[]
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
static av_cold int magy_encode_close(AVCodecContext *avctx)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
static av_cold int magy_encode_init(AVCodecContext *avctx)
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)