Advertisement
einguste

Failed to set VP8E_SET_NOISE_SENSITIVITY codec control

Sep 13th, 2014
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.52 KB | None | 0 0
  1. diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
  2. index 163d12a..0d89c85 100644
  3. --- a/libavcodec/libvpxenc.c
  4. +++ b/libavcodec/libvpxenc.c
  5. @@ -125,6 +125,7 @@ static const char *const ctlidstr[] = {
  6.      [VP9E_SET_TILE_ROWS]               = "VP9E_SET_TILE_ROWS",
  7.      [VP9E_SET_FRAME_PARALLEL_DECODING] = "VP9E_SET_FRAME_PARALLEL_DECODING",
  8.      [VP9E_SET_AQ_MODE]                 = "VP9E_SET_AQ_MODE",
  9. +    [VP9E_SET_NOISE_SENSITIVITY]       = "VP9E_SET_NOISE_SENSITIVITY",
  10.  #endif
  11.  };
  12.  
  13. @@ -440,7 +441,8 @@ static av_cold int vpx_init(AVCodecContext *avctx,
  14.          codecctl_int(avctx, VP8E_SET_ARNR_STRENGTH,    ctx->arnr_strength);
  15.      if (ctx->arnr_type >= 0)
  16.          codecctl_int(avctx, VP8E_SET_ARNR_TYPE,        ctx->arnr_type);
  17. -    codecctl_int(avctx, VP8E_SET_NOISE_SENSITIVITY, avctx->noise_reduction);
  18. +    if (avctx->codec_id == AV_CODEC_ID_VP8)
  19. +        codecctl_int(avctx, VP8E_SET_NOISE_SENSITIVITY, avctx->noise_reduction);
  20.      if (avctx->codec_id == AV_CODEC_ID_VP8)
  21.          codecctl_int(avctx, VP8E_SET_TOKEN_PARTITIONS,  av_log2(avctx->slices));
  22.      codecctl_int(avctx, VP8E_SET_STATIC_THRESHOLD,  avctx->mb_threshold);
  23. @@ -451,6 +453,7 @@ static av_cold int vpx_init(AVCodecContext *avctx,
  24.  
  25.  #if CONFIG_LIBVPX_VP9_ENCODER
  26.      if (avctx->codec_id == AV_CODEC_ID_VP9) {
  27. +        codecctl_int(avctx, VP9E_SET_NOISE_SENSITIVITY, avctx->noise_reduction);
  28.          if (ctx->lossless >= 0)
  29.              codecctl_int(avctx, VP9E_SET_LOSSLESS, ctx->lossless);
  30.          if (ctx->tile_columns >= 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement