summaryrefslogtreecommitdiff
path: root/libavcodec/libvpxenc.c
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-01-28 15:08:10 +0000
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-01-28 15:08:10 +0000
commit13be46c08e59141408f1a7afd4737826afa87f11 (patch)
tree83466267710058994b498df467287a2d74a72e55 /libavcodec/libvpxenc.c
parent4f32ccb61800ef1a0acf02010784da4f15adde44 (diff)
parent0ac9f33a9e69c64eee592791be3c5441a6a3d6b7 (diff)
Merge commit '0ac9f33a9e69c64eee592791be3c5441a6a3d6b7'
* commit '0ac9f33a9e69c64eee592791be3c5441a6a3d6b7': lavc: Move frame_skip_* to codec private options Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/libvpxenc.c')
-rw-r--r--libavcodec/libvpxenc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 99c3f95699..766b7bd755 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -102,6 +102,7 @@ typedef struct VP8EncoderContext {
int tile_rows;
int frame_parallel;
int aq_mode;
+ int drop_threshold;
} VP8Context;
/** String mappings for enum vp8e_enc_control_id */
@@ -497,7 +498,13 @@ static av_cold int vpx_init(AVCodecContext *avctx,
}
}
- enccfg.rc_dropframe_thresh = avctx->frame_skip_threshold;
+#if FF_API_PRIVATE_OPT
+FF_DISABLE_DEPRECATION_WARNINGS
+ if (avctx->frame_skip_threshold)
+ ctx->drop_threshold = avctx->frame_skip_threshold;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+ enccfg.rc_dropframe_thresh = ctx->drop_threshold;
//0-100 (0 => CBR, 100 => VBR)
enccfg.rc_2pass_vbr_bias_pct = lrint(avctx->qcompress * 100);
@@ -1009,6 +1016,7 @@ static int vp8_encode(AVCodecContext *avctx, AVPacket *pkt,
" is still done over the partition boundary.", 0, AV_OPT_TYPE_CONST, {.i64 = VPX_ERROR_RESILIENT_PARTITIONS}, 0, 0, VE, "er"}, \
{ "crf", "Select the quality for constant quality mode", offsetof(VP8Context, crf), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 63, VE }, \
{ "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 }, \
+ { "drop-threshold", "Frame drop threshold", offsetof(VP8Context, drop_threshold), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, VE }, \
{ "undershoot-pct", "Datarate undershoot (min) target (%)", OFFSET(rc_undershoot_pct), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 100, VE }, \
{ "overshoot-pct", "Datarate overshoot (max) target (%)", OFFSET(rc_overshoot_pct), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1000, VE }, \