ffmpeg | branch: master | Michael Niedermayer <[email protected]> | Sat Jul 19 
23:08:29 2014 +0200| [b53bdae11f1eceea1a2e25a98aee81e1d1954e14] | committer: 
Michael Niedermayer

swscale/utils: fix rgb -> fullrange yuv

Fixes part of Ticket3785

Signed-off-by: Michael Niedermayer <[email protected]>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b53bdae11f1eceea1a2e25a98aee81e1d1954e14
---

 libswscale/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libswscale/utils.c b/libswscale/utils.c
index e176f0b..8519650 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -838,7 +838,7 @@ int sws_setColorspaceDetails(struct SwsContext *c, const 
int inv_table[4],
 
     //The srcBpc check is possibly wrong but we seem to lack a definitive 
reference to test this
     //and what we have in ticket 2939 looks better with this check
-    if (need_reinit && c->srcBpc == 8)
+    if (need_reinit && (c->srcBpc == 8 || !isYUV(c->srcFormat)))
         ff_sws_init_range_convert(c);
 
     if ((isYUV(c->dstFormat) || isGray(c->dstFormat)) && (isYUV(c->srcFormat) 
|| isGray(c->srcFormat)))

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to