<div dir="ltr"><div class="gmail_quote"><div>Hi Jean-Baptiste,</div><div dir="ltr"><br></div><div dir="ltr">Le mer. 27 déc. 2017 à 12:04, Jean-Baptiste Kempf <<a href="mailto:jb@videolan.org">jb@videolan.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Mathieu,<br>
<br>
On Tue, 26 Dec 2017, at 15:21, Mathieu Velten wrote:<br>
> Sometimes the profile is not available in the container metadatas (WebM).<br>
<br>
Shouldn't the packetizer find those info?<br></blockquote><div><br></div><div>avparser is used to packetize VP9.</div><div>I just tried to fetch the profile after the call to av_parser_parse2 but it doesn't seem to update the avcodec context with the profile.</div><div><br></div><div>I am a bit reluctant to write the whole logic to parse the profile manually there since we have the correct info directly in the decoder context at this stage.</div><div><br></div><div>However I will revert the change for HEVC since we have a full packetizer in this case, updated patch incoming.</div><div><br></div><div>Thanks for the review.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> ---<br>
>  modules/codec/avcodec/vaapi.c | 11 +++++++----<br>
>  1 file changed, 7 insertions(+), 4 deletions(-)<br>
><br>
> diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/<br>
> vaapi.c<br>
> index ee7fdf8..ffe537e 100644<br>
> --- a/modules/codec/avcodec/vaapi.c<br>
> +++ b/modules/codec/avcodec/vaapi.c<br>
> @@ -87,9 +87,9 @@ static int GetVaProfile(AVCodecContext *ctx, const<br>
> es_format_t *fmt,<br>
>          count = 18;<br>
>          break;<br>
>      case AV_CODEC_ID_HEVC:<br>
> -        if (fmt->i_profile == FF_PROFILE_HEVC_MAIN)<br>
> +        if (ctx->profile == FF_PROFILE_HEVC_MAIN)<br>
>              i_profile = VAProfileHEVCMain;<br>
> -        else if (fmt->i_profile == FF_PROFILE_HEVC_MAIN_10)<br>
> +        else if (ctx->profile == FF_PROFILE_HEVC_MAIN_10)<br>
>          {<br>
>              i_profile = VAProfileHEVCMain10;<br>
>              i_vlc_chroma = VLC_CODEC_VAAPI_420_10BPP;<br>
> @@ -103,11 +103,14 @@ static int GetVaProfile(AVCodecContext *ctx, const<br>
> es_format_t *fmt,<br>
>          count = 5;<br>
>          break;<br>
>      case AV_CODEC_ID_VP9:<br>
> -        if (fmt->i_profile == FF_PROFILE_VP9_0)<br>
> +        if (ctx->profile == FF_PROFILE_VP9_0)<br>
>              i_profile = VAProfileVP9Profile0;<br>
>  #if VA_CHECK_VERSION( 0, 39, 0 )<br>
> -        else if (fmt->i_profile == FF_PROFILE_VP9_2)<br>
> +        else if (ctx->profile == FF_PROFILE_VP9_2)<br>
> +        {<br>
>              i_profile = VAProfileVP9Profile2;<br>
> +            i_vlc_chroma = VLC_CODEC_VAAPI_420_10BPP;<br>
> +        }<br>
>  #endif<br>
>          else<br>
>              return VLC_EGENERIC;<br>
> --<br>
> 2.14.3<br>
><br>
> _______________________________________________<br>
> vlc-devel mailing list<br>
> To unsubscribe or modify your subscription options:<br>
> <a href="https://mailman.videolan.org/listinfo/vlc-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a><br>
<br>
<br>
--<br>
Jean-Baptiste Kempf -  President<br>
+33 672 704 734<br>
</blockquote></div></div>