FFmpeg
|
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/crc.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "encode.h"
#include "codec_internal.h"
#include "put_bits.h"
#include "put_golomb.h"
#include "rangecoder.h"
#include "ffv1.h"
#include "ffv1enc.h"
#include "ffv1enc_template.c"
Go to the source code of this file.
Macros | |
#define | put_rac(C, S, B) |
#define | TYPE int16_t |
#define | RENAME(name) name |
#define | TYPE int32_t |
#define | RENAME(name) name ## 32 |
#define | COST(old, new) |
#define | COST2(old, new) COST(old, new) + COST(256 - (old), 256 - (new)) |
#define | STATS_OUT_SIZE 1024 * 1024 * 6 |
#define | NB_Y_COEFF 15 |
#define | OFFSET(x) offsetof(FFV1Context, x) |
#define | VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
Functions | |
static void | find_best_state (uint8_t best_state[256][256], const uint8_t one_state[256]) |
static av_always_inline av_flatten void | put_symbol_inline (RangeCoder *c, uint8_t *state, int v, int is_signed, uint64_t rc_stat[256][2], uint64_t rc_stat2[32][2]) |
static av_noinline void | put_symbol (RangeCoder *c, uint8_t *state, int v, int is_signed) |
static void | put_vlc_symbol (PutBitContext *pb, VlcState *const state, int v, int bits) |
static int | encode_plane (FFV1Context *f, FFV1SliceContext *sc, const uint8_t *src, int w, int h, int stride, int plane_index, int pixel_stride, int ac) |
static void | write_quant_table (RangeCoder *c, int16_t *quant_table) |
static void | write_quant_tables (RangeCoder *c, int16_t quant_table[MAX_CONTEXT_INPUTS][MAX_QUANT_TABLE_SIZE]) |
static int | contains_non_128 (uint8_t(*initial_state)[CONTEXT_SIZE], int nb_contexts) |
static void | write_header (FFV1Context *f) |
av_cold int | ff_ffv1_write_extradata (AVCodecContext *avctx) |
static int | sort_stt (FFV1Context *s, uint8_t stt[256]) |
static int | encode_determine_slices (AVCodecContext *avctx) |
av_cold int | ff_ffv1_encode_init (AVCodecContext *avctx) |
av_cold int | ff_ffv1_encode_setup_plane_info (AVCodecContext *avctx, enum AVPixelFormat pix_fmt) |
static int | encode_init_internal (AVCodecContext *avctx) |
static void | encode_slice_header (FFV1Context *f, FFV1SliceContext *sc) |
static void | choose_rct_params (const FFV1Context *f, FFV1SliceContext *sc, const uint8_t *src[3], const int stride[3], int w, int h) |
static int | encode_slice (AVCodecContext *c, void *arg) |
size_t | ff_ffv1_encode_buffer_size (AVCodecContext *avctx) |
static int | encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) |
Variables | |
static const int8_t | quant5_10bit [256] |
static const int8_t | quant5 [256] |
static const int8_t | quant9_10bit [256] |
static const int8_t | quant11 [256] |
static const uint8_t | ver2_state [256] |
static const AVOption | options [] |
static const AVClass | ffv1_class |
const FFCodec | ff_ffv1_encoder |
FF Video Codec 1 (a lossless codec) encoder
Definition in file ffv1enc.c.
#define COST | ( | old, | |
new | |||
) |
#define STATS_OUT_SIZE 1024 * 1024 * 6 |
#define NB_Y_COEFF 15 |
#define OFFSET | ( | x | ) | offsetof(FFV1Context, x) |
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
|
static |
Definition at line 139 of file ffv1enc.c.
Referenced by ff_ffv1_encode_init().
|
static |
Definition at line 184 of file ffv1enc.c.
Referenced by encode_line(), and put_symbol().
|
static |
Definition at line 232 of file ffv1enc.c.
Referenced by encode_slice_header(), ff_ffv1_write_extradata(), write_header(), and write_quant_table().
|
inlinestatic |
Definition at line 239 of file ffv1enc.c.
Referenced by encode_line().
|
static |
Definition at line 273 of file ffv1enc.c.
Referenced by encode_slice().
|
static |
Definition at line 313 of file ffv1enc.c.
Referenced by write_quant_tables().
|
static |
Definition at line 328 of file ffv1enc.c.
Referenced by ff_ffv1_write_extradata(), and write_header().
|
static |
Definition at line 336 of file ffv1enc.c.
Referenced by ff_ffv1_write_extradata().
|
static |
Definition at line 348 of file ffv1enc.c.
Referenced by encode_frame(), and segment_start().
av_cold int ff_ffv1_write_extradata | ( | AVCodecContext * | avctx | ) |
Definition at line 395 of file ffv1enc.c.
Referenced by encode_init_internal(), and vulkan_encode_ffv1_init().
|
static |
Definition at line 470 of file ffv1enc.c.
Referenced by ff_ffv1_encode_init().
|
static |
Definition at line 519 of file ffv1enc.c.
Referenced by encode_init_internal().
av_cold int ff_ffv1_encode_init | ( | AVCodecContext * | avctx | ) |
Definition at line 550 of file ffv1enc.c.
Referenced by encode_init_internal(), and vulkan_encode_ffv1_init().
av_cold int ff_ffv1_encode_setup_plane_info | ( | AVCodecContext * | avctx, |
enum AVPixelFormat | pix_fmt | ||
) |
Definition at line 746 of file ffv1enc.c.
Referenced by encode_init_internal(), and vulkan_encode_ffv1_init().
|
static |
|
static |
Definition at line 966 of file ffv1enc.c.
Referenced by encode_slice().
|
static |
Definition at line 999 of file ffv1enc.c.
Referenced by encode_slice().
|
static |
Definition at line 1090 of file ffv1enc.c.
Referenced by encode_frame().
size_t ff_ffv1_encode_buffer_size | ( | AVCodecContext * | avctx | ) |
Definition at line 1175 of file ffv1enc.c.
Referenced by encode_frame(), vulkan_encode_ffv1_init(), and vulkan_encode_ffv1_submit_frame().
|
static |
|
static |
Definition at line 44 of file ffv1enc.c.
Referenced by ff_ffv1_encode_init().
|
static |
Definition at line 63 of file ffv1enc.c.
Referenced by ff_ffv1_encode_init().
|
static |
Definition at line 82 of file ffv1enc.c.
Referenced by ff_ffv1_encode_init().
|
static |
Definition at line 101 of file ffv1enc.c.
Referenced by ff_ffv1_encode_init().
|
static |
Definition at line 120 of file ffv1enc.c.
Referenced by ff_ffv1_encode_init().
|
static |