Activity › Forums › Panasonic Cameras › Question for Graeme & others concerning DCT compression
-
Question for Graeme & others concerning DCT compression
Posted by Deleted User on July 20, 2005 at 1:22 amMy apologies if this is the wrong forum for this question, but camcorders such as Panasonic’s current & future P2 cameras (and my new Sony DSR-450WSL) tend to have the features I’m asking about, so this seems a good place to ask:
I have a general question about DCT compression: Which camcorder features give DCT the best chance of compressing as cleanly as possible?
Is a “contrasty” image a compression challenge, or only contrasty edges? (Which compresses more easily/cleanly: A B&W checkerboard pattern, or a even field of gray?)
Reducing a camera’s sharpening or detail settings make edges softer/grayer; does this improve in-camera compression results?
Some cameras have DCC features to help control/reduce undesirable contrast. Likewise, shallow depth of field can also be used to soften contrasty foregrounds & backgrounds. Skin detail controls can help reduce unwanted detail in specific colors. Do these techniques usually result in better in-camera compression results?
What about gamma control; can it benefit DCT compression?
Does progressive shooting compress in-camera better than interlaced?
Does a lower framerate, like 24 fps, compress any better in a camcorder which records it in a 60 fps data stream? (I’m not sure if I’ve asked that right … I’m referring to the way, for example, a DVX100a records 24 fps on tape.)
What about color? Does DCT compression “prefer” certain colors? (Can it compress certain colors more easily than others?) Are a camera’s color matrix control useful in this regard?
What other features in modern camcorders help get the most out of DCT?
Thanks in advance,
– Peter
Just a friendly reminder to all: Please consider filling-in your COW user profile information so we have a better idea who you are, where you’re from, and so forth. It’s the friendly thing to do. Thanks!
Toke replied 20 years, 10 months ago 5 Members · 17 Replies -
17 Replies
-
Graeme Nattress
July 20, 2005 at 1:29 amThe biggest factors that wil help DCT are lack of noise and low edge contrast / soft edges. Overall image contrast probably won’t effect things much.
Low noise helps ALL compression types though!
Graeme
– http://www.nattress.com – Film Effects and Standards Conversion for FCP
-
Deleted User
July 20, 2005 at 1:57 am[Graeme Nattress] “The biggest factors that wil help DCT are lack of noise and low edge contrast / soft edges. Overall image contrast probably won’t effect things much. Low noise helps ALL compression types though!”
Thanks, Graeme!
Noise and things which look like noise, such as fog, smoke, and water? Or is only real noise problematic?
All the best,
– Peter
Just a friendly reminder to all: Please consider filling-in your COW user profile information so we have a better idea who you are, where you’re from, and so forth. It’s the friendly thing to do. Thanks!
-
Graeme Nattress
July 20, 2005 at 2:02 amSmoke and water are more of an issue for MPEG2. Noise, as in random fine details are bad for DCT, not for their randomness, but for the fine detail.
Graeme
– http://www.nattress.com – Film Effects and Standards Conversion for FCP
-
Jesse Rosen
July 20, 2005 at 2:04 amIn a DCT-based codec, all brightness information (this happens once for each channel — Y,Cb & Cr) is converted to frequency information through a DCT (Dicreet Cosine Transform). Note that this stage is theoretically lossless, meaning that if the calculations were done with infinite precision, this would be a completely reversible process. The next stage is where the actual loss comes from: the coefficients yielded from the previous step are quantized based on some formula that varies from codec to codec (this is largely what defines the bit rate and quality of a DCT-based codec). Then the quantized coefficients are run-length encoded and entropy encoded (usually a Huffman table) — this last step is also lossless, it is very much like ZIP compression.
As this greatly simplified overview shows, the image loss that occurs is all from quantization in the frequency domain. What this means is that what is lost is spacial detail. Note that this does not necessarily mean that high-frequency detail will be lost — it depends on the design of the codec. But to answer your specific questions to the best of my ability:
[Peter DeCrescenzo] “Which compresses more easily/cleanly: A B&W checkerboard pattern, or a even field of gray?)”
An even field of grey has almost no frequency information, so will compress very cleanly. (Note also that in the DV-based codecs [e.g. DVCAM, DVCPRO/50/HD, HDCAM] “left-over” bandwidth from a low-complexity portion of a frame will get allocated to more complex portions of the frame.)
[Peter DeCrescenzo] “Reducing a camera’s sharpening or detail settings make edges softer/grayer; does this improve in-camera compression results?
Some cameras have DCC features to help control/reduce undesirable contrast. Likewise, shallow depth of field can also be used to soften contrasty foregrounds & backgrounds. Skin detail controls can help reduce unwanted detail in specific colors. Do these techniques usually result in better in-camera compression results?”
In general anything that reduces image complexity will improve compression. As to whether reducing a camera’s sharpening helps, I doubt it since detail enhancement doesn’t actually add information. Also, I don’t think that gamma controls (including knee, DCC, master gamma, black stretch, etc.) will have much effect either except insofar as they may preserve detail that would otherwise have been lost. (Note that many of these codecs are proprietary, however, so I can’t say with certainty that something else is not going on in there that might tilt things more towards one part of the image or another.)
[Peter DeCrescenzo] “Does progressive shooting compress in-camera better than interlaced?”
Yes, which is why many interlaced formats are more sub-sampled than their progressive counterparts (DVCPROHD in 1080i/60 by 33% versus 25% in 720P/60). Since a whole frame is compressed as a unit, interlacing serves to increase the frame complexity which decreases the efficiency of the codec.
[Peter DeCrescenzo] “What about color? Does DCT compression “prefer” certain colors? (Can it compress certain colors more easily than others?) Are a camera’s color matrix control useful in this regard?”
No.
[Peter DeCrescenzo] “What other features in modern camcorders help get the most out of DCT?”
Nothing I can think of that wouldn’t also effect the image quality. e.g. Smear the front of your lens with Vaseline and you’ll have far fewer compression artifacts, but you may not like the resulting picture too much!
—
Jesse Rosen
Director of Technical Development
Abel Cine Tech, Inc. -
Deleted User
July 20, 2005 at 3:02 amThanks for such a detailed reply, Jesse; gives me lots to think about.
So, for example, one might use a lighting technique to cast a detailed, but undesirable area of the frame into deep shadow to “free up” the cam’s DCT compression to yield better quality in other, more important parts of the image.
I now realize my question about framerate (24 fps vs. 30 fps) was off-base: When in 24 fps mode, cams like the DVX100a (and probably my new DSR-450WSL) repeat some frames to record 30 fps on tape, so there’s no extra compression work required to achieve this. The cam’s processor only does the work of compressing the 24 frames and only repeats, not compresses, the other 6, correct?
Thanks again!
– Peter
Just a friendly reminder to all: Please consider filling-in your COW user profile information so we have a better idea who you are, where you’re from, and so forth. It’s the friendly thing to do. Thanks!
-
Deleted User
July 20, 2005 at 3:09 am[Peter DeCrescenzo] “… I now realize my question about framerate (24 fps vs. 30 fps) was off-base: When in 24 fps mode, cams like the DVX100a (and probably my new DSR-450WSL) repeat some frames to record 30 fps on tape, so there’s no extra compression work required to achieve this. The cam’s processor only does the work of compressing the 24 frames and only repeats, not compresses, the other 6, correct?”
Oh, but wait: Does this mean the cam’s processor has more _time_ to better/more accurately compress 24 frames compared to when it has to compress 30 fps? I understand the recording datarate to tape doesn’t change, but are 24 fps frames given more processing time compared to 30 fps frames? (Or does this depend on the cam model?) Does 20% more in-camera processing time per frame necessarily equate to better-looking video?
– Peter
Just a friendly reminder to all: Please consider filling-in your COW user profile information so we have a better idea who you are, where you’re from, and so forth. It’s the friendly thing to do. Thanks!
-
Barry Green
July 20, 2005 at 3:52 amYour question about 24 or 30, and repeating frames etc., depends on the type of compression scheme used.
DV, for example, is always always always 29.97fps (or 25fps for PAL) and it doesn’t matter whether you are recording 24 within 29.97 — it always has to compress all 29.97fps.
Same with DVCPRO-HD in 1080i.
In 720p, DVCPRO-HD encodes each frame individually, regardless of frame rate — so slower frame rates take up less space.
All those compression schemes (including Digital Betacam, DVCPRO50, MPEG-IMX, etc) are all frame-discrete, and what happens in one frame has no effect on another frame.
With long-GOP MPEG-2, (such as BetaSX or HDV), what happens in one frame has a direct relationship with what happens in other frames. Those compression schemes don’t encode each frame discretely, instead they encode the changes between frames. That can lead to much more efficient compression, as well as to disastrous dropouts (but dropouts are rare).
So, JVC records 720/30p in HDV at 19 megabits. But for 24p, it would seem that they would get more efficient compression — fewer frames in the same bitrate. However, apparently (and this is not 100% confirmed, but I think it’s 90% confirmed) JVC’s 24p is actually recorded as a 60p data stream, with lots of duplicate frames (obviously 36 of the 60 frames are just duplicates). MPEG-2 can be quite efficient on duplicate frames, so it’s possible that HDV will get complete efficiency on many/most of those duplicate frames. But with a GOP of 6, and the frame repeat pattern running at 5 (2:3 frame duplication), it’s unclear whether HDV is getting the most efficient use of its GOP. But from all reports it’s still pretty efficient — presumably it will be the least-compressed of all the HDV variants.
—————–
Get the most from your DVX camera. The DVX Book and DVX DVD are now available at https://www.dvxuser.com/articles/dvxbook/ and at Amazon (https://tinyurl.com/54u4a) -
Deleted User
July 20, 2005 at 4:50 am[Barry Green] “DV, for example, is always always always 29.97fps (or 25fps for PAL) and it doesn’t matter whether you are recording 24 within 29.97 — it always has to compress all 29.97fps. Same with DVCPRO-HD in 1080i. …”
Hi Barry: Thanks for the info! There something about what you’re saying I still don’t understand, but maybe you can explain it to me:
Wouldn’t it be easier & faster for the cam’s electronics to simply _copy_ the redundant frames (for example, the 6 frame difference between 24 fps and 30 fps) instead of _compressing_ the redundant frames? Those 6 frames are identical, right?
If a cam’s in 24 fps mode, I’d expect it to allocate relatively little of its processing muscle to record 6 redundant frames onto tape, and instead spend more of its time and horsepower to better-compress each of frames 1-24 (in 24 fps mode) than it normally would to compress each of frames 1-30 (in 30 fps mode).
But are you saying that’s not how it works? Or does it depend on the cam/model?
Again, I really appreciate this discussion; very educational!
– Peter
-
Jesse Rosen
July 20, 2005 at 11:30 am[Peter DeCrescenzo] “So, for example, one might use a lighting technique to cast a detailed, but undesirable area of the frame into deep shadow to “free up” the cam’s DCT compression to yield better quality in other, more important parts of the image.”
Perhaps this would help somewhat, but I still wouldn’t recommend basing your framing on what you think the codec will handle best — the effect is likely to be quite subtle. A quick test: record a bit of footage on the DVX100 in 4:3 mode, then without changing the framing switch to letterbox mode and record. Theoretically you’ll have more bits applied to the actual image data (well, the part that is the same between these two modes) in the letterbox one, but I’d bet you’d be hard pressed to actually see a difference — probably not enough of one to justify giving up the ability to vertically reframe in post.
As for the questions about compressing at different frame rates: again I’m not privy to what actually going on in these cameras, but I would bet that on any of the cameras that record multiple copies of frames (Varicam, DVX, SDX900) that the frames are indeed getting recompressed over and over. From an engineering standpoint, once you have a hardware-based codec that can compress your frames in under 1/60 of a second, it’s much easier to just pass the footage through it on the way to tape than to start dynamically altering the codec based on the frame rate. Also, I don’t think that more time in this case would actually help. Unlike codecs that employ temporal compression (MPEG et. al.), there’s not a lot of analysis that happens in a DV codec — the codec is designed to be applied in real time — the amount of work done by the codec actually doesn’t change based on scene content (though the results will, of course).
—
Jesse Rosen
Director of Technical Development
Abel Cine Tech, Inc. -
Graeme Nattress
July 20, 2005 at 12:52 pmSending an area dark is interesting…. But with dark also comes noise, usually…. So it might not be effective at all.
Graeme
– http://www.nattress.com – Film Effects and Standards Conversion for FCP
Reply to this Discussion! Login or Sign Up