[MPlayer-users] Bug?: color space conversions and scalers

Nicolas Hesler nicolas.hesler at sheridanc.on.ca
Fri Jun 13 20:14:06 CEST 2008


I've uploaded a Zip archive to:

ftp://upload.mplayerhq.hu/MPlayer/incoming/

rgb_color_space_test.zip

In it are several tests that I made to flesh out the color space 
conversion problem I've been having with Mplayer/Mencoder.  The problem 
is that the conversion from RGB to YV12 within MPlayer  produces color 
shifting

The process:

-Created a Green->Red gradient RGB source using Adobe Flash.
-Frameserved an RGB32 version  and created an image sequence to encode with

_*Step 1:*_

Checked input -> output without any color conversion with MPlayer, 
AVISynth, ffmpeg and Vdub and compared with original to make certain 
that the image information was not being affected by decoding and 
encoding RGB.

Refer to the files with the prefix 1_* within the zip.  You can compare 
with original.png; They contain the same picture data. Good so far.

*_Step 2: Compare RGB ->YV12->RGB

_*Check the results of the color space conversion from RGB to YV12 and 
back to RGB.

Refer to the files with the prefix 2_*within the zip.  Both AviSynth and 
Virtualdub make a colorspace conversion that show a loss of color, but 
they do not have the undesirable color shifting of the mplayer output.

See:
2_rgb32_avisynth_yv12_rgb32.png,
2_rgb32_vdub_yv12_rgb.png
2_rgb32_mplayer_yv12_rgb.png

For the first test, I went directly from a frameserved rgb32 source 
using the default scaler and made a screenshot.

mplayer test.avs -vo directx:noaccel -vf screenshot

Although AVISynth and Virtualdub conversions are not identical,they are 
perceptually more accurate to the original, with my preference lying 
with Virtualdub's look. The Mplayer results are not even close.

_*Step 3: Test all Mplayer scalers and compare results*_

I then tested all MPlayer scalers (sws 1 though 9)

Refer to the files with the prefix 3_*within the zip.

mplayer mf://*.png -vo directx:noaccel -vf screenshot,format=yv12,scale 
-sws #

None of the results approach the look of AVISynth and/or Virtualdub.



*BUG?
*
Is there a bug here? 
-Is there a way to fix this?

- Why are the color conversions in Mplayer/Mencoder tied into the 
scalers?  Aren't they separate processes altogether??  Why do I need to 
call upon vf scale to make a color space conversion if I'm not resizing 
my frame?

Mplayer version:

MPlayer Sherpya-SVN-r26924-4.2.3 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Xeon(TM) CPU 3.73GHz (Family: 15, Model: 6, Stepping: 4)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.


THANKS!!! for any help.  




More information about the MPlayer-users mailing list