zambelli
14th November 2006, 11:39
There's been a lot of talk about DV decoder differences in this forum, but I don't recall ever seeing a comparison of DV encoders, so I thought I'd start one.
Intro:
Unlike high efficiency interframe/interfield codecs such as MPEG-2, MPEG-4, VC-1, VP6, and others, standard def DV is a codec that works at a fixed bitrate (25Mbps in its MiniDV variant, aka DV25 or DVSD) and uses only intraframe/intrafield compression - I frames only. It's the most commonly used codec in video editing, which puts a high requirement on its ability to recompress the same video over and over again without noticable image degradation. While evaluating other codecs is often subject to personal opinion, evaluating DV codecs is much easier. Quite simply, a DV encoder needs to retain as much information as possible from the source video. This is easily quantifiable with a standard signal-to-noise metric such as PSNR.
DV25 exists in 2 major flavors: NTSC 720x480 29.97fps, and PAL 720x576 25fps. The former uses a 4:1:1 chroma sampling, while the latter uses a more common 4:2:0 chroma sampling. Although the DV standard defines different DCT modes for frame (progressive) vs field (interlaced) encoding, it does not define when the different modes should be used. In other words, although DV is commonly used for interlaced encoding, it is capable of encoding both progressive and interlaced content using different DCT modes at the encoder's discretion.
Sources:
In order to conduct this test, I chose a few DV videos from my own DV cameras (I have both NTSC and PAL), loaded them into Avisynth using the Cedocida decoder in YUY2 mode (I'll explain that later) and edited series of frames together into a collage that's IMHO representative of average DV footage. I then used TDeint Avisynth plugin to deinterlace both videos into progressive footage too. This produced four source videos:
DV_NTSC_Interlaced.avi (http://www.citizeninsomniac.com/video/DV_NTSC_Interlaced.avi) (35.6 MB)
DV_NTSC_Progressive.avi (http://www.citizeninsomniac.com/video/DV_NTSC_Progressive.avi) (35.4 MB)
DV_PAL_Interlaced.avi (http://www.citizeninsomniac.com/video/DV_PAL_Interlaced.avi) (47.9 MB)
DV_PAL_Progressive.avi (http://www.citizeninsomniac.com/video/DV_PAL_Progressive.avi) (47.8 MB)
Each video is encoded losslessly with HuffYUV (4cc: HFYU) in YUY2 mode. Length: 150 frames.
Why did I encode the sources as YUY2 (4:2:2) if DV is 4:2:0/4:1:1? Most software DV codecs use YUY2 as their preferred input/output format. The reason behind this is practical: in 12-bit YUV chroma mapping differs between MPEG-2 and DV, 4:2:0 and 4:1:1, progressive and interlaced, and the mapping is entirely ambiguous - there's no way for a downstream compontent to know the chroma placement coming from a DV decoder if the ouput is generic YV12. YUY2 (YUV 4:2:2) doesn't have this problem, therefore making it suitable for implementing software DV codecs without any need for user interaction. Even though Cedocida supports YV12 input/output, it is one of the few codecs that does - and this really only works for PAL. The rest mostly work in YUY2, and some even accept RGB24 only.
The Challenge
The goal of this comparison is to take each one of those source videos and encode it to DV25 using any DV encoder you might have available, then compare it to the source and calculate the PSNR. Simple! :)
The first step is encoding. Most DV codecs come in VfW flavor, making it easy to encode with VirtualDub. This also eliminates the need for any unnecessary colorspace conversion, such as the ones introduced by Adobe Premiere, for example.
In VirtualDub, the encoding would look something like this:
1. File --> Open Video File...
2. Open the source video (i.e. DV_NTSC_Interlaced.avi)
3. Audio --> No Audio
4. Video --> Fast Recompress
5. Video --> Compression...
6. Choose your DV codec (i.e. Cedocida DV codec)
7. File --> Save as AVI...
If you want to use another method (i.e. GraphEdit, NLE app, etc.), go ahead - but please note this in your post.
Do not remap luma range! The luma range on the source clips is already clamped to 16..235, so please don't compress, expand or re-clamp it in any way!
Please encode all 4 videos - PAL progressive + interlaced, NTSC progressive + interlaced.
When you're done, upload the videos to my server. They should be about 15MB each, which isn't too difficult to upload.
FTP: ftp://ftp.citizeninsomniac.com
Username: dv@citizeninsomniac.com
Password: doom9
Last step - post a message here and let me know that you've submitted new videos, and document your process. Include the name of the encoder, its version number and type (VfW, DirectShow, QuickTime, etc.). Note any special encoder options used.
The Results:
To start this comparison, I compared Cedocida DV v0.1.6 and MainConcept DV v2.4.3. I tested only the Normal Quality encoding mode of Cedocida due to reported problems with High Quality mode. I made an exception to my rule - I also tried the YV12 input/output mode, as it's somewhat exclusive to Cedocida.
These are the latest results:
|-----------------------------------------------------------------------------------------|
| | Ovrl PSNR | Min PSNR | Max PSNR | Notes |
| NTSC Interlaced: |
|-----------------------------------------------------------------------------------------|
| Cedocida v0.1.6 (VfW) | 49.3498 | 43.7395 | 55.0623 | YUY2, normal quality |
| MainConcept v2.4.3 (VfW) | 45.4076 | 39.2093 | 48.3694 | YUY2, "Fastest" OFF |
| Microsoft v6.05.2600 (DShow)| 46.5425 | 41.5732 | 51.3981 | RGB24, NTSC |
| | | | | |
| NTSC Progressive: |
|-----------------------------------------------------------------------------------------|
| Cedocida v0.1.6 (VfW) | 49.8454 | 45.3902 | 53.4945 | YUY2, normal quality |
| MainConcept v2.4.3 (VfW) | 46.7379 | 42.2356 | 48.6946 | YUY2, "Fastest" OFF |
| Microsoft v6.05.2600 (DShow)| 46.9914 | 42.0759 | 51.0454 | RGB24, NTSC |
| | | | | |
| PAL Interlaced: |
|-----------------------------------------------------------------------------------------|
| Cedocida v0.1.6 (VfW) | 46.1306 | 40.3453 | 54.7958 | YUY2, normal quality |
| Cedocida v0.1.6 (VfW) | 45.6650 | 40.1155 | 54.0237 | YV12 MPEG int, normal|
| MainConcept v2.4.3 (VfW) | 41.2780 | 35.4578 | 48.5933 | YUY2, "Fastest" OFF |
| Microsoft v6.05.2600 (DShow)| 38.9603 | 32.8893 | 52.4871 | RGB24, PAL |
| | | | | |
| PAL Progressive: |
|-----------------------------------------------------------------------------------------|
| Cedocida v0.1.6 (VfW) | 46.8568 | 41.5192 | 54.0270 | YUY2, normal quality |
| Cedocida v0.1.6 (VfW) | 46.9538 | 41.5436 | 53.9991 | YV12 MPEG prg, normal|
| MainConcept v2.4.3 (VfW) | 43.6773 | 38.2602 | 48.4947 | YUY2, "Fastest" OFF |
| Microsoft v6.05.2600 (DShow)| 39.6478 | 33.6012 | 51.9862 | RGB24, PAL |
| | | | | |
|-----------------------------------------------------------------------------------------|
Current winner: Cedocida v0.1.6
OK. Your turn. :)
Intro:
Unlike high efficiency interframe/interfield codecs such as MPEG-2, MPEG-4, VC-1, VP6, and others, standard def DV is a codec that works at a fixed bitrate (25Mbps in its MiniDV variant, aka DV25 or DVSD) and uses only intraframe/intrafield compression - I frames only. It's the most commonly used codec in video editing, which puts a high requirement on its ability to recompress the same video over and over again without noticable image degradation. While evaluating other codecs is often subject to personal opinion, evaluating DV codecs is much easier. Quite simply, a DV encoder needs to retain as much information as possible from the source video. This is easily quantifiable with a standard signal-to-noise metric such as PSNR.
DV25 exists in 2 major flavors: NTSC 720x480 29.97fps, and PAL 720x576 25fps. The former uses a 4:1:1 chroma sampling, while the latter uses a more common 4:2:0 chroma sampling. Although the DV standard defines different DCT modes for frame (progressive) vs field (interlaced) encoding, it does not define when the different modes should be used. In other words, although DV is commonly used for interlaced encoding, it is capable of encoding both progressive and interlaced content using different DCT modes at the encoder's discretion.
Sources:
In order to conduct this test, I chose a few DV videos from my own DV cameras (I have both NTSC and PAL), loaded them into Avisynth using the Cedocida decoder in YUY2 mode (I'll explain that later) and edited series of frames together into a collage that's IMHO representative of average DV footage. I then used TDeint Avisynth plugin to deinterlace both videos into progressive footage too. This produced four source videos:
DV_NTSC_Interlaced.avi (http://www.citizeninsomniac.com/video/DV_NTSC_Interlaced.avi) (35.6 MB)
DV_NTSC_Progressive.avi (http://www.citizeninsomniac.com/video/DV_NTSC_Progressive.avi) (35.4 MB)
DV_PAL_Interlaced.avi (http://www.citizeninsomniac.com/video/DV_PAL_Interlaced.avi) (47.9 MB)
DV_PAL_Progressive.avi (http://www.citizeninsomniac.com/video/DV_PAL_Progressive.avi) (47.8 MB)
Each video is encoded losslessly with HuffYUV (4cc: HFYU) in YUY2 mode. Length: 150 frames.
Why did I encode the sources as YUY2 (4:2:2) if DV is 4:2:0/4:1:1? Most software DV codecs use YUY2 as their preferred input/output format. The reason behind this is practical: in 12-bit YUV chroma mapping differs between MPEG-2 and DV, 4:2:0 and 4:1:1, progressive and interlaced, and the mapping is entirely ambiguous - there's no way for a downstream compontent to know the chroma placement coming from a DV decoder if the ouput is generic YV12. YUY2 (YUV 4:2:2) doesn't have this problem, therefore making it suitable for implementing software DV codecs without any need for user interaction. Even though Cedocida supports YV12 input/output, it is one of the few codecs that does - and this really only works for PAL. The rest mostly work in YUY2, and some even accept RGB24 only.
The Challenge
The goal of this comparison is to take each one of those source videos and encode it to DV25 using any DV encoder you might have available, then compare it to the source and calculate the PSNR. Simple! :)
The first step is encoding. Most DV codecs come in VfW flavor, making it easy to encode with VirtualDub. This also eliminates the need for any unnecessary colorspace conversion, such as the ones introduced by Adobe Premiere, for example.
In VirtualDub, the encoding would look something like this:
1. File --> Open Video File...
2. Open the source video (i.e. DV_NTSC_Interlaced.avi)
3. Audio --> No Audio
4. Video --> Fast Recompress
5. Video --> Compression...
6. Choose your DV codec (i.e. Cedocida DV codec)
7. File --> Save as AVI...
If you want to use another method (i.e. GraphEdit, NLE app, etc.), go ahead - but please note this in your post.
Do not remap luma range! The luma range on the source clips is already clamped to 16..235, so please don't compress, expand or re-clamp it in any way!
Please encode all 4 videos - PAL progressive + interlaced, NTSC progressive + interlaced.
When you're done, upload the videos to my server. They should be about 15MB each, which isn't too difficult to upload.
FTP: ftp://ftp.citizeninsomniac.com
Username: dv@citizeninsomniac.com
Password: doom9
Last step - post a message here and let me know that you've submitted new videos, and document your process. Include the name of the encoder, its version number and type (VfW, DirectShow, QuickTime, etc.). Note any special encoder options used.
The Results:
To start this comparison, I compared Cedocida DV v0.1.6 and MainConcept DV v2.4.3. I tested only the Normal Quality encoding mode of Cedocida due to reported problems with High Quality mode. I made an exception to my rule - I also tried the YV12 input/output mode, as it's somewhat exclusive to Cedocida.
These are the latest results:
|-----------------------------------------------------------------------------------------|
| | Ovrl PSNR | Min PSNR | Max PSNR | Notes |
| NTSC Interlaced: |
|-----------------------------------------------------------------------------------------|
| Cedocida v0.1.6 (VfW) | 49.3498 | 43.7395 | 55.0623 | YUY2, normal quality |
| MainConcept v2.4.3 (VfW) | 45.4076 | 39.2093 | 48.3694 | YUY2, "Fastest" OFF |
| Microsoft v6.05.2600 (DShow)| 46.5425 | 41.5732 | 51.3981 | RGB24, NTSC |
| | | | | |
| NTSC Progressive: |
|-----------------------------------------------------------------------------------------|
| Cedocida v0.1.6 (VfW) | 49.8454 | 45.3902 | 53.4945 | YUY2, normal quality |
| MainConcept v2.4.3 (VfW) | 46.7379 | 42.2356 | 48.6946 | YUY2, "Fastest" OFF |
| Microsoft v6.05.2600 (DShow)| 46.9914 | 42.0759 | 51.0454 | RGB24, NTSC |
| | | | | |
| PAL Interlaced: |
|-----------------------------------------------------------------------------------------|
| Cedocida v0.1.6 (VfW) | 46.1306 | 40.3453 | 54.7958 | YUY2, normal quality |
| Cedocida v0.1.6 (VfW) | 45.6650 | 40.1155 | 54.0237 | YV12 MPEG int, normal|
| MainConcept v2.4.3 (VfW) | 41.2780 | 35.4578 | 48.5933 | YUY2, "Fastest" OFF |
| Microsoft v6.05.2600 (DShow)| 38.9603 | 32.8893 | 52.4871 | RGB24, PAL |
| | | | | |
| PAL Progressive: |
|-----------------------------------------------------------------------------------------|
| Cedocida v0.1.6 (VfW) | 46.8568 | 41.5192 | 54.0270 | YUY2, normal quality |
| Cedocida v0.1.6 (VfW) | 46.9538 | 41.5436 | 53.9991 | YV12 MPEG prg, normal|
| MainConcept v2.4.3 (VfW) | 43.6773 | 38.2602 | 48.4947 | YUY2, "Fastest" OFF |
| Microsoft v6.05.2600 (DShow)| 39.6478 | 33.6012 | 51.9862 | RGB24, PAL |
| | | | | |
|-----------------------------------------------------------------------------------------|
Current winner: Cedocida v0.1.6
OK. Your turn. :)