Re: video: various width/height attributes

On Mon, Dec 1, 2008 at 2:55 AM, Ian Hickson <ian@hixie.ch> wrote:
> On Sat, 22 Nov 2008, Jim Jewett wrote:

>> Looking at http://www.whatwg.org/specs/web-apps/current-work/#video

>> I think the various width/height definitions need to be clarified (and
>> placed right next to each other?), or even reduced, to avoid buggy
>> spec-reading.

>> As best I can tell:

>> (1)  The document element itself has only "width" and "height", which
>> are in CSS pixels.
>> (2)  The document element attributes are reflected in the DOM as
>> "width" and "height".
>> (3)  The binary data in the video's own media stream may include
>> height and width, which are called "intrinsic height" and "intrinsic
>> width".
>> (4)  "intrinsic height" and "intrinsic width" are added to the DOM
>> under the names "videoWidth" and "videoHeight"
>> (5)  "adjusted height" and "adjusted width" do not appear in the
>> document or the DOM; they are not available to scripts.  They are
>> simply convenient labels to simplify the spec-writing on how to deal
>> with non-square pixels in either the source media or the display
>> screen.  (Or perhaps only of the display screen?)

> What you describe seems right to me; what are you suggesting changing?


At first, I was thinking that simply listing them all in one place (so
I wouldn't have to wonder if I had missed one) would help, and that
one of the two definitions should be chosen for the "adjusted X"
attributes.

When I look now, I can't find the "adjusted X" attributes at all, so I
*hope* this means you already streamlined the wording.

If I understand correctly now, "width" and "height" are the attributes
from the document.  They can be modified by a script.  They indicate
the actual size on the screen.

"videoWidth" and "videoHeight" represent the ideal size on the screen.
 They are how big the video thinks it should be.  These numbers are
immutable, as they represent a known transformation based on data from
the video itself.  They are also called "intrinsic width" and
"intrinsic height".  (Why two names that must both be defined for the
same concent?)


But I'm not sure how well "intrinsic width" and "intrinsic height" are
really defined, because they are "after taking into account the
resource's dimensions, aspect ratio, clean aperture, resolution, and
so forth, as defined for the format used by the resource.."

Is there some way to figure out which adjustments need to be made in
general, or is this a per-codec judgment call of some sort?

-jJ

Received on Wednesday, 3 December 2008 01:58:50 UTC