]> git.sesse.net Git - mlt/commit
Fix a few problems with YCbCr colorspace conversion.
authorDan Dennedy <dan@dennedy.org>
Tue, 21 Jan 2014 06:34:50 +0000 (22:34 -0800)
committerDan Dennedy <dan@dennedy.org>
Tue, 21 Jan 2014 06:35:18 +0000 (22:35 -0800)
commit6834acd8779dbf5224a294c22a6d5f69f1903d3e
tree0d763e11bc2fc3a7d742d5f85ef35bbc9480aafc
parent0dbfed3e495820fef6c1afbd8400e00046193681
Fix a few problems with YCbCr colorspace conversion.

In avformat producer on libav (and FFmpeg < v2.1) conversion from RGB to
YCbCr would not use the destination colorspace because
sws_getColorspaceDetails() fails. Switch to calling only
sws_setColorspaceDetails().

In full luma yuvj420p->mlt_image_yuv420p conversion, the luma range was
always scaled down to MPEG range. The swscale implementation does not
let one override the range as the conversion routines are initialized at
the time a swscale context is allocated and initialized. Any changes in
sws_setColorspaceChanges() are mute.

In RGB->YCbCr conversion, the existing (source) colorspace was used
instead of the profile colorspace. Also, we need to set the new
colorspace as a property of the frame.
src/modules/avformat/filter_avcolour_space.c
src/modules/avformat/producer_avformat.c