On 2014-02-21 17:16:17 +0000, Derek Buitenhuis wrote:
> Framerate is now a sane rational instead of an integer, and
> inputDepth is changed to what it actually is.
> 
> Signed-off-by: Derek Buitenhuis <derek.buitenh...@gmail.com>
> ---
>  configure            | 4 ++--
>  libavcodec/libx265.c | 9 +++++++--
>  2 files changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/configure b/configure
> index 72cf831..33de9cf 100755
> --- a/configure
> +++ b/configure
> @@ -3974,8 +3974,8 @@ enabled libx264           && require libx264 x264.h 
> x264_encoder_encode -lx264 &
>                               { check_cpp_condition x264.h "X264_BUILD >= 
> 118" ||
>                                 die "ERROR: libx264 version must be >= 
> 0.118."; }
>  enabled libx265           && require_pkg_config x265 x265.h 
> x265_encoder_encode &&
> -                             { check_cpp_condition x265.h "X265_BUILD >= 5" 
> ||
> -                               die "ERROR: libx265 version must be >= 5."; }
> +                             { check_cpp_condition x265.h "X265_BUILD >= 7" 
> ||
> +                               die "ERROR: libx265 version must be >= 7."; }
>  enabled libxavs           && require libxavs xavs.h xavs_encoder_encode 
> -lxavs
>  enabled libxvid           && require libxvid xvid.h xvid_global -lxvidcore
>  enabled openssl           && { check_lib openssl/ssl.h SSL_library_init 
> -lssl -lcrypto ||

ok

> diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
> index 9f2d310..0577400 100644
> --- a/libavcodec/libx265.c
> +++ b/libavcodec/libx265.c
> @@ -99,10 +99,15 @@ static av_cold int libx265_encode_init(AVCodecContext 
> *avctx)
>      }
>  
>      ctx->params->frameNumThreads = avctx->thread_count;
> -    ctx->params->frameRate       = (int) (avctx->time_base.den / 
> avctx->time_base.num);
> +    ctx->params->fpsNum          = avctx->time_base.den;
> +    ctx->params->fpsDenom        = avctx->time_base.num * 
> avctx->ticks_per_frame;

ok

>      ctx->params->sourceWidth     = avctx->width;
>      ctx->params->sourceHeight    = avctx->height;
> -    ctx->params->inputBitDepth   = 
> av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth_minus1 + 1;
> +
> +    if (x265_max_bit_depth == 8)
> +        ctx->params->internalBitDepth = 8;
> +    else if (x265_max_bit_depth == 12)
> +        ctx->params->internalBitDepth = 10;

This doesn't look right, AV_PIX_FMT_YUV420P is a valid pixel format for
'x265_max_bit_depth == 12' and I can't see how x265 could deduce that
otherwise.

Janne
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to