Announcement

Collapse
No announcement yet.

DVD and DV colorspace

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DVD and DV colorspace

    Correct me if I'm wrong, but NTSC DVD colorspace is 4:2:0, right? NTSC DV colorspace is 4:1:1.

    I've always heard/read that transcoding from DV to MPEG-2 for DVD destoys colorspace resolution.

    Now it seems to me that 4:1:1 upon conversion to 4:2:0 would effectively be crippled further to 4:1:0, or 1 color sample roughly every 8 pixels? Is this right?

    One nice thing about HDV is that the shooting format and final format, whether it is WMV or MPEG-2, will both be 4:2:0, for a 1:1 colorspace conversion.

    Also, I've heard that HDV GOP is 15 frames long. Can anyone point me to a typical HDV GOP sequence?

    - Mark
    - Mark

    Core 2 Duo E6400 o/c 3.2GHz - Asus P5B Deluxe - 2048MB Corsair Twinx 6400C4 - ATI AIW X1900 - Seagate 7200.10 SATA 320GB primary - Western Digital SE16 SATA 320GB secondary - Samsung SATA Lightscribe DVD/CDRW- Midiland 4100 Speakers - Presonus Firepod - Dell FP2001 20" LCD - Windows XP Home

  • #2
    Last things first;

    The Main Profile @ Main Level MPEG-2 encoding schemes we typically use most often is a 15 GOP. This means just 2 I-Frames per second.

    HDV encoding uses a 6 GOP. This means it has 5 I-frames per second. It also uses the higher quality High1440 profile made for HD content. These combine to give it a higher quality than the MP @ ML 15 GOP schemes.

    DVD's 4:2:0 is more akin to 4:2:2 in that it's 2 luma samples wide instead of 4:1:1's 4 sample wide, meaning it has a higher quality than NTSC DV.

    PAL DV on the other hand already uses a 4:2:0 scheme, though using a slightly different map.

    Here are some colorspace maps to help you visualize the differences.

    Y = luma sample
    Cr = chroma red
    Cb = chroma blue

    Chroma green is calculated from the other three.

    4:1:1 (NTSC DV)



    4:2:0 (PAL DV and MPEG-1)



    4:2:0 (MPEG-2/DVD)



    4:2:2 (CCIR/ITU broadcast)



    4:4:4 (Studio)



    Dr. Mordrid
    Last edited by Dr Mordrid; 17 November 2004, 15:52.
    Dr. Mordrid
    ----------------------------
    An elephant is a mouse built to government specifications.

    I carry a gun because I can't throw a rock 1,250 fps

    Comment


    • #3
      Thanks Doc.

      I thought HDV was long GOP? Huh.

      This is probably a dumb question, but I don't understand the difference between the two 4:2:0 formats. I see the luma is sampled in squares of 4 pixels, but I thought the chroma was sampled for the entire 4 pixel subgroup? What is that chroma sample in the middle of the first 4:2:0 and at the left of the second one?

      If there is a link to those figures I would love to see the article.

      Also, when you lay two 4:1:1 sampling blocks on two 4:2:0 then the 4:1:1 would have to be averaged for each 4:2:0 chroma samples, right? That's why NTSC DV>DVD is bad for colorspace.

      -Mark
      - Mark

      Core 2 Duo E6400 o/c 3.2GHz - Asus P5B Deluxe - 2048MB Corsair Twinx 6400C4 - ATI AIW X1900 - Seagate 7200.10 SATA 320GB primary - Western Digital SE16 SATA 320GB secondary - Samsung SATA Lightscribe DVD/CDRW- Midiland 4100 Speakers - Presonus Firepod - Dell FP2001 20" LCD - Windows XP Home

      Comment


      • #4
        The combination of HDV's short 6 GOP and the High1440 profile is what makes it editable. The Main and Low profiles with a long GOP are intended for distribution.

        Look at the 4:2:0 blocksets as being comprised of 3 rows and 3 columns, not as 2 rows with the Cr,Cb sample placed oddly.

        Each of the Y (luma) samples are located at every other sample position in both the horizontal and vertical directions; four samples each on one corner of the 3x3 blockset.

        The position of the Cr, Cb (chroma) sample can be either in the 1st or 2nd column in row 2.

        Of course this means that the 4:2:0 formats also sample colors only every other vertical pixel, but this doesn't do as much damage to quality as sampling every 4th pixel by any stretch.

        The difference comes down to this horizontally;

        4:4:4: 720 color samples

        4:2:2: 320 color samples

        4:2:0: 240 color samples

        4:1:1: 160 color samples

        The low color resolution horizontally of 4:1:1 causes each color sample to be smeared across all 4 of its pixels. This causes a nightmare when keying or doing many key types because of the overlay colors bleeding into the background. Yecch....

        Sampling colors every other pixel, be it horizontally or vertically, is much more forgiving when keying.

        Dr. Mordrid
        Last edited by Dr Mordrid; 17 November 2004, 21:37.
        Dr. Mordrid
        ----------------------------
        An elephant is a mouse built to government specifications.

        I carry a gun because I can't throw a rock 1,250 fps

        Comment


        • #5
          Sorry, Doc, you don't have it quite right for PAL 4.2.0 DV 576i

          I won't try to do it graphically (nice but time consuming) but, because PAL has Phase Alternating Lines, it is more complicated, as it is approached separately from upper field to lower field:

          UPPER Field:
          Line 1 and all odd lines:
          Cr+Y -- Y -- Cr+Y -- Y...
          Line 2 and all even lines:
          Cb+Y -- Y -- Cb+Y --Y...

          LOWER Field:
          Line (1) and all (odd) lines:
          Cr+Y -- Y -- Cr+Y -- Y...
          Line (2) and all (even) lines:
          Cb+Y -- Y -- Cb+Y --Y...

          This means that all the lines have partial chroma information and not just alternate lines having the full chroma data.

          I believe that this gives superior colour rendering, almost approaching that of 4.2.2. Of course, this technique is not possible with 480i, because NTSC does not do the phase alternation of the chroma signal and it would cause more colour fringeing artefacts.
          Brian (the devil incarnate)

          Comment


          • #6
            Damned Europeans, always trying to do things bass ackwards

            These blockmaps are drawn for how the video is processed and not for how its displayed on an interlaced TV. They maintain these characteristics when shown on a progressive scan display, but as you noted not on PAL/SECAM because of the phase shifting.

            Here's how it looks when mapped to them;



            Dr. Mordrid
            Last edited by Dr Mordrid; 18 November 2004, 09:23.
            Dr. Mordrid
            ----------------------------
            An elephant is a mouse built to government specifications.

            I carry a gun because I can't throw a rock 1,250 fps

            Comment


            • #7
              Called arsey-warsey here

              Edit: reply to your original post, before you edited it
              Last edited by Brian Ellis; 18 November 2004, 09:38.
              Brian (the devil incarnate)

              Comment


              • #8
                Yes, but as far as I'm aware, the 4.2.0 co-sited sampling is only used for DV and DVCAM and not for 576i MPEG-2, MPEG-4 Part 2 or H.264. With these, the CbCr sample is calculated with a bias towards the upper line Y sample on one field and towards the lower line on the other field. Another clever astuce to appear to increase the colour resolution!

                The 4.1.1 sampling you illustrated for NTSC is, of course, also co-sited. In fact all DV formats use co-siting. I should perhaps state that 4:2:2 and 4:4:4 MPEG-2 and MPEG-4 used for non-DVD apps are also co-sited.

                Edit: the bias I talk about is shown on your diagram which you edited in after I wrote this!
                Last edited by Brian Ellis; 18 November 2004, 09:42.
                Brian (the devil incarnate)

                Comment


                • #9
                  I understand the diagrams, but when viewing 4:2:0 sampling, if you look at a group of 4 pixels, don't all four have discrete luma values and the same chroma values. That 5th sampling point, or the chroma sampling point location determines the chroma value for that group of pixels, right? Is this what "co-siting" is?

                  That's where I get a little confused. I would think that after sampling the four points, the average chroma value would be used for each of the four, while the luma would be retained for each sample.

                  I'm talking only about progressive to simplfy the discussion.

                  Finally, if you shoot HDV, upon downconverting to SD, it would be possible to have a 4:2:2 colorspace, right? This means that HDV could be very useful RIGHT NOW for broadcast applications just due to it's increased colorspace resolution. Of course that advantage is lost when going to DVD, but giving the MPEG-2 compressor all that extra data can only make for better SD compressed product.

                  - Mark
                  - Mark

                  Core 2 Duo E6400 o/c 3.2GHz - Asus P5B Deluxe - 2048MB Corsair Twinx 6400C4 - ATI AIW X1900 - Seagate 7200.10 SATA 320GB primary - Western Digital SE16 SATA 320GB secondary - Samsung SATA Lightscribe DVD/CDRW- Midiland 4100 Speakers - Presonus Firepod - Dell FP2001 20" LCD - Windows XP Home

                  Comment


                  • #10
                    Co-siting is where the CbCr sampling is calculated from a single Y sample. Otherwise, it is calculated from an average of two or four Y samples. In the case of the diagram for MPEG-2 sampling that Doc showed above, the average is weighted to the line above or below.

                    There are advantages and disadvantages of co-siting.

                    Of course, when the image is reproduced on a screen or when en-/trans-coding, the "colour-blank" pixels assume the colour of the nearest calculated CbCr pixel, otherwise the colours would appear totally washed out. This is why fringeing will occur on keyed frames.

                    I don't believe your surmise about broadcast applications is quite right, as these are generally using a 4:4:4 colour space, even in MPEG-2. This is converted to 4:2:2 at the last stage for DBV (satellite or land). This is because editing quality in 4:2:2 is unsatisfactory for their needs. I see your point though about 4:1:1 being downconvertible to a better colour space at 960 lines or above (NTSC), but I don't know whether any conversion software would actually do that.
                    Brian (the devil incarnate)

                    Comment


                    • #11
                      Brian;

                      I clearly labeled that 4:2:2 is the coding used for CCIR/ITU Broadcast, meaning over the air, and that 4:4:4 was used in the Studio.

                      What's wrong about that????

                      The RT.X100, RT.X10 and RT-2000 drivers upsample DV's 4:1:1 NTSC/4:2:0 PAL to 4:4:4:4 RGBA on the timeline and for internal processing & compositing

                      The RT-2000/2500 also upsamples MPEG-2's 4:2:0 to 4:4:4:4 RGBA on the timeline.

                      The extra "4" and the "A" are for the realtime alpha channel.

                      VEGAS (and others) upsample to 4:4:4 when doing overlays, keys and some other processes.

                      Most of the upscale editors and hardware do likewise.

                      Dr. Mordrid
                      Last edited by Dr Mordrid; 19 November 2004, 07:34.
                      Dr. Mordrid
                      ----------------------------
                      An elephant is a mouse built to government specifications.

                      I carry a gun because I can't throw a rock 1,250 fps

                      Comment


                      • #12
                        Lots of good info here guys, thanks.

                        Brian,

                        If you decompressed an HDV stream to raw, and then re-encoded to MPEG-2 4:2:2: I would think that the encoder would be smart enough to use all of the available spacial data? Especially if you select 4:2:2 in the encoder options.

                        Of course the only way to confirm would be to test...

                        The reason I bring this up is because I've seen HDV played back on SD television screens and it looks better to me than DV, even when comparing with really good DV cams. I'm wondering if during downconverting in the camera, the available colorspace information is being used. As you know, there is a discernable difference between 4:2:0 and 4:2:2. It's not night and day on all scenes, but one just looks "better" to me.

                        - Mark
                        - Mark

                        Core 2 Duo E6400 o/c 3.2GHz - Asus P5B Deluxe - 2048MB Corsair Twinx 6400C4 - ATI AIW X1900 - Seagate 7200.10 SATA 320GB primary - Western Digital SE16 SATA 320GB secondary - Samsung SATA Lightscribe DVD/CDRW- Midiland 4100 Speakers - Presonus Firepod - Dell FP2001 20" LCD - Windows XP Home

                        Comment

                        Working...
                        X