FFmpeg
|
#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "encode.h"
#include "profiles.h"
#include "proresdata.h"
#include "put_bits.h"
#include "bytestream.h"
#include "fdctdsp.h"
Go to the source code of this file.
Data Structures | |
struct | ProresContext |
Macros | |
#define | DEFAULT_SLICE_MB_WIDTH 8 |
#define | QSCALE(qmat, ind, val) ((val) / ((qmat)[ind])) |
#define | TO_GOLOMB(val) (((val) * 2) ^ ((val) >> 31)) |
#define | DIFF_SIGN(val, sign) (((val) >> 31) ^ (sign)) |
#define | IS_NEGATIVE(val) ((((val) >> 31) ^ -1) + 1) |
#define | TO_GOLOMB2(val, sign) ((val)==0 ? 0 : ((val) << 1) + (sign)) |
#define | FIRST_DC_CB 0xB8 |
#define | OFFSET(x) offsetof(ProresContext, x) |
#define | VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
Functions | |
static int | int_from_list_or_default (void *ctx, const char *val_name, int val, const int *array_valid_values, int default_value) |
Check if a value is in the list. More... | |
static void | encode_codeword (PutBitContext *pb, int val, int codebook) |
static av_always_inline int | get_level (int val) |
static void | encode_dc_coeffs (PutBitContext *pb, int16_t *in, int blocks_per_slice, int *qmat) |
static void | encode_ac_coeffs (PutBitContext *pb, int16_t *in, int blocks_per_slice, int *qmat, const uint8_t ff_prores_scan[64]) |
static void | get (const uint8_t *pixels, int stride, int16_t *block) |
static void | fdct_get (FDCTDSPContext *fdsp, const uint8_t *pixels, int stride, int16_t *block) |
static void | calc_plane_dct (FDCTDSPContext *fdsp, const uint8_t *src, int16_t *blocks, int src_stride, int mb_count, int chroma, int is_422) |
static int | encode_slice_plane (int16_t *blocks, int mb_count, uint8_t *buf, unsigned buf_size, int *qmat, int sub_sample_chroma, const uint8_t ff_prores_scan[64]) |
static av_always_inline unsigned | encode_slice_data (AVCodecContext *avctx, int16_t *blocks_y, int16_t *blocks_u, int16_t *blocks_v, unsigned mb_count, uint8_t *buf, unsigned data_size, unsigned *y_data_size, unsigned *u_data_size, unsigned *v_data_size, int qp) |
static void | put_alpha_diff (PutBitContext *pb, int cur, int prev) |
static void | put_alpha_run (PutBitContext *pb, int run) |
static av_always_inline int | encode_alpha_slice_data (AVCodecContext *avctx, int8_t *src_a, unsigned mb_count, uint8_t *buf, unsigned data_size, unsigned *a_data_size) |
static void | subimage_with_fill_template (const uint16_t *src, unsigned x, unsigned y, unsigned stride, unsigned width, unsigned height, uint16_t *dst, unsigned dst_width, unsigned dst_height, int is_alpha_plane, int is_interlaced, int is_top_field) |
static void | subimage_with_fill (const uint16_t *src, unsigned x, unsigned y, unsigned stride, unsigned width, unsigned height, uint16_t *dst, unsigned dst_width, unsigned dst_height, int is_interlaced, int is_top_field) |
static void | subimage_alpha_with_fill (const uint16_t *src, unsigned x, unsigned y, unsigned stride, unsigned width, unsigned height, uint16_t *dst, unsigned dst_width, unsigned dst_height, int is_interlaced, int is_top_field) |
static int | encode_slice (AVCodecContext *avctx, const AVFrame *pic, int mb_x, int mb_y, unsigned mb_count, uint8_t *buf, unsigned data_size, int unsafe, int *qp, int is_interlaced, int is_top_field) |
static int | prores_encode_picture (AVCodecContext *avctx, const AVFrame *pic, uint8_t *buf, const int buf_size, const int picture_index, const int is_top_field) |
static int | prores_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) |
static void | scale_mat (const uint8_t *src, int *dst, int scale) |
static av_cold int | prores_encode_init (AVCodecContext *avctx) |
static av_cold int | prores_encode_close (AVCodecContext *avctx) |
Variables | |
static const AVProfile | profiles [] |
static const int | qp_start_table [] = { 8, 3, 2, 1, 1, 1} |
static const int | qp_end_table [] = { 13, 9, 6, 6, 5, 4} |
static const int | bitrate_table [] = { 1000, 2100, 3500, 5400, 7000, 10000} |
static const int | valid_primaries [] |
static const int | valid_trc [] |
static const int | valid_colorspace [] |
static const uint8_t | QMAT_LUMA [6][64] |
static const uint8_t | QMAT_CHROMA [6][64] |
static const uint8_t | dc_codebook [7] = { 0x04, 0x28, 0x28, 0x4D, 0x4D, 0x70, 0x70} |
static const uint8_t | run_to_cb [16] |
static const uint8_t | lev_to_cb [10] |
static const AVOption | options [] |
static const AVClass | prores_enc_class |
static enum AVPixelFormat | pix_fmts [] |
const FFCodec | ff_prores_aw_encoder |
const FFCodec | ff_prores_encoder |
Apple ProRes encoder (Anatoliy Wasserman version) Known FOURCCs: 'ap4h' (444), 'apch' (HQ), 'apcn' (422), 'apcs' (LT), 'acpo' (Proxy)
Definition in file proresenc_anatoliy.c.
#define DEFAULT_SLICE_MB_WIDTH 8 |
Definition at line 41 of file proresenc_anatoliy.c.
Definition at line 257 of file proresenc_anatoliy.c.
Definition at line 258 of file proresenc_anatoliy.c.
Definition at line 259 of file proresenc_anatoliy.c.
Definition at line 260 of file proresenc_anatoliy.c.
Definition at line 261 of file proresenc_anatoliy.c.
#define FIRST_DC_CB 0xB8 |
Definition at line 269 of file proresenc_anatoliy.c.
#define OFFSET | ( | x | ) | offsetof(ProresContext, x) |
Definition at line 954 of file proresenc_anatoliy.c.
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
Definition at line 955 of file proresenc_anatoliy.c.
|
static |
Check if a value is in the list.
If not, return the default value
ctx | Context for the log msg |
val_name | Name of the checked value, for log msg |
array_valid_values | Array of valid int, ended with INT_MAX |
default_value | Value return if checked value is not in the array |
Definition at line 209 of file proresenc_anatoliy.c.
Referenced by prores_encode_frame().
|
static |
Definition at line 229 of file proresenc_anatoliy.c.
Referenced by encode_ac_coeffs(), and encode_dc_coeffs().
|
static |
Definition at line 263 of file proresenc_anatoliy.c.
Referenced by encode_ac_coeffs(), and encode_dc_coeffs().
|
static |
Definition at line 273 of file proresenc_anatoliy.c.
Referenced by encode_slice_plane().
|
static |
Definition at line 304 of file proresenc_anatoliy.c.
Referenced by encode_slice_plane().
|
static |
Definition at line 335 of file proresenc_anatoliy.c.
Referenced by decode_str(), fdct_get(), and ff_framesync_get_frame().
|
static |
Definition at line 347 of file proresenc_anatoliy.c.
Referenced by calc_plane_dct().
|
static |
Definition at line 353 of file proresenc_anatoliy.c.
Referenced by encode_slice().
|
static |
Definition at line 390 of file proresenc_anatoliy.c.
Referenced by encode_slice_data().
|
static |
Definition at line 406 of file proresenc_anatoliy.c.
Referenced by encode_slice().
|
static |
Definition at line 429 of file proresenc_anatoliy.c.
Referenced by encode_alpha_slice_data().
|
inlinestatic |
Definition at line 449 of file proresenc_anatoliy.c.
Referenced by encode_alpha_slice_data().
|
static |
Definition at line 462 of file proresenc_anatoliy.c.
Referenced by encode_slice().
|
inlinestatic |
Definition at line 503 of file proresenc_anatoliy.c.
Referenced by subimage_alpha_with_fill(), and subimage_with_fill().
|
static |
Definition at line 551 of file proresenc_anatoliy.c.
Referenced by encode_slice().
|
static |
Definition at line 559 of file proresenc_anatoliy.c.
Referenced by encode_slice().
|
static |
Definition at line 566 of file proresenc_anatoliy.c.
Referenced by prores_encode_picture().
|
static |
Definition at line 684 of file proresenc_anatoliy.c.
Referenced by prores_encode_frame().
|
static |
Definition at line 748 of file proresenc_anatoliy.c.
Definition at line 836 of file proresenc_anatoliy.c.
Referenced by prores_encode_init().
|
static |
Definition at line 843 of file proresenc_anatoliy.c.
|
static |
Definition at line 945 of file proresenc_anatoliy.c.
|
static |
Definition at line 43 of file proresenc_anatoliy.c.
Referenced by prores_encode_init().
|
static |
Definition at line 53 of file proresenc_anatoliy.c.
Referenced by encode_slice(), and prores_encode_picture().
|
static |
Definition at line 54 of file proresenc_anatoliy.c.
Referenced by encode_slice().
|
static |
Definition at line 55 of file proresenc_anatoliy.c.
Referenced by encode_slice().
|
static |
Definition at line 57 of file proresenc_anatoliy.c.
Referenced by prores_encode_frame().
|
static |
Definition at line 59 of file proresenc_anatoliy.c.
Referenced by prores_encode_frame().
|
static |
Definition at line 61 of file proresenc_anatoliy.c.
Referenced by prores_encode_frame().
|
static |
Definition at line 64 of file proresenc_anatoliy.c.
Referenced by prores_encode_frame(), and prores_encode_init().
|
static |
Definition at line 122 of file proresenc_anatoliy.c.
Referenced by prores_encode_frame(), and prores_encode_init().
|
static |
Definition at line 271 of file proresenc_anatoliy.c.
Referenced by encode_dc_coeffs().
|
static |
Definition at line 299 of file proresenc_anatoliy.c.
Referenced by encode_ac_coeffs().
|
static |
Definition at line 301 of file proresenc_anatoliy.c.
Referenced by encode_ac_coeffs().
|
static |
Definition at line 957 of file proresenc_anatoliy.c.
|
static |
Definition at line 962 of file proresenc_anatoliy.c.
|
static |
Definition at line 969 of file proresenc_anatoliy.c.
const FFCodec ff_prores_aw_encoder |
Definition at line 974 of file proresenc_anatoliy.c.
const FFCodec ff_prores_encoder |
Definition at line 991 of file proresenc_anatoliy.c.