On 2/26/2018 2:10 AM, Luca Barbato wrote:
> ---
> 
> Since the bitstream will be frozen soon shouldn't hurt adding it.
> 
>  configure              |   1 +
>  libavcodec/Makefile    |   1 +
>  libavcodec/allcodecs.c |   2 +-
>  libavcodec/libaomenc.c | 602 
> +++++++++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 605 insertions(+), 1 deletion(-)
>  create mode 100644 libavcodec/libaomenc.c
> 

[...]

> +    /* 0-3: For non-zero values the encoder increasingly optimizes for 
> reduced
> +       complexity playback on low powered devices at the expense of encode
> +       quality. */
> +    if (avctx->profile != FF_PROFILE_UNKNOWN)
> +        enccfg.g_profile = avctx->profile;
> +    else if (avctx->pix_fmt == AV_PIX_FMT_YUV420P)
> +        avctx->profile = enccfg.g_profile = FF_PROFILE_VP9_0;
> +    else
> +        avctx->profile = enccfg.g_profile = FF_PROFILE_VP9_1;

You should add profiles for AV1 instead.

[...]

> +AVCodec ff_libaom_av1_encoder = {
> +    .name           = "libaom-av1",
> +    .long_name      = NULL_IF_CONFIG_SMALL("libaom AV1"),
> +    .type           = AVMEDIA_TYPE_VIDEO,
> +    .id             = AV_CODEC_ID_AV1,
> +    .priv_data_size = sizeof(AOMContext),
> +    .init           = aom_init,
> +    .encode2        = aom_encode,
> +    .close          = aom_free,
> +    .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS,

AV_CODEC_CAP_EXPERIMENTAL. libvpx_vp9 used to outright forbid encoding
with some libvpx versions *after* the bitstream was frozen, let alone
before, since it was known to produce bad streams in some situations. So
at the very least don't just let users encode potentially bad AV1 files
unknowingly.

This can be changed once a stable/good version is released.

> +    .pix_fmts       = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, 
> AV_PIX_FMT_NONE },
> +    .priv_class     = &class_aom,
> +    .defaults       = defaults,
> +    .wrapper_name   = "libaom",
> +};
> --
> 2.12.2
> 
> _______________________________________________
> libav-devel mailing list
> libav-devel@libav.org
> https://lists.libav.org/mailman/listinfo/libav-devel
> 

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

Reply via email to