[vlc-devel] [PATCH 2/2] avcodec: write the colorimetry parameters after the codec is opened
Steve Lhomme
robux4 at ycbcr.xyz
Fri Dec 14 08:37:13 CET 2018
On 13/12/2018 17:26, Rémi Denis-Courmont wrote:
> Le keskiviikkona 12. joulukuuta 2018, 15.58.19 EET Steve Lhomme a écrit :
>> So that the container can overwrite values written by the codec. If the
>> container contains no info, nothing gets written and we use what avcodec is
>> using.
> I don't recall that we ever settled how to resolve meta-data conflicts between
> demuxer, packetizer and decoder. Somebody's bug is somebody else's feature,
> and somebody's work-around is somebody else's regression.
>
> From a logical standpoint, this patch looks wrong. The packetizer parameters
> should be input to the decoder, and the decoder should then decide what the
> output parameters are. That is, unless we agree on a reasoned policy to
> systematically favor the demuxer over the decoder.
>
This is superseded by "dec: used the container colorimetry values on the
output if they are known".
So passing the packetizer info to the decoder remains. On the other hand
it still considers that container values overwrite the codec values.
For colorimetry I think it's OK. Not a lot of containers have these
values and those who do must be correct or have a reason to overwrite
the codec ones (the codec might be limited in what it accepts).
We could warn when the decoder has different values than the container.
In the end we have to pick one anyway.
More information about the vlc-devel
mailing list