Log in

View Full Version : How does GMC affect filesize?


absinthe
17th October 2004, 17:47
I just picked up a Philips DVP-642, so I've been dropping the GMC from my encodes recently. I just did a full-quality encode (quantizer 2) of a DVD with no regard for filesize, and to my surprise this 100-minute movie came out at just under 1 GB.

A short time ago, I did a similar encode of a movie that was just a tad over 2 hours long, with GMC, and it came in at a whopping 2.04 GB! (both of the above are video only)

Also, I encoded the same 2-hour movie twice, sized for 2 CDs each time - the first time with GMC and the second time without. Though both encodes came out the same size (obviously), the file without GMC had a considerably higher bitrate. I've erased the older file, but I believe the difference was to the tune of 400 or 500 kbps.

What's up wi' dat?

-abs

Teegedeck
17th October 2004, 18:11
Originally posted by absinthe
Though both encodes came out the same size (obviously), the file without GMC had a considerably higher bitrate. I've erased the older file, but I believe the difference was to the tune of 400 or 500 kbps.

What's up wi' dat?

Bitrate equals filesize in this case, so there must be an error in your equation somewhere. Or perhaps in your way of expressing things.

absinthe
17th October 2004, 19:53
Okay. Time out. :)

Let's forget GMC for a moment and let me ask this: How does a simple quantizer setting assign bitrate? I would expect that if I encoded, let's say, 2 different movies that were each the exact same length, and I encoded each with the same constant quantizer setting in a single pass, that both movies would come out with a virtually identical bitrate.

Is there any reason that would not be the case?

-abs

edit: I'm asking all this because it was my understanding from another thread that simply encoding with a constant quantizer setting of 2, with no regard for filesize, would produce a result of virtually optimum quality (i.e. "as good as it gets"). So I'm wondering why my encode came out with a bitrate of 1275 or so?

Teegedeck
17th October 2004, 20:05
OK, think of movies as figures. Each frame is a number, the more detail or motion there is in the frame/picture, the higher that number.

Now, think of the quantizer as another number. The higher the quantizer, the higher the number. Now when you encode, each number that represents a frame gets divided by the number that represents the quantizer.

So for one movie this may mean 2020202/2, 992944/2 etc.
For a different movie that may mean 12121/2, 2929/2 etc.

When you add up all the results, you get the final filesize. It is a crude way to visualize it, but I think you get an impression, now, as to why quantizers produce totally different filesizes/bitrates for different movies.

Manao
17th October 2004, 20:09
Yes, there are plenty of reasons.

The filesize at fixed quantizer depends only on the complexity of the clip. If there is a lot of noise, and a lot of motion, the motion compensation will not be very efficient. That means that the result of the motion compensation will be hard to compress ( after the DCT, coefficients will be high, and so will take more bits to code ). So the p-frame's size will be high. Also, a lot of motion means longer motion vectors, hence vectors will take more bits.

On the other hand, if you've got a clip with little or no motion, and almost no noise, the result of the motion compensation will be almost only zeros. After the DCT, all the coefficients will be almost null, so easy to encode ( a coefficient takes more bits when he is high, less when he is low, and even less if there are consecutive zeros )

Ideally, if you've got two consecutive identical frames, the second one will have a size almost null.

absinthe
17th October 2004, 23:18
Ok, that all makes sense (of course). That explains why my encode of "Girl With A Pearl Earring," with all of its long, still shots, came in relatively smaller than I expected.

So the point of the constant quantizer is ... ?

Might it be fair to say that the constant quantizer provides a balance of optimum quality and efficiency?

-abs

Teegedeck
17th October 2004, 23:29
Constant quantizer is as close as you can get to 'constant quality'.