|
|
INDEX F.A.Q. SEARCH LATEST POSTS
Rules Register Profile Private messages Login
| Author |
Message |
jagabo Member
Joined: 09 Dec 2005 Location: none
|
|
| edDV wrote: |
| 4:1:1 has less generational loss than 4:2:0 which requires a spatial chroma interpolation each time it is recoded. |
Why would 4:2:0 require interpolation? For three successive chroma samples A, B and C:
4:1:1 -> 4:4:4
A A A A B B B B C C C C
4:2:0 -> 4:4:4
A A B B C C
A A B B C C
In fact, as far as I can tell, most decoders and colorspace converters point resize when converting YUV 4:2:0 to 4:4:4 (YUV or RGB).
| edDV wrote: |
| 4:1:1 disadvantages show when sharp chroma transitions happen combined with relatively flat luminance as shown in jagabo's pattern above. |
It may be most obvious there but it can be seen many places where the luma is changing too.
| edDV wrote: |
| Under similar circumstances 4:2:0 breaks into 2x2 blocks. |
If it breaks up into 2x2 blocks then the 4:2:0 chroma is being point resized on conversion to 4:4:4!
|
|
2Bdecided Member
Joined: 21 Nov 2007 Location: United Kingdom
|
|
vhelp ..Semi Neutral..
Joined: 31 Mar 2001 Location: New York
|
|
As edDV noted earlier, when you work and re-work within DV_4:1:1 you get virtually
no generation loss of original image.
However, once you introduce a color space conversion function -- other than the same codec
used in the original sources processing, assuming that the method is correct -- you risk
generation loss at any level of what is considered original image detail.
A -- What this means is that if you take a color space function and apply a 4:1:1->4:2:0, or
4:1:1->4:2:2, or 4:1:1->4:4:4, you risk some form of generation loss -- aka, rounding errros.
The greater the upsample resolution the less loss. Thus, a 4:1:1->4:2:0 losses more image detail
than a 4:1:1->4:2:2, and so on. Even the averaging of interpolation etc has some rounding errors,
as noted below.
In this analigy above and with the exception to rounding errros, the amount of lost detail is mainily
in the U/V chroma channels (up/down sub-sampled pixels) of the processed image.
The rouding errors spoken of are mainly that of the YUV->RGB, RGB->YUV color space conversions.
B -- most if not all DV_4:1:1 go through an upsampling to 4:2:2, though prob to reduce the amount
of generation loss -- if one were to work inside a 4:1:1 -- and when the aim or final end product
destination is a codec, for instance, in 4:2:0 format as found in MPEG-2 or H264, etc.
A long time ago it was determined that by upsampling to 4:2:2 (or even 4:4:4) you have a greater
resolution of image detail to work with when performing pixel manipulation in image processing, and
when you finally do apply the downsampling to your end product the loss is minimal than if done the
other way.. see below.
C -- don't forget, that during this upsampling/converting, in addition to loosing detail from this function,
that you factor in your final codec destination. Thus, if the end product is MPEG-2 then your DV
(assuming the above analigy) will ultimately go through the following steps to become MPEG-2 video:
BAD ---> 4:1:1->4:2:0->edit/filter->encode[mpeg-2]
GOOD--> 4:1:1->4:2:2->edit/filter->encode[mpeg-2]
BETTER> 4:1:1->4:2:2->encode[mpeg-2]
* in the edit/filter step, there are usually manipulation routines applied to the pixels, be it in a
convolution, median, spacial, temporal or other combinations of these functions.
In the BAD analigy its not saying that it is bad but that it is not as optimum to work in this mode.
In the BETTER analigy it is assume that the video needs no editing/filter and quality loss is not a
factor.
Now, there are many DV codec that employ's decoding routines and as mentioned earlier, that one
of these routines is the upsampling to 4:2:2. And, there have been various errors found in many of
these dv codecs that produce poor results. Some of them were described in jagabo's examples.
Even in the expansive suites of today there are still minor issues realized with the decoding and
color space conversion routines. Adobe is one example, and there is a large year+ long forum
discussion about that problem, and I belive it is still going on to this day. I don't have the URL
to that forum with me. But if I find it, I'll post it up. It was a very interesting read though a
long one at that.
But this vague point I am trying to make here is that to this day there are still problems in dealing
the accuracy of DV codecs and color space processing and that there are no limits to where
or who are the propriators of these products -- the problems still exist, today!
But, for what its worth, I only know of one codec that seems to be the most accurate, and
that is the Cedocida codec. IMO, it is more accurate in its functions than most other dv codecs
out there, today.
-vhelp 4694
_________________
VHELP's - Sample Clips [last: 12.29.06],
my YouTube videos
|
|
JohnnyMalaria Member
Joined: 29 May 2006 Location: United States
|
|
Absolutely right.
I'm still befuddled by the number of high end editing/encoding suites that convert to full RGB before transcoding. What's more, some still get the whole RGB vs. R'G'B' thing wrong.
Our software's internal DV codec performs everything exclusively in the native YCrCb domain at the original sampling level (4:1:1 or 4:2:0). It doesn't even bother to convert the blocks to their spatial locations in the frame.
FWIW, 4:1:1 DV is a bitch to program compared to 4:2:0 due to the "tetris" shaped segments. It adds complexity to algorithms. Getting our letterboxing function to work on 4:1:1 interlaced material in the DCT domain was tedious. 4:2:0 was trivial(ish). All because 720 pixels wide != exact multiple of 32 pixels (the width of a 4:1:1 DV macroblock).
|
|
edDV Member
Joined: 06 Mar 2004 Location: Northern California, USA
|
|
| jagabo wrote: |
| edDV wrote: |
| 4:1:1 has less generational loss than 4:2:0 which requires a spatial chroma interpolation each time it is recoded. |
Why would 4:2:0 require interpolation? For three successive chroma samples A, B and C:
4:1:1 -> 4:4:4
A A A A B B B B C C C C
4:2:0 -> 4:4:4
A A B B C C
A A B B C C
In fact, as far as I can tell, most decoders and colorspace converters point resize when converting YUV 4:2:0 to 4:4:4 (YUV or RGB). |
Back from holiday.
I was referring to the old 1998-2000 DV 4:1:1 vs 4:2:0 tests conducted with the original DV equipment by Adam Wilt. He concludes 4:2:2 and 4:1:1 require less generational filtering.
http://www.adamwilt.com/DV-FAQ-tech.html#colorSampling
| Wilt wrote: |
"So where does 4:2:0 (PAL DV, DVD, main-profile MPEG-2) fit in? 4 x Y, 2 x Cr, and 0 x Cb? Fortunately not! 4:2:0 is the non-intuitive notation for half-luma-rate sampling of color in both the horizontal and vertical dimensions. Chroma is sampled 360 times per line, but only on every other line of each field. The theory here is that by evenly subsampling chroma in both H and V dimensions, you get a better image than the seemingly unbalanced 4:1:1, where the vertical color resolution appears to be four times the horizontal color resolution. Alas, it ain't so: while 4:2:0 works well with PAL and SECAM color encoding and broadcasting, interlace already diminishes vertical resolution, and the heavy filtering needed to properly process 4:2:0 images causes noticeable losses; as a result, multigeneration work in 4:2:0 is much more subject to visible degradation than multigeneration work in 4:1:1.
|
He goes on to say that PAL DV 4:2:0 Cb and Cr are supposed to be alternately co-sited with every other vertical scan line but that MPeg2 4:2:0 (NTSC and PAL) samples are point interleaved between scan lines (or vertically smeared across to two lines).
| Wilt wrote: |
"But wait, there's more!" In US implementations of 4:2:0, the color samples are supposed to be vertically interleaved with luma, whereas in European 4:2:0 they're supposed to be co-sited. Practically speaking, this is a headache for developers of codecs, encoders, and DVEs, but for DV purposes it's not especially exciting, since only European DV is 4:2:0." |
Panasonic made a big deal out of this back when PAL 4:1:1 DVCPro was introduced in 1999 claiming 4:1:1 has adequate horizontal resolution and better generational capability.
This speaks to broadcast news workflows where repeated dubs, microwave/sat hops and cut edits are required as the signal moves through the process.
Prosumer NLE workflow usually is about first generation DV import to YCbCr (4:2:2) or RGB 4:4:4 native editors. In that application dub generations are less important. Quality depends on the decode and color space conversion provided by the codec in question. For NTSC DV, this requires horizontal linear interpolation of chroma samples over 4 sample pixels. Vertical is OK as is. For PAL, this is done over two horizontal pixels but first, the Cb and Cr pixels need to be vertically interpolated since Cb and Cr are recorded to different fields. The interpolation technique used for PAL DV is different than that used for MPeg2.
DV to 4:2:2 and DV to RGB codecs may have improved since 2000 but the issues are well defined in the Wilt FAQ including chroma key filtering and upconversion to HD.
_________________ Recommends: Kiva.org - Loans that change lives.
http://www.kiva.org/about
|
|
JohnnyMalaria Member
Joined: 29 May 2006 Location: United States
|
|
| Wilt wrote: |
| "But wait, there's more!" In US implementations of 4:2:0, the color samples are supposed to be vertically interleaved with luma, whereas in European 4:2:0 they're supposed to be co-sited. Practically speaking, this is a headache for developers of codecs, encoders, and DVEs, but for DV purposes it's not especially exciting, since only European DV is 4:2:0." |
Surely he didn't mean that. I mean, a separate PAL sampling for Europe and everywhere else? PAL DV is PAL DV. And it is used on a very large part of the planet. Dimissing it as some European curiosity is dumb and, frankly, surprising for Wilt.
Obviously, the sampling has to be cosited others you will be gathering all your chroma information from one frame and discarding it from the next. It seems a little odd to me that the 4:2:0 sampling scheme for DVD doesn't do that.
Wilt states that the cosited (shortsighted to some) sampling is a programming pain. I can state categorically that the 4:1:1 DV scheme is a b!tch to deal with compared to 4:2:0. The segments of macroblocks are an odd shape and make handling the rightmost blocks in the image more complicated.
Of course, the whole sampling issue is moot if you stay in the appropriate Y'Cr'Cb' domain and display the video on a system that can do the interpolation for you (like most graphics cards). Converting to a full RGB image is wholly unnecessary. Everything can be done in the Y'Cr'Cb' domain, including color correction etc.
_________________ John Miller
enosoft - high performance tools for music and video
Home of the Enosoft DV Processor - Free for personal use!
|
|
edDV Member
Joined: 06 Mar 2004 Location: Northern California, USA
|
|
| JohnnyMalaria wrote: |
| Wilt wrote: |
| "But wait, there's more!" In US implementations of 4:2:0, the color samples are supposed to be vertically interleaved with luma, whereas in European 4:2:0 they're supposed to be co-sited. Practically speaking, this is a headache for developers of codecs, encoders, and DVEs, but for DV purposes it's not especially exciting, since only European DV is 4:2:0." |
Surely he didn't mean that. I mean, a separate PAL sampling for Europe and everywhere else? PAL DV is PAL DV. And it is used on a very large part of the planet. Dimissing it as some European curiosity is dumb and, frankly, surprising for Wilt.
Obviously, the sampling has to be cosited others you will be gathering all your chroma information from one frame and discarding it from the next. It seems a little odd to me that the 4:2:0 sampling scheme for DVD doesn't do that.
Wilt states that the cosited (shortsighted to some) sampling is a programming pain. I can state categorically that the 4:1:1 DV scheme is a b!tch to deal with compared to 4:2:0. The segments of macroblocks are an odd shape and make handling the rightmost blocks in the image more complicated.
Of course, the whole sampling issue is moot if you stay in the appropriate Y'Cr'Cb' domain and display the video on a system that can do the interpolation for you (like most graphics cards). Converting to a full RGB image is wholly unnecessary. Everything can be done in the Y'Cr'Cb' domain, including color correction etc. |
I think he meant to say PAL DV rather than European DV. Things were moving fast in the 1998-2000 early DV days and there was a great war going on between Sony DVCAM and Panasonic DVCPro as the Betacam SP replacement. It was the BBC and EBU that led the PAL side. The BBC was heavy in the DVCPro camp for news and influenced Panasonic to go 4:1:1 to better fit their workflow.
Computer DV codecs were mostly hardware (on i/o cards) at first. This was in the days of Premiere 4.2 to version 5. Premiere 5.0 was the first version to incorporate a software DV codec. All processing then was RGB. I think Avid was the first PC based NLE with a YCbCr processing path. High end hardware based 4:2:2 equipment had been YCbCr since the mid 80's.
_________________ Recommends: Kiva.org - Loans that change lives.
http://www.kiva.org/about
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|