PDA

View Full Version : Slight Color Shift to Right


Emp3r0r
5th April 2003, 03:34
I've noticed this (slight) problem for a couple months now in different movies I've encoded. The problem appears to be a very slight chroma shift to the right. The only time I can pick up on the problem are when a frame has distinct edges against red. For example, in this screenshot (http://jvance.com/files/slight color shift.png) you can see how xvid has more red on the left edge of the meteor, and is missing red on the right edge. XviD was decoded with Nic's March 30th decoder. I've seen this in many of my two pass encodes since the beginning of the year. Here are the settings I used for this encode...

Settings for XviD (3/30/2003 6:02:45 AM)
Mode: 1 Pass - quality, Quality: 100%
Motion Search Precision: 6 - Ultra
Quantization Type: H.263
FourCC Used: XVID
Max I-frame Interval: 240, Min I-frame Interval: 1
Lumimasking: OFF
Interlacing: OFF
Greyscale: OFF
Max B-frames: 3
B-frames Quantizer Ratio: 150%
Packed Bitstream: OFF
DX50 B-VOP Compatibility: ON
Print debug info on each frame: OFF
Min I-frame Quantizer: 2, Max I-frame Quantizer: 31
Min P-frame Quantizer: 2, Max P-frame Quantizer: 31
Max Bitrate: 10000kbps, Max Overflow Improvement: 60%, Max Overflow Degradation: 60%

Acaila
5th April 2003, 08:46
If I remember correctly the few chroma shift problems I've seen here were caused by Avisynth filters. Just for completeness sake, what is the Avisynth script that you used?

Emp3r0r
5th April 2003, 10:03
I used AviSynth 2.5.1 with this scriptsource=mpeg2source("F:\DVD\SW2\sw2.d2v").crop(4,58,-2,-62)
source=source.LanczosResize(640,272)
return source.FreezeFrame(0,0,1205)
Both screenshots are from this script

kilg0r3
5th April 2003, 10:46
could you please post the whole frame and the source frame?

Emp3r0r
5th April 2003, 23:30
Mirror 1 Both frames (http://jvance.com/files/fullframes.png) 793KB (Fast)
Mirror 2 Both frames (http://jvance.dnsalias.com/files/fullframes.png) 793KB

sh0dan
6th April 2003, 12:47
Seems more like a colorspace conversion problem - most likely by the decoder. To properly test, use this script:

source=mpeg2source("F:\DVD\SW2\sw2.d2v").crop(4,58,-2,-62)
source=source.LanczosResize(640,272)
a = source.FreezeFrame(0,0,1205)
b = avisource("xvid.avi")
stackvertical(a,b)
converttoyuy2()
converttorgb()


Then you can directly compare each frame. The reason to first convert to yuy2 is to get the most precise chroma upsampling, as the direct YV12 -> RGB is using the XviD color conversion, which is less precise than the rewritten routines.

What you are seeing in Virtual Dub is not the YV12 material, but the converted material.

kilg0r3
6th April 2003, 19:11
To me, this looks like the color stepping which is seems to be an intrinsic property of the YV12 colorspace. Which we have already discussed in this thread (http://forum.doom9.org/showthread.php?s=&threadid=48163). It seems that, using YV12, we will have live with it.

Emp3r0r
6th April 2003, 19:21
@shodan: your right, with that script the XviD clip appears much closer to the original as seen in this screenshot (http://jvance.com/files/compare.png). This means that there was no problem during encoding, just the decoding... right?

Emp3r0r
8th April 2003, 00:02
As sad as this may sound, you can use the fourcc changer and change your files to DX50 fourcc and play them back with no color shift until the XviD colorspace routines get fixed.

Micro
8th April 2003, 09:36
For me DivX 5.xx always had "better" colours and "cleaner" edges.
So far I thought that it's only a feeling not reality.
So, it should be one comparatively easy way to further enhance
the quality XviD produces - just fix playback filter :-)
Milan ?
Nic ?

sh0dan
10th April 2003, 10:07
As you can see your encode is "fine". The problem you are experiencing is because of the colorspace conversions.

When you view frames in VirtualDub, they are converted to RGB by the codec. Unfortunately chroma is not interpolated, but the same chroma is used for all four pixels. This creates the "right-shift" problem.

This is probably so for speed reasons - it does however pose a problem, as RGB from XviD is quite degraded. However RGB is never used for overlaying - in this case YV12 or YUY2 is used.