[FFmpeg-devel] [PATCH] libavformat/mov: Accept known codepoints in 'colr'

Michael Niedermayer michael at niedermayer.cc
Sun Aug 21 04:44:34 EEST 2016

On Wed, Aug 17, 2016 at 12:25:47AM -0700, Steven Robertson wrote:
> This change relaxes the whitelist on reading color metadata in MOV/BMFF
> containers. The whitelist on writing values is still in place.
> As a consequence it also fixes an apparent bug in reading 'nclc' values.
> The 'nclc' spec [1] is in harmony with ISO 23001-8 for the values it
> lists, but the code getting removed was remapping 5->6 and 6->7 for
> primaries, which is incorrect, and was remapping 6->5 for color matrix
> ("colorspace" in the code), which is equivalent but an unnecessary
> inconsistency. This logic error doesn't appear in movenc.
> Removing the whitelist allows proper conversion when the source codec
> relies on the container for proper signaling of newer codepoints, such
> as DNxHR and VP9. If converting to a codec or container that has updated
> its spec to include the new codepoints, the metadata will be preserved.
> If going back to MOV/BMFF, the output whitelist will still kick in, so
> this won't result in out-of-spec files being created.
> [1] https://developer.apple.com/library/mac/technotes/tn2162/_index.html
> Signed-off-by: Steven Robertson <steven at strobe.cc>
> ---
>  libavformat/mov.c | 40 +++++++++-------------------------------
>  1 file changed, 9 insertions(+), 31 deletions(-)



Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160821/15b55f42/attachment.sig>

More information about the ffmpeg-devel mailing list