35 #define MAX_PERIODICITY 16
46 #define VPX_ENCODER_ABI_VERSION (3 + VPX_CODEC_ABI_VERSION)
58 #define VPX_CODEC_CAP_PSNR 0x10000
65 #define VPX_CODEC_CAP_OUTPUT_PARTITION 0x20000
75 #define VPX_CODEC_USE_PSNR 0x10000
76 #define VPX_CODEC_USE_OUTPUT_PARTITION 0x20000
84 typedef struct vpx_fixed_buf
107 #define VPX_FRAME_IS_KEY 0x1
108 #define VPX_FRAME_IS_DROPPABLE 0x2
111 #define VPX_FRAME_IS_INVISIBLE 0x4
113 #define VPX_FRAME_IS_FRAGMENT 0x8
122 typedef uint32_t vpx_codec_er_flags_t;
123 #define VPX_ERROR_RESILIENT_DEFAULT 0x1
125 #define VPX_ERROR_RESILIENT_PARTITIONS 0x2
140 enum vpx_codec_cx_pkt_kind
248 #define VPX_EFLAG_FORCE_KF (1<<0)
257 typedef struct vpx_codec_enc_cfg
270 unsigned int g_usage;
279 unsigned int g_threads;
290 unsigned int g_profile;
358 unsigned int g_lag_in_frames;
381 unsigned int rc_dropframe_thresh;
391 unsigned int rc_resize_allowed;
400 unsigned int rc_resize_up_thresh;
409 unsigned int rc_resize_down_thresh;
435 unsigned int rc_target_bitrate;
451 unsigned int rc_min_quantizer;
462 unsigned int rc_max_quantizer;
480 unsigned int rc_undershoot_pct;
493 unsigned int rc_overshoot_pct;
510 unsigned int rc_buf_sz;
520 unsigned int rc_buf_initial_sz;
530 unsigned int rc_buf_optimal_sz;
546 unsigned int rc_2pass_vbr_bias_pct;
554 unsigned int rc_2pass_vbr_minsection_pct;
562 unsigned int rc_2pass_vbr_maxsection_pct;
585 unsigned int kf_min_dist;
595 unsigned int kf_max_dist;
605 unsigned int ts_number_layers;
611 unsigned int ts_target_bitrate[MAX_LAYERS];
618 unsigned int ts_rate_decimator[MAX_LAYERS];
627 unsigned int ts_periodicity;
636 unsigned int ts_layer_id[MAX_PERIODICITY];
673 #define vpx_codec_enc_init(ctx, iface, cfg, flags) \
674 vpx_codec_enc_init_ver(ctx, iface, cfg, flags, VPX_ENCODER_ABI_VERSION)
714 #define vpx_codec_enc_init_multi(ctx, iface, cfg, num_enc, flags, dsf) \
715 vpx_codec_enc_init_multi_ver(ctx, iface, cfg, num_enc, flags, dsf, \
716 VPX_ENCODER_ABI_VERSION)
775 #define VPX_DL_REALTIME (1)
777 #define VPX_DL_GOOD_QUALITY (1000000)
779 #define VPX_DL_BEST_QUALITY (0)
817 vpx_codec_err_t vpx_codec_encode(vpx_codec_ctx_t *ctx,
820 unsigned long duration,
821 vpx_enc_frame_flags_t flags,
822 unsigned long deadline);
869 unsigned int pad_before,
870 unsigned int pad_after);
Rational Number.
Definition: vpx_encoder.h:212
struct vpx_fixed_buf twopass_stats
Definition: vpx_encoder.h:189
struct vpx_codec_iface vpx_codec_iface_t
Codec interface structure.
Definition: vpx_codec.h:167
vpx_codec_err_t vpx_codec_set_cx_data_buf(vpx_codec_ctx_t *ctx, const vpx_fixed_buf_t *buf, unsigned int pad_before, unsigned int pad_after)
Set compressed data output buffer.
Image Descriptor.
Definition: vpx_image.h:97
vpx_codec_pts_t pts
Definition: vpx_encoder.h:176
vpx_kf_mode
Keyframe placement mode.
Definition: vpx_encoder.h:245
Definition: vpx_encoder.h:232
struct vpx_codec_enc_cfg vpx_codec_enc_cfg_t
Encoder configuration structure.
struct vpx_fixed_buf vpx_fixed_buf_t
Generic fixed size buffer structure.
struct vpx_fixed_buf raw
Definition: vpx_encoder.h:196
int den
Definition: vpx_encoder.h:215
Definition: vpx_encoder.h:156
int partition_id
Definition: vpx_encoder.h:181
vpx_enc_pass
Multi-pass Encoding Pass.
Definition: vpx_encoder.h:220
Encoder configuration structure.
Definition: vpx_encoder.h:270
Definition: vpx_encoder.h:158
Definition: vpx_encoder.h:157
Definition: vpx_encoder.h:248
Encoder output packet.
Definition: vpx_encoder.h:167
void * buf
Definition: vpx_encoder.h:87
vpx_codec_err_t vpx_codec_enc_config_set(vpx_codec_ctx_t *ctx, const vpx_codec_enc_cfg_t *cfg)
Set or change configuration.
Generic fixed size buffer structure.
Definition: vpx_encoder.h:85
uint32_t vpx_codec_frame_flags_t
Compressed Frame Flags.
Definition: vpx_encoder.h:107
Definition: vpx_encoder.h:223
Definition: vpx_encoder.h:224
struct vpx_codec_cx_pkt::@1::@2 frame
uint64_t sse[4]
Definition: vpx_encoder.h:193
size_t sz
Definition: vpx_encoder.h:175
enum vpx_codec_cx_pkt_kind kind
Definition: vpx_encoder.h:169
long vpx_enc_frame_flags_t
Encoded Frame Flags.
Definition: vpx_encoder.h:260
int num
Definition: vpx_encoder.h:214
char pad[128-sizeof(enum vpx_codec_cx_pkt_kind)]
Definition: vpx_encoder.h:203
vpx_codec_err_t vpx_codec_enc_config_default(vpx_codec_iface_t *iface, vpx_codec_enc_cfg_t *cfg, unsigned int usage)
Get a default configuration.
long vpx_codec_flags_t
Initialization-time Feature Enabling.
Definition: vpx_codec.h:158
vpx_codec_cx_pkt_kind
Encoder output packet variants.
Definition: vpx_encoder.h:153
Definition: vpx_encoder.h:231
double psnr[4]
Definition: vpx_encoder.h:194
Definition: vpx_encoder.h:247
unsigned int samples[4]
Definition: vpx_encoder.h:192
vpx_rc_mode
Rate control mode.
Definition: vpx_encoder.h:229
vpx_codec_err_t vpx_codec_enc_init_ver(vpx_codec_ctx_t *ctx, vpx_codec_iface_t *iface, vpx_codec_enc_cfg_t *cfg, vpx_codec_flags_t flags, int ver)
Initialize an encoder instance.
const vpx_image_t * vpx_codec_get_preview_frame(vpx_codec_ctx_t *ctx)
Get Preview Frame.
unsigned long duration
Definition: vpx_encoder.h:178
uint32_t vpx_codec_er_flags_t
Error Resilient flags.
Definition: vpx_encoder.h:127
vpx_codec_err_t
Algorithm return codes.
Definition: vpx_codec.h:81
const vpx_codec_cx_pkt_t * vpx_codec_get_cx_data(vpx_codec_ctx_t *ctx, vpx_codec_iter_t *iter)
Encoded data iterator.
union vpx_codec_cx_pkt::@1 data
struct vpx_codec_cx_pkt vpx_codec_cx_pkt_t
Encoder output packet.
struct vpx_rational vpx_rational_t
Rational Number.
Definition: vpx_encoder.h:249
int64_t vpx_codec_pts_t
Time Stamp Type.
Definition: vpx_encoder.h:97
vpx_fixed_buf_t * vpx_codec_get_global_headers(vpx_codec_ctx_t *ctx)
Get global stream headers.
Definition: vpx_encoder.h:233
Describes the codec algorithm interface to applications.
vpx_codec_err_t vpx_codec_enc_init_multi_ver(vpx_codec_ctx_t *ctx, vpx_codec_iface_t *iface, vpx_codec_enc_cfg_t *cfg, int num_enc, vpx_codec_flags_t flags, vpx_rational_t *dsf, int ver)
Initialize multi-encoder instance.
const void * vpx_codec_iter_t
Iterator.
Definition: vpx_codec.h:182
Definition: vpx_encoder.h:155
vpx_codec_frame_flags_t flags
Definition: vpx_encoder.h:180
void * buf
Definition: vpx_encoder.h:174
Definition: vpx_encoder.h:222
Codec context structure.
Definition: vpx_codec.h:193