View Full Version : Color Depth issue (pro & cons)
shutdown
16th May 2004, 21:13
I only now discoverd the AviCheck tool, and when checking some files, I realized that my files are always @ Color Depth: 12.
While others vary from 12 - 32 bit.
Example of my encoding:
(XviD-24062003 Koepi)
VIDEO: XVID
B-VOP: Yes
S(GMC)-VOP: No
QuarterPixel: No
Frame Size: 512 x 384
Frames Rate: 25.000
Color Depth: 12
Total Frames: 36669
I use AVS + VDmod (very simple scripts) :
LoadPlugin("D:\VID APPS\AviSynth\MPEGdecoder.dll")
mpegsource("VTS_01_1.VOB+VTS_01_2.VOB+VTS_01_3.VOB+VTS_01_4.VOB")
Trim(0,161300)
Crop(6, 12, -8, -12)
BicubicResize(576,304)
I use fast recompress.
Ok, I do understand that because xvid works with the YV12 color space.
My question is:
is there any advantage going for higher Color Depths? (my rips look fine but somewhat faded colors compared to the VOB and to most other rips i've seen, could that be it?)
Should I use ConvertToRGB32(), or anything else?
Thanks, and sorry if posted in the wrong fourum.
SeeMoreDigital
16th May 2004, 21:32
Yes, I've noticed this too with XviD.
I use MPEGmediator to generate the bulk of my encodes. When I select the applications YV12 option I get 12bit colour. But when I de-select the YV12 option I get 24bit colour.
As far as I can 'see' the encoded image looks the same!
With DivX, FFvfw, VP6, WMV9(VCM) etc, it's always 24bit colour.
Cheers
BoNz1
16th May 2004, 21:38
It doesn't make a difference the color depth is the same; it ends up in the same format anyway. The number that is written in the avi doesn't mean anything.
Koepi
16th May 2004, 21:57
The number means something:
12 bits indicates that you used an yv12 process chain
16 bits shows that the input was i.e. yuv2
dunno if more bits are possible with xvid, but those would inidcate the source used was RGB.
Since all mpeg codecs so far work in yv12 colour space internally it's best if your file is 12 bits :)
Regards
Koepi
shutdown
16th May 2004, 22:16
@SeeMoreDigital
Thanks for your suggestion. However, I encode quite a few interlaced clips, and have yet to find a true deinterlacer other than decomb (using FieldDeinterlace()), and I can only do it with AviSynth.
@Koepi and all;
So, if I do use ConvertToRGB32() is it just a waste of encoding time (maybe quality), or is there any gain?
SeeMoreDigital
16th May 2004, 22:33
Well here's a very short Interlaced Anamorphic XviD (24bit) Clip (http://www.SeeMoreDigital.net/Uploaded_Files/Doom9_Forum_files/XviD_(24bit).zip).
Enjoy
scharfis_brain
16th May 2004, 22:37
please do not confuse xvid's 12bits or 16 bits colorspcae with your graphics adapters color depth.
your graphics adapter always tells you the bits per *every* pixel
16 bit = 65536 colors
12 bitī= 4096 colors
24 bit = 16.7 mio colors
32 bit = even far more colors
but XVid calculates the average space consumption of paired pixels.
the color depth will remain 24 bit, but the color resolution will drop to half (16bit) or quarter (12bit)
SeeMoreDigital
16th May 2004, 23:15
Sorry, I cocked up!
Here is the Interlaced Anamorphic XviD (24bit) Clip (http://www.SeeMoreDigital.net/Uploaded_Files/Doom9_Forum_files/NTSC_XviD_(24bit)_Interlaced.zip).
And here is the DeInterlaced Anamorphic XviD (24bit) Clip (http://www.SeeMoreDigital.net/Uploaded_Files/Doom9_Forum_files/NTSC_XviD_(24bit)_DeInterlaced.zip).
They're not bad... If you're into watching 'Test Cards' :D
Cheers
shutdown
17th May 2004, 00:34
SeeMoreDigital, thank you very much for the samples. BTW, did you capture those from a hardware card, or what? (I mean I'd like to have it in mpeg2) :D
Also did a bit of reading in your site, very educating. Ta.
malkion
17th May 2004, 02:07
i need some insight.
using fast recompress and the default yv12 colorspace in avisynth u will get 12bit videos. lately in vdub, i've been specifying output color depth to 32bit and producing 16bit videos.
is this really producing more colors from the yv12 input, or no? should i just leave color depth output alone?
SeeMoreDigital
17th May 2004, 09:53
Originally posted by shutdown
SeeMoreDigital, thank you very much for the samples. BTW, did you capture those from a hardware card, or what? (I mean I'd like to have it in mpeg2) :D
Also did a bit of reading in your site, very educating. Ta. Thanks shutdown!
The 'Test Card' samples I posted are 123 frame extracts from an 1,206 frame original - which was not captured. In fact the NTSC source started off as being enclosed in an .MXF container/wrapper.
In the bottom left hand corner, you can see the encode moving through the frames in the following order: I B B P B B P B B B P B B P B and then back to I. Needless to say, the frame order gets rather excited when converted to PAL.
Cheers
minolta
17th May 2004, 18:08
Hmmm, this thread has me worried. In the past I knew XviD was internally YV12, so I've been using ConvertToYV12(interlaced=true) at the end of my scripts (when encodes were indeed interlaced) since I was using fast recompress. But I just did a test:
Source: Analog PiC MJPEG 4:2:2 (YUY2) Interlaced from BT8x8
VDUB: Fast Recompress
XVID: Single Pass, Constant Quantizer of 1, Interlace checked, defaults...
Run #1: No color space conversion in AviSynth (so YUY2)
Run #2: Use ConvertToYV12(interlaced=true) in script
Results: Same encoding time (44 seconds) and Run #1 slightly larger (14.1MB vs. 13.7MB)
Analysis: Use subtract to see difference of each to original:
---
orig=AviSource("cap.avi").ConvertToRGB(interlaced=true)
yuy2=AviSource("cap-yuy2.avi").ConvertToRGB(interlaced=true)
yv12=AviSource("cap-yv12.avi").ConvertToRGB(interlaced=true)
diff1=Subtract(orig, yuy2).Levels(127,1,129,0,255)
diff2=Subtract(orig, yv12).Levels(127,1,129,0,255)
Interleave(orig, diff1, diff2)
---
The YUY2 clip was virtually the same as source. The YV12 clip was noticibly different, but only around "interlaced lines".
Conclusions??: Okay to use ConvertToYV12 is progressive (makes little difference with encoding time anyway), but avoid if interlaced (interlaced lines appear "greyed out"). In general, don't ever convert (RGB or other) for the sake of xvid since it'll do it correctly anyway. I'm not an expert; can anybody else verify this to be true?
Soulhunter
17th May 2004, 18:23
@ SMD
Hehe, you remember this (http://forum.doom9.org/showthread.php?s=&threadid=74549) thread ???
Originally posted by SeeMoreDigital
Can someone check and comment on the colour output of these (http://homepage.ntlworld.com/seemoredigital/XviD_Colour_Tests.zip) two XviD encodes please (total zip size 5.95MB)?
Cheers
Originally posted by Soulhunter
VDub puts wrong color info into the avi via full processing mode!
So, both are YV12...
The one that shows up 12bit, was encoded with fast recompress...
The one that shows up 24bit, was encoded with full processing mode !!!
Bye
Originally posted by SeeMoreDigital
I have to admit. I don't know for certain!
Both were encoded using MPEGmediator, however, there is a setting in the application that lets you un-check "Export frames in YV12". When I do this with XviD I get 24bit colour!
If there are some people out there who can take the encodes apart and analyse the differences between them I would not mind knowing what they are please.
Cheers
Originally posted by Soulhunter
So, this option in MPEGmediator does the same as the VDub one I talked about! It feeds the codec with YV12 (fast processing) or RGB (full processing) colorspace... But the DivX/XviD etc. encoder itself will always transform it into YV12 colorspace! Only the input colorspace info is stored in the AVI, not the one the video really has...
Bye
So, after all my guess was right... ^^
Bye
SeeMoreDigital
17th May 2004, 22:28
Well, I don't confess to understand what's really going on - it gives me brain ache!
I generated some XviD test encodes today with DVD2AVI (v1.77.3), using its RGB and YUV settings. Both settings created 24bit colour depth and totally different file sizes to MPEGmediator...
Anyways... as long as all these encoding applications generate great looking encodes with XviD v1.0... does it really matter!
I'm well happy :D
Cheers
Magno
19th May 2004, 01:09
Well, i thought i knew all about colorspace converions but it seems i didn't....
I use MPEG2DEC3dg v1.3.0 for decoding MPEG2 video from DVD sources and since the documentation says that the output is YV12 nativelly, i didn't pay attention anymore to it and begun to encode using Xvid 1.0 FINAL using VirtualdubMOD and FastRecompress option...
When i played the resulting video with ffdshow decoder, i got surprised in viewing the following: "COLORSPACE: YUY2"!!!
When did it happen? The AVS scrit is as easy as this:
LoadPlugin("D:\Archivos de programa\AviSynth 2.5\plugins\mpeg2dec3dg.dll")
LoadPlugin("D:\Archivos de programa\AviSynth 2.5\plugins\undot.dll")
mpeg2source("D:\Simpsons_DVD 4\pruebas\simpsons_DVD4dg.d2v",cpu=0,idct=7)
trim(0,30956)
crop(10,0,696,572)
BicubicResize(512,384,0.333,0.333)
Undot()
I am really disappointed because i didn't want any colorspace conversion and i can't figure out where it is taking place (UnDot works with YV12 too)....
Can anybody help me, please?? :(
Soulhunter
19th May 2004, 19:11
Originally posted by Magno
...surprised in viewing the following: "COLORSPACE: YUY2"!!!I get YV12adj... :confused:
What happens if you disable YUY2 colorspace in ffdshow ???
Bye
Magno
20th May 2004, 14:39
@Soulhunter:
If I disable YUY2 in ffdshow, i get RGB32 as output....
I really can figure out what is happening....
Soulhunter
20th May 2004, 18:35
Originally posted by Magno
If I disable YUY2 in ffdshow, i get RGB32 as output....And if you disable everything except YV12... :rolleyes:
Bye
SeeMoreDigital
20th May 2004, 19:15
Is there some sort of application/file reader/utility that can detect and provide detailed info about the colour depth?
Cheers
Soulhunter
20th May 2004, 19:40
Btw, enabling ffdshow raw-processing confirms that the decoded video is uncompressed YV12...
@ SMD
AFAIK the video must be decompressed to get access to this info!
But that would be exactly the same we do right now... ;)
Bye
BBugsBunny
22nd May 2004, 09:46
@ SMD
I found a little useful tool that shows the colordepth of an avi an lots of other information of an avi:
http://yaai.sourceforge.net/
stephanV
22nd May 2004, 10:09
this tool also shows the input-colordepth i think, not the internal one which is always yv12 for XviD, DivX, etc. and thus 12 bpp (or to be more accurate 48 bits for a group of 4 pixels)
YAAI doesnt work with files without sound :confused:
Will I loose quality by using 16 bit color depth (on the monitor) when I watch Xvid (or mpeg2) movies? I can't use 32 bit color depth with custom resolutions as 720x768 :(
PS. Copy-paste dosen't work!?! :confused: Please, don't blame me if this short text has as many typos as Windows has bugs ;)
Originally posted by M7S
Will I loose quality by using 16 bit color depth (on the monitor) when I watch Xvid (or mpeg2) movies? I can't use 32 bit color depth with custom resolutions as 720x768 :(
What kind of strange graphics card are you using? *wonders*
But still, if your card does support video overlay in those modes *AND* it's getting used you won't lose quality. If it isn't used, you'll easily notice color banding on gradients in the video.
np: While - Shear (Slip)
Originally posted by Leak
What kind of strange graphics card are you using? *wonders*
But still, if your card does support video overlay in those modes *AND* it's getting used you won't lose quality. If it isn't used, you'll easily notice color banding on gradients in the video.
I'm using a geforce4mx. I guess all Nvidia cards allow you to make custom resolutions if you don't use to old drives. I don't know why only 8bbp and 16bbp is available for custom .
Thank you clearing this up. I really enjoy being able to watch my dvds without any resizing. Knowing that I won't loose any quality because of the colordpth makes it even more enjoyable.
Originally posted by M7S
I'm using a geforce4mx. I guess all Nvidia cards allow you to make custom resolutions if you don't use to old drives. I don't know why only 8bbp and 16bbp is available for custom.
If you're adding resolutions using the current nVidia ForceWare drivers - in the "Custom Resolutions" dialog in the control panel, strangely enough the drop-down list for the bit depth is only 2 rows high, so it only shows "8 bit" and "16 bit", but if you look a bit closer you'll notice scroll arrows in the drop-down - click on the down arrow once and you'll get to the 32 bit entry... :) (At least when using the 56.72 drivers from nVidia.com with my Geforce FX 5600...)
Thank you clearing this up. I really enjoy being able to watch my dvds without any resizing. Knowing that I won't loose any quality because of the colordpth makes it even more enjoyable.
Yeah, same here. :)
np: Scorn - Falling (Autechre Fr 13 Mix) (Ellipsis)
Originally posted by Leak
If you're adding resolutions using the current nVidia ForceWare drivers - in the "Custom Resolutions" dialog in the control panel, strangely enough the drop-down list for the bit depth is only 2 rows high, so it only shows "8 bit" and "16 bit", but if you look a bit closer you'll notice scroll arrows in the drop-down - click on the down arrow once and you'll get to the 32 bit entry... :) (At least when using the 56.72 drivers from nVidia.com with my Geforce FX 5600...)
It worked. Thank you. I've never seen such a stupid drop-down list before.:)
Originally posted by M7S
It worked. Thank you. I've never seen such a stupid drop-down list before.:)
Yeah - it's not as if there wasn't any space left for the third line... what were they thinking? :confused: (or smoking, for that matter...)
np: Autechre - Silverside (Amber)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.