Log in

View Full Version : Does the quality differ with implementation for these codecs?


ChiDragon
12th May 2013, 05:38
Asked differently: are all compressors (encoders) for each of these DCT-based formats created equal?


JPEG
MJPEG
DV
DigiBeta


Or do they just have to create a valid bitstream by any means possible, like the MPEG formats? If none of them have to produce equal quality to be a valid encoder, is there any image compression format designed that way?

TheSkiller
12th May 2013, 14:19
DV and DigiBeta (Digital Betacam) compress the video to a fixed bitrate (25 Mbit/s for DV and 90 Mbit/s for DigiBeta), hence the level of compression applied to a frame depends on the complexibility of the given image.

MotionJPEG is not fixed to a specific bitrate, it compresses as much as needed to archive the quality the user requests, much like JPEG, except that JPEG is used for still images.

Are all the compression schemes of these formats created equal? Pretty much, but there are some differences that need to be considered. For example DV stores 4:2:0 chroma and uses a bit-depth of 8 bits, while DigiBeta stores 4:2:2 chroma at 10 bits.

To say it differently, you cannot mix then together even though their inherit compression scheme is the same.

poisondeathray
12th May 2013, 15:48
for example dv stores 4:2:0 chroma and uses a bit-depth of 8 bits

pal dv => 4:2:0
ntsc dv => 4:1:1

ChiDragon
13th May 2013, 08:10
So if I compress a JPEG with quality 85 in Photoshop or in some other software, the bitstream is the same?

TheSkiller
15th May 2013, 14:56
No it's not because they all use different headers and the way the bits are packed together differs. It's just the core, the DCT-based compression algorithm, that is the same for all.

ChiDragon
15th May 2013, 18:06
How about this then: the decompressed result is identical?

J_Darnley
15th May 2013, 23:30
Not always. I think H.264 was the first standardised video format to specify an exact transform, meaning that any decoder decoding a bitstream will produce the same output as any other decoder (barring bugs, naturally). This means that any format which is not specified to be exact, different implementations may produce different results from the same bitstream. For example: ffdshow and DGDecode have several options of iDCT (inverse discrete cosine transform) to select from. The iDCT should match the one used during the encoding so that reference frames so that errors, differences in the decoding, don't accumulate between keyframes.

Since the formats you mentioned are all intra-only (I think), they don't suffer from this particular issue. They may still have inexact decoding (I don't know) between two decoders but this is usually tiny. It certainly is for the options in DGDecode.

LoRd_MuldeR
17th May 2013, 12:22
Even with an Intra-only compression, there still could be differences between different encoders, because of different quantization matrices (if the format has support for that) and of course because of different quantizers. For example, if DV needs to hit a desired bitrate of 25 MBits/s, it obviously needs some rate-control in the process. That is where different implementations could differ a lot...