26 #define AOM_DISABLE_CTRL_TYPECHECKS 1
27 #include <aom/aom_encoder.h>
28 #include <aom/aomcx.h>
98 [AOME_SET_CPUUSED] =
"AOME_SET_CPUUSED",
99 [AOME_SET_CQ_LEVEL] =
"AOME_SET_CQ_LEVEL",
100 [AOME_SET_ENABLEAUTOALTREF] =
"AOME_SET_ENABLEAUTOALTREF",
101 [AOME_SET_ARNR_MAXFRAMES] =
"AOME_SET_ARNR_MAXFRAMES",
102 [AOME_SET_ARNR_STRENGTH] =
"AOME_SET_ARNR_STRENGTH",
103 [AOME_SET_STATIC_THRESHOLD] =
"AOME_SET_STATIC_THRESHOLD",
104 [AV1E_SET_COLOR_RANGE] =
"AV1E_SET_COLOR_RANGE",
105 [AV1E_SET_COLOR_PRIMARIES] =
"AV1E_SET_COLOR_PRIMARIES",
106 [AV1E_SET_MATRIX_COEFFICIENTS] =
"AV1E_SET_MATRIX_COEFFICIENTS",
107 [AV1E_SET_TRANSFER_CHARACTERISTICS] =
"AV1E_SET_TRANSFER_CHARACTERISTICS",
108 [AV1E_SET_AQ_MODE] =
"AV1E_SET_AQ_MODE",
109 [AV1E_SET_FRAME_PARALLEL_DECODING] =
"AV1E_SET_FRAME_PARALLEL_DECODING",
110 [AV1E_SET_SUPERBLOCK_SIZE] =
"AV1E_SET_SUPERBLOCK_SIZE",
111 [AV1E_SET_TILE_COLUMNS] =
"AV1E_SET_TILE_COLUMNS",
112 [AV1E_SET_TILE_ROWS] =
"AV1E_SET_TILE_ROWS",
113 #ifdef AOM_CTRL_AV1E_SET_ROW_MT
114 [AV1E_SET_ROW_MT] =
"AV1E_SET_ROW_MT",
116 #ifdef AOM_CTRL_AV1E_SET_DENOISE_NOISE_LEVEL
117 [AV1E_SET_DENOISE_NOISE_LEVEL] =
"AV1E_SET_DENOISE_NOISE_LEVEL",
119 #ifdef AOM_CTRL_AV1E_SET_DENOISE_BLOCK_SIZE
120 [AV1E_SET_DENOISE_BLOCK_SIZE] =
"AV1E_SET_DENOISE_BLOCK_SIZE",
122 #ifdef AOM_CTRL_AV1E_SET_MAX_REFERENCE_FRAMES
123 [AV1E_SET_MAX_REFERENCE_FRAMES] =
"AV1E_SET_MAX_REFERENCE_FRAMES",
125 #ifdef AOM_CTRL_AV1E_SET_ENABLE_GLOBAL_MOTION
126 [AV1E_SET_ENABLE_GLOBAL_MOTION] =
"AV1E_SET_ENABLE_GLOBAL_MOTION",
128 #ifdef AOM_CTRL_AV1E_SET_ENABLE_INTRABC
129 [AV1E_SET_ENABLE_INTRABC] =
"AV1E_SET_ENABLE_INTRABC",
131 [AV1E_SET_ENABLE_CDEF] =
"AV1E_SET_ENABLE_CDEF",
137 const char *
error = aom_codec_error(&
ctx->encoder);
138 const char *detail = aom_codec_error_detail(&
ctx->encoder);
146 const struct aom_codec_enc_cfg *cfg)
153 " %*s%u\n %*s%u\n %*s%u\n %*s%u\n %*s%u\n"
155 " %*s{%u/%u}\n %*s%u\n %*s%d\n %*s%u\n",
156 width,
"g_usage:", cfg->g_usage,
157 width,
"g_threads:", cfg->g_threads,
158 width,
"g_profile:", cfg->g_profile,
159 width,
"g_w:", cfg->g_w,
160 width,
"g_h:", cfg->g_h,
161 width,
"g_bit_depth:", cfg->g_bit_depth,
162 width,
"g_input_bit_depth:", cfg->g_input_bit_depth,
163 width,
"g_timebase:", cfg->g_timebase.num, cfg->g_timebase.den,
164 width,
"g_error_resilient:", cfg->g_error_resilient,
165 width,
"g_pass:", cfg->g_pass,
166 width,
"g_lag_in_frames:", cfg->g_lag_in_frames);
169 width,
"rc_dropframe_thresh:", cfg->rc_dropframe_thresh,
170 width,
"rc_end_usage:", cfg->rc_end_usage,
171 width,
"rc_twopass_stats_in:", cfg->rc_twopass_stats_in.buf, cfg->rc_twopass_stats_in.sz,
172 width,
"rc_target_bitrate:", cfg->rc_target_bitrate);
175 width,
"rc_min_quantizer:", cfg->rc_min_quantizer,
176 width,
"rc_max_quantizer:", cfg->rc_max_quantizer);
179 width,
"rc_undershoot_pct:", cfg->rc_undershoot_pct,
180 width,
"rc_overshoot_pct:", cfg->rc_overshoot_pct);
182 " %*s%u\n %*s%u\n %*s%u\n",
183 width,
"rc_buf_sz:", cfg->rc_buf_sz,
184 width,
"rc_buf_initial_sz:", cfg->rc_buf_initial_sz,
185 width,
"rc_buf_optimal_sz:", cfg->rc_buf_optimal_sz);
186 av_log(avctx,
level,
"2 pass rate control settings\n"
187 " %*s%u\n %*s%u\n %*s%u\n",
188 width,
"rc_2pass_vbr_bias_pct:", cfg->rc_2pass_vbr_bias_pct,
189 width,
"rc_2pass_vbr_minsection_pct:", cfg->rc_2pass_vbr_minsection_pct,
190 width,
"rc_2pass_vbr_maxsection_pct:", cfg->rc_2pass_vbr_maxsection_pct);
192 " %*s%d\n %*s%u\n %*s%u\n",
193 width,
"kf_mode:", cfg->kf_mode,
194 width,
"kf_min_dist:", cfg->kf_min_dist,
195 width,
"kf_max_dist:", cfg->kf_max_dist);
198 width,
"tile_width_count:", cfg->tile_width_count,
199 width,
"tile_height_count:", cfg->tile_height_count);
232 aome_enc_control_id
id,
234 enum aome_enc_control_id
id,
246 res = aom_codec_control(&
ctx->encoder,
id,
val);
247 if (res != AOM_CODEC_OK) {
261 aom_codec_destroy(&
ctx->encoder);
270 struct aom_codec_enc_cfg *enccfg, aom_codec_flags_t *
flags,
271 aom_img_fmt_t *img_fmt)
274 enccfg->g_bit_depth = enccfg->g_input_bit_depth = 8;
278 *img_fmt = AOM_IMG_FMT_I420;
282 *img_fmt = AOM_IMG_FMT_I422;
286 *img_fmt = AOM_IMG_FMT_I444;
290 if (codec_caps & AOM_CODEC_CAP_HIGHBITDEPTH) {
291 enccfg->g_bit_depth = enccfg->g_input_bit_depth =
295 *img_fmt = AOM_IMG_FMT_I42016;
296 *
flags |= AOM_CODEC_USE_HIGHBITDEPTH;
302 if (codec_caps & AOM_CODEC_CAP_HIGHBITDEPTH) {
303 enccfg->g_bit_depth = enccfg->g_input_bit_depth =
306 *img_fmt = AOM_IMG_FMT_I42216;
307 *
flags |= AOM_CODEC_USE_HIGHBITDEPTH;
313 if (codec_caps & AOM_CODEC_CAP_HIGHBITDEPTH) {
314 enccfg->g_bit_depth = enccfg->g_input_bit_depth =
318 *img_fmt = AOM_IMG_FMT_I44416;
319 *
flags |= AOM_CODEC_USE_HIGHBITDEPTH;
332 aom_color_range_t aom_cr;
348 int sb_dim = (
dim + sb_size - 1) / sb_size;
349 int tile_dim = (sb_dim + (1 << tiles_log2) - 1) >> tiles_log2;
351 return (sb_dim + tile_dim - 1) / tile_dim;
355 struct aom_codec_enc_cfg *enccfg)
358 int sb_128x128_possible, sb_size, sb_width, sb_height;
359 int uniform_rows, uniform_cols;
360 int uniform_64x64_possible, uniform_128x128_possible;
361 int tile_size, rounding,
i;
363 if (
ctx->tile_cols_log2 >= 0)
364 ctx->tile_cols = 1 <<
ctx->tile_cols_log2;
365 if (
ctx->tile_rows_log2 >= 0)
366 ctx->tile_rows = 1 <<
ctx->tile_rows_log2;
368 if (
ctx->tile_cols == 0) {
371 if (
ctx->tile_cols > 1) {
373 "columns to fill width.\n",
ctx->tile_cols);
377 if (
ctx->tile_rows == 0) {
380 ctx->tile_cols - 1) /
ctx->tile_cols, 128);
384 if (
ctx->tile_rows > 1) {
386 "rows to fill area.\n",
ctx->tile_rows);
391 if ((avctx->
width + 63) / 64 <
ctx->tile_cols ||
392 (avctx->
height + 63) / 64 <
ctx->tile_rows) {
394 "large enough to fit specified tile arrangement.\n");
400 "not allow more than %dx%d tiles.\n",
406 "not allow tiles of width greater than %d.\n",
411 ctx->superblock_size = AOM_SUPERBLOCK_SIZE_DYNAMIC;
413 if (
ctx->tile_cols == 1 &&
ctx->tile_rows == 1) {
418 sb_128x128_possible =
419 (avctx->
width + 127) / 128 >=
ctx->tile_cols &&
420 (avctx->
height + 127) / 128 >=
ctx->tile_rows;
422 ctx->tile_cols_log2 =
ctx->tile_cols == 1 ? 0 :
424 ctx->tile_rows_log2 =
ctx->tile_rows == 1 ? 0 :
428 64,
ctx->tile_cols_log2);
430 64,
ctx->tile_rows_log2);
432 "-> %dx%d tiles.\n", uniform_cols, uniform_rows);
433 uniform_64x64_possible = uniform_cols ==
ctx->tile_cols &&
434 uniform_rows ==
ctx->tile_rows;
436 if (sb_128x128_possible) {
438 128,
ctx->tile_cols_log2);
440 128,
ctx->tile_rows_log2);
442 "-> %dx%d tiles.\n", uniform_cols, uniform_rows);
443 uniform_128x128_possible = uniform_cols ==
ctx->tile_cols &&
444 uniform_rows ==
ctx->tile_rows;
447 uniform_128x128_possible = 0;
450 ctx->uniform_tiles = 1;
451 if (uniform_64x64_possible && uniform_128x128_possible) {
453 "superblocks (tile_cols_log2 = %d, tile_rows_log2 = %d).\n",
454 ctx->tile_cols_log2,
ctx->tile_rows_log2);
457 if (uniform_64x64_possible && !sb_128x128_possible) {
459 "superblocks (tile_cols_log2 = %d, tile_rows_log2 = %d).\n",
460 ctx->tile_cols_log2,
ctx->tile_rows_log2);
461 ctx->superblock_size = AOM_SUPERBLOCK_SIZE_64X64;
464 if (uniform_128x128_possible) {
466 "superblocks (tile_cols_log2 = %d, tile_rows_log2 = %d).\n",
467 ctx->tile_cols_log2,
ctx->tile_rows_log2);
468 ctx->superblock_size = AOM_SUPERBLOCK_SIZE_128X128;
471 ctx->uniform_tiles = 0;
473 if (sb_128x128_possible) {
475 ctx->superblock_size = AOM_SUPERBLOCK_SIZE_128X128;
478 ctx->superblock_size = AOM_SUPERBLOCK_SIZE_64X64;
481 "superblocks (tile_cols = %d, tile_rows = %d).\n",
482 sb_size, sb_size,
ctx->tile_cols,
ctx->tile_rows);
484 enccfg->tile_width_count =
ctx->tile_cols;
485 enccfg->tile_height_count =
ctx->tile_rows;
487 sb_width = (avctx->
width + sb_size - 1) / sb_size;
488 sb_height = (avctx->
height + sb_size - 1) / sb_size;
490 tile_size = sb_width /
ctx->tile_cols;
491 rounding = sb_width %
ctx->tile_cols;
492 for (
i = 0;
i <
ctx->tile_cols;
i++) {
493 enccfg->tile_widths[
i] = tile_size +
495 i >
ctx->tile_cols - 1 - (rounding + 1) / 2);
498 tile_size = sb_height /
ctx->tile_rows;
499 rounding = sb_height %
ctx->tile_rows;
500 for (
i = 0;
i <
ctx->tile_rows;
i++) {
501 enccfg->tile_heights[
i] = tile_size +
503 i >
ctx->tile_rows - 1 - (rounding + 1) / 2);
510 const struct aom_codec_iface *iface)
513 struct aom_codec_enc_cfg enccfg = { 0 };
514 #ifdef AOM_FRAME_IS_INTRAONLY
515 aom_codec_flags_t
flags =
518 aom_codec_flags_t
flags = 0;
522 aom_img_fmt_t img_fmt;
523 aom_codec_caps_t codec_caps = aom_codec_get_caps(iface);
528 if ((res = aom_codec_enc_config_default(iface, &enccfg, 0)) != AOM_CODEC_OK) {
530 aom_codec_err_to_string(res));
545 enccfg.g_w = avctx->
width;
546 enccfg.g_h = avctx->
height;
552 if (
ctx->lag_in_frames >= 0)
553 enccfg.g_lag_in_frames =
ctx->lag_in_frames;
556 enccfg.g_pass = AOM_RC_FIRST_PASS;
558 enccfg.g_pass = AOM_RC_LAST_PASS;
560 enccfg.g_pass = AOM_RC_ONE_PASS;
564 enccfg.rc_end_usage = AOM_CBR;
565 }
else if (
ctx->crf >= 0) {
566 enccfg.rc_end_usage = AOM_CQ;
568 enccfg.rc_end_usage = AOM_Q;
574 }
else if (enccfg.rc_end_usage != AOM_Q) {
575 if (enccfg.rc_end_usage == AOM_CQ) {
576 enccfg.rc_target_bitrate = 1000000;
578 avctx->
bit_rate = enccfg.rc_target_bitrate * 1000;
580 "Neither bitrate nor constrained quality specified, using default bitrate of %dkbit/sec\n",
581 enccfg.rc_target_bitrate);
585 if (avctx->
qmin >= 0)
586 enccfg.rc_min_quantizer = avctx->
qmin;
587 if (avctx->
qmax >= 0)
588 enccfg.rc_max_quantizer = avctx->
qmax;
590 if (enccfg.rc_end_usage == AOM_CQ || enccfg.rc_end_usage == AOM_Q) {
591 if (
ctx->crf < enccfg.rc_min_quantizer ||
ctx->crf > enccfg.rc_max_quantizer) {
593 "CQ level %d must be between minimum and maximum quantizer value (%d-%d)\n",
594 ctx->crf, enccfg.rc_min_quantizer, enccfg.rc_max_quantizer);
599 enccfg.rc_dropframe_thresh =
ctx->drop_threshold;
603 if (
ctx->minsection_pct >= 0)
604 enccfg.rc_2pass_vbr_minsection_pct =
ctx->minsection_pct;
606 enccfg.rc_2pass_vbr_minsection_pct =
608 if (
ctx->maxsection_pct >= 0)
609 enccfg.rc_2pass_vbr_maxsection_pct =
ctx->maxsection_pct;
611 enccfg.rc_2pass_vbr_maxsection_pct =
618 enccfg.rc_buf_initial_sz =
620 enccfg.rc_buf_optimal_sz = enccfg.rc_buf_sz * 5 / 6;
622 if (
ctx->rc_undershoot_pct >= 0)
623 enccfg.rc_undershoot_pct =
ctx->rc_undershoot_pct;
624 if (
ctx->rc_overshoot_pct >= 0)
625 enccfg.rc_overshoot_pct =
ctx->rc_overshoot_pct;
631 enccfg.kf_max_dist = avctx->
gop_size;
633 if (enccfg.g_pass == AOM_RC_FIRST_PASS)
634 enccfg.g_lag_in_frames = 0;
635 else if (enccfg.g_pass == AOM_RC_LAST_PASS) {
636 int decode_size,
ret;
643 ctx->twopass_stats.sz = strlen(avctx->
stats_in) * 3 / 4;
648 ctx->twopass_stats.sz);
649 ctx->twopass_stats.sz = 0;
653 ctx->twopass_stats.sz);
654 if (decode_size < 0) {
659 ctx->twopass_stats.sz = decode_size;
660 enccfg.rc_twopass_stats_in =
ctx->twopass_stats;
667 enccfg.g_profile = avctx->
profile;
669 enccfg.g_error_resilient =
ctx->error_resilient;
677 res = aom_codec_enc_init(&
ctx->encoder, iface, &enccfg,
flags);
678 if (res != AOM_CODEC_OK) {
686 if (
ctx->auto_alt_ref >= 0)
688 if (
ctx->arnr_max_frames >= 0)
690 if (
ctx->arnr_strength >= 0)
692 if (
ctx->enable_cdef >= 0)
701 if (
ctx->aq_mode >= 0)
703 if (
ctx->frame_parallel >= 0)
704 codecctl_int(avctx, AV1E_SET_FRAME_PARALLEL_DECODING,
ctx->frame_parallel);
708 if (
ctx->uniform_tiles) {
713 #ifdef AOM_CTRL_AV1E_SET_DENOISE_NOISE_LEVEL
714 if (
ctx->denoise_noise_level >= 0)
715 codecctl_int(avctx, AV1E_SET_DENOISE_NOISE_LEVEL,
ctx->denoise_noise_level);
717 #ifdef AOM_CTRL_AV1E_SET_DENOISE_BLOCK_SIZE
718 if (
ctx->denoise_block_size >= 0)
719 codecctl_int(avctx, AV1E_SET_DENOISE_BLOCK_SIZE,
ctx->denoise_block_size);
721 #ifdef AOM_CTRL_AV1E_SET_ENABLE_GLOBAL_MOTION
722 if (
ctx->enable_global_motion >= 0)
723 codecctl_int(avctx, AV1E_SET_ENABLE_GLOBAL_MOTION,
ctx->enable_global_motion);
725 #ifdef AOM_CTRL_AV1E_SET_MAX_REFERENCE_FRAMES
726 if (avctx->
refs >= 3) {
730 #ifdef AOM_CTRL_AV1E_SET_ROW_MT
731 if (
ctx->row_mt >= 0)
734 #ifdef AOM_CTRL_AV1E_SET_ENABLE_INTRABC
735 if (
ctx->enable_intrabc >= 0)
740 aom_img_wrap(&
ctx->rawimg, img_fmt, avctx->
width, avctx->
height, 1,
743 if (codec_caps & AOM_CODEC_CAP_HIGHBITDEPTH)
744 ctx->rawimg.bit_depth = enccfg.g_bit_depth;
756 "not found. This is a bug, please report it.\n");
772 if (enccfg.rc_end_usage == AOM_CBR ||
773 enccfg.g_pass != AOM_RC_ONE_PASS) {
785 const struct aom_codec_cx_pkt *
src)
787 dst->
pts =
src->data.frame.pts;
790 dst->
sz =
src->data.frame.sz;
791 dst->
buf =
src->data.frame.buf;
792 #ifdef AOM_FRAME_IS_INTRAONLY
799 memcpy(dst->
sse,
ctx->sse,
sizeof(dst->
sse));
826 if (!!(cx_frame->
flags & AOM_FRAME_IS_KEY)) {
828 #ifdef AOM_FRAME_IS_INTRAONLY
830 }
else if (cx_frame->
flags & AOM_FRAME_IS_INTRAONLY) {
837 cx_frame->
have_sse ? 3 : 0, pict_type);
841 for (
i = 0;
i < 3; ++
i) {
852 "failed to send input packet\n");
859 "failed to receive output packet\n");
877 const struct aom_codec_cx_pkt *
pkt;
878 const void *iter =
NULL;
881 if (
ctx->coded_frame_list) {
887 ctx->coded_frame_list = cx_frame->
next;
893 while ((
pkt = aom_codec_get_cx_data(&
ctx->encoder, &iter))) {
895 case AOM_CODEC_CX_FRAME_PKT:
912 "Frame queue element alloc failed\n");
918 if (!cx_frame->
buf) {
929 case AOM_CODEC_STATS_PKT:
931 struct aom_fixed_buf *
stats = &
ctx->twopass_stats;
935 pkt->
data.twopass_stats.sz)) < 0) {
945 #ifdef AOM_FRAME_IS_INTRAONLY
946 case AOM_CODEC_PSNR_PKT:
957 case AOM_CODEC_CUSTOM_PKT:
970 struct aom_image *rawimg =
NULL;
971 int64_t timestamp = 0;
973 aom_enc_frame_flags_t
flags = 0;
976 rawimg = &
ctx->rawimg;
977 rawimg->planes[AOM_PLANE_Y] =
frame->data[0];
978 rawimg->planes[AOM_PLANE_U] =
frame->data[1];
979 rawimg->planes[AOM_PLANE_V] =
frame->data[2];
980 rawimg->stride[AOM_PLANE_Y] =
frame->linesize[0];
981 rawimg->stride[AOM_PLANE_U] =
frame->linesize[1];
982 rawimg->stride[AOM_PLANE_V] =
frame->linesize[2];
983 timestamp =
frame->pts;
984 switch (
frame->color_range) {
986 rawimg->range = AOM_CR_STUDIO_RANGE;
989 rawimg->range = AOM_CR_FULL_RANGE;
994 flags |= AOM_EFLAG_FORCE_KF;
997 res = aom_codec_encode(&
ctx->encoder, rawimg, timestamp,
999 if (res != AOM_CODEC_OK) {
1015 ctx->twopass_stats.sz);
1018 *got_packet = !!coded_size;
1044 aom_codec_caps_t codec_caps = aom_codec_get_caps(aom_codec_av1_cx());
1045 if (codec_caps & AOM_CODEC_CAP_HIGHBITDEPTH)
1053 return aom_init(avctx, aom_codec_av1_cx());
1056 #define OFFSET(x) offsetof(AOMContext, x)
1057 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
1060 {
"auto-alt-ref",
"Enable use of alternate reference "
1062 {
"lag-in-frames",
"Number of frames to look ahead at for "
1064 {
"arnr-max-frames",
"altref noise reduction max frame count",
OFFSET(arnr_max_frames),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
VE},
1065 {
"arnr-strength",
"altref noise reduction filter strength",
OFFSET(arnr_strength),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, 6,
VE},
1066 {
"aq-mode",
"adaptive quantization mode",
OFFSET(aq_mode),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, 4,
VE,
"aq_mode"},
1068 {
"variance",
"Variance based Aq", 0,
AV_OPT_TYPE_CONST, {.i64 = 1}, 0, 0,
VE,
"aq_mode"},
1069 {
"complexity",
"Complexity based Aq", 0,
AV_OPT_TYPE_CONST, {.i64 = 2}, 0, 0,
VE,
"aq_mode"},
1071 {
"error-resilience",
"Error resilience configuration",
OFFSET(error_resilient),
AV_OPT_TYPE_FLAGS, {.i64 = 0}, INT_MIN, INT_MAX,
VE,
"er"},
1072 {
"default",
"Improve resiliency against losses of whole frames", 0,
AV_OPT_TYPE_CONST, {.i64 = AOM_ERROR_RESILIENT_DEFAULT}, 0, 0,
VE,
"er"},
1073 {
"crf",
"Select the quality for constant quality mode", offsetof(AOMContext, crf),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, 63,
VE },
1074 {
"static-thresh",
"A change threshold on blocks below which they will be skipped by the encoder",
OFFSET(static_thresh),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX,
VE },
1075 {
"drop-threshold",
"Frame drop threshold", offsetof(AOMContext, drop_threshold),
AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX,
VE },
1076 {
"denoise-noise-level",
"Amount of noise to be removed",
OFFSET(denoise_noise_level),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
VE},
1077 {
"denoise-block-size",
"Denoise block size ",
OFFSET(denoise_block_size),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
VE},
1078 {
"undershoot-pct",
"Datarate undershoot (min) target (%)",
OFFSET(rc_undershoot_pct),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, 100,
VE},
1079 {
"overshoot-pct",
"Datarate overshoot (max) target (%)",
OFFSET(rc_overshoot_pct),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1000,
VE},
1080 {
"minsection-pct",
"GOP min bitrate (% of target)",
OFFSET(minsection_pct),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, 100,
VE},
1081 {
"maxsection-pct",
"GOP max bitrate (% of target)",
OFFSET(maxsection_pct),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, 5000,
VE},
1082 {
"frame-parallel",
"Enable frame parallel decodability features",
OFFSET(frame_parallel),
AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1,
VE},
1084 {
"tile-columns",
"Log2 of number of tile columns to use",
OFFSET(tile_cols_log2),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, 6,
VE},
1085 {
"tile-rows",
"Log2 of number of tile rows to use",
OFFSET(tile_rows_log2),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, 6,
VE},
1088 {
"enable-global-motion",
"Enable global motion",
OFFSET(enable_global_motion),
AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1,
VE},
1089 {
"enable-intrabc",
"Enable intra block copy prediction mode",
OFFSET(enable_intrabc),
AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1,
VE},
1094 {
"b",
"256*1000" },
1098 {
"keyint_min",
"-1" },
1110 .
name =
"libaom-av1",
1114 .priv_data_size =
sizeof(AOMContext),
1123 .wrapper_name =
"libaom",