Log in

View Full Version : [solved] Resize causing color change


board123
23rd December 2009, 22:15
I've been using the built in resizers (generally Lanczos and Spline) for a long, long time and only noticed this issue today. I think the pictures will speak for themselves. I've resized the screenshots with Photoshop to make them more web friendly. The only things of interest here are the colors.

Original h264 source
http://img51.imageshack.us/img51/8640/orig.th.png (http://img51.imageshack.us/img51/8640/orig.png)

Re-encoded with x264-1376 and LanczosResize
http://img37.imageshack.us/img37/5707/encode.th.png (http://img37.imageshack.us/img37/5707/encode.png)

The easiest areas to spot the color change are the green chair in the background, the flowers in the hair and the cell phone. Skin tone also changes slightly. It seems the reds and greens are exaggerated while blues are subdued. I've done a lot of tweaking and confirmed that it is definitely the resize filter that's causing this.

Am I the only one having this problem? I haven't found any similar issues on the web regarding resize filters. This is such an odd problem...

bizz & buzz
24th December 2009, 01:45
If you are downscaling from HD to SD, perhaps using ColorMatrix will fix this issue.

EDIT: here is a very good summery on why,when and how to use ColorMatrix:
http://forum.doom9.org/showthread.php?t=133982

IanB
24th December 2009, 02:50
My guess is you have a Rec601/709 translation in your process.

Taking your original PNG plus ConvertToYV12(Matrix="Rec709") comparing to your encoded PNG plus ConvertToYV12(Matrix="Rec601") and they match

board123
24th December 2009, 07:35
After some more playing around before your replies, I reached the same conclusion. It is indeed a case of the output being treated as Rec601.

ColorMatrix(mode="Rec.709->Rec.601") in the script fixed the problem. Thanks.