sminterpolate icon indicating copy to clipboard operation
sminterpolate copied to clipboard

Color shift due to 4:2:0 color subsampling

Open ajkq opened this issue 7 years ago • 1 comments

Version: 0.2.3

Butterflow encodes in 4:2:0, even if -lossless option is enabled. Strangely it does set the profile to high 4:4:4. This causes a noticeable color shift, eg. white becomes rgb(251/253/250).

This quick hack improves color accuracy:

--- render.py	2017-04-10 23:32:31.000000000 +0200
+++ render_new.py	2017-04-18 18:46:55.000000000 +0200
@@ -54,7 +54,7 @@

     def mk_render_pipe(self, dest):
         vf = []
-        vf.append('format=yuv420p')
+        vf.append('format=yuv444p')
         call = [
             settings['avutil'],
             '-loglevel', settings['av_loglevel'],

I hacked it further to encode in qtrle (rgb24), same as the source format and similar colorspace as butterflow seems to operate in internally (bgr24). There was still a slight color shift going on, but only noticeable on a color chart.

Is it possible to change the color subsampling to 4:4:4 in lossless mode?

ajkq avatar Apr 18 '17 19:04 ajkq

Also experiencing this on Windows, but as the windows version is compiled, I can't perform this kind of edit without fully rebuilding the project. Kind of frustrating, since it means I can't actually use butterflow as it destroys the output's colors.

Fire- avatar Aug 19 '17 23:08 Fire-