fix full range (jpeg yuv) chroma
[ffmpeg.git] / libswscale / swscale.c
index f034c54071feedfc7b306651388d10b692a1e2c0..f6a23425bf59d5cb9548f89d78d507a91d256bf8 100644 (file)
@@ -1876,7 +1876,12 @@ int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4], int srcRange
        if(!srcRange){
                cy= (cy*255) / 219;
                oy= 16<<16;
        if(!srcRange){
                cy= (cy*255) / 219;
                oy= 16<<16;
-       }
+       }else{
+                crv= (crv*224) / 255;
+                cbu= (cbu*224) / 255;
+                cgu= (cgu*224) / 255;
+                cgv= (cgv*224) / 255;
+        }
 
        cy = (cy *contrast             )>>16;
        crv= (crv*contrast * saturation)>>32;
 
        cy = (cy *contrast             )>>16;
        crv= (crv*contrast * saturation)>>32;