View Full Version : What is Yv12,adj in Ffdshow?
a uio
19th April 2008, 17:43
Hi,
What is the "adj" in yv12,adj that one sees coming out of ffdshow? Does it stand for "adjusted"? If so, what has been adjusted?
I notice this in decoding mpeg2 video from my HDV cameras with ffdshow. The input colorspace is yv12 and the output is yv12,adj. I'm having some serious problems with red/green bleeding along light/dark edges and I'm wondering if this has something to do with it.
Thanks so much for any help. Sorry if this has been asked before but my searches didn't turn up an answer.
Cheers,
A
Biggiesized
20th April 2008, 21:42
I don't know, but I'm guessing it might be a 16-235 --> 0-255 conversion in the same 4:2:0 domain.
Leak
21st April 2008, 17:45
Well, to solve this mystery:
Quotheth src\imgFilters\ffImgfmt.h, line the 48th:
#define FF_CSP_FLAGS_YUV_ADJ (1U<<29) // YUV planes are stored consecutively in one memory block
So this flag just means that while there's three separate planes (Y, U and V) to each frame the filters can assume that they're stored one after another in memory - so it doesn't have an impact on quality...
Are you sure your bleeding isn't just low-quality chroma upsampling? After all, YV12 has only half the luma resolution for chroma, and often the chroma is just point-resized making all colorful edges look blocky...
np: Justus Köhncke - $26 (Safe And Sound)
a uio
21st April 2008, 19:48
Thanks Leak!
I'm thinking now that the problems I'm seeing are due to Chromatic Aberration in the camera lens. It fits the pattern of the type of bleeding I'm getting (radially out from the center). Wikipedia has a nice page on it.
But it is good to know what the "adj" is, and to know that it is not contributing to the problem. I was very curious about that any way.
In the context of this particular forum, Lens Chromatic Aberration is quite interesting, because it means that the Red, Green and Blue planes don't line up. That's got to wreak havoc on compression in YUV based formats.
For reference, with my prosumer level camera and wide angle lens adapter, I'm getting about .2% error in the red channel, i.e. the red channel is scaled 1.002 times larger than the green channel. The centers are perfectly aligned, so you get off by .2 pixels for every 100 pixels you travel out from the center. I'm attaching an example cropped from the corner of an image.
Cheers,
Andrew
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.