Commit 352756ec authored by Mark Boorer's avatar Mark Boorer Committed by Michael Niedermayer

avformat/movenc: respect color_range when encoding dnxhd.

Set the ACLR atom appropriately for legal / full range.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7125b6ca
......@@ -807,7 +807,11 @@ static int mov_write_avid_tag(AVIOContext *pb, MOVTrack *track)
ffio_wfourcc(pb, "ACLR");
ffio_wfourcc(pb, "ACLR");
ffio_wfourcc(pb, "0001");
avio_wb32(pb, 2); /* yuv range: full 1 / normal 2 */
if (track->enc->color_range == AVCOL_RANGE_MPEG) { /* Legal range (16-235) */
avio_wb32(pb, 1); /* Corresponds to 709 in official encoder */
} else { /* Full range (0-255) */
avio_wb32(pb, 2); /* Corresponds to RGB in official encoder */
}
avio_wb32(pb, 0); /* unknown */
avio_wb32(pb, 24); /* size */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment