ioppermann/yamdi — comment on commit 94c0e9fd33ed2e6bd1db78afcc6b5444c43f7d7d
File:  line 0
By jgreer:

Also, it looks like this commit changes it to use the dim_x and dim_y values instead of the render_x and render_y values, which I don't believe is correct. According to the VP6 specification document itself, they are described as follows:

VFragments: The vertical coded height of the frame in 8x8 block units. If image is 240 pixels high, VFragments will be 30. VP6 Bitstream & Decoder Specification COMPANY CONFIDENTIAL

HFragments: The horizontal coded width of the frame in 8x8 block units. If image is 320 pixels wide, HFragments will be 40.

OutputVFragments: The vertical decoded height of the frame as it should be scaled on output in 8x8 block units. See definition of ScalingMode below.

OutputHFragments: The horizontal decoded width of the frame as it should be scaled on output in 8x8 block units. See definition of ScalingMode below.

ScalingMode: Internally a frame may be encoded at a different resolution to the eventual size that it is presented on output from the decoder. There are four ways to scale the frame on output MAINTAIN_ASPECT_RATIO, SCALE_TO_FIT, CENTER, OTHER. (Where ScalingMode is the first 2 bits of the following byte.)

That implies the dim_x and dim_y values are the actual encoded pixel data sizes, where as the render_x and render_y are the display sizes, when encoding anamorphic video. Since Flash players use the width and height metadata to determine the aspect ratio (and size) to display the video, I believe the render_x and render_y are what should be used for the actual width and height here.