[matroska-devel] Re: [Fwd: Re: Hosting of MPC]

Steve Lhomme steve.lhomme at free.fr
Mon Jan 27 15:24:30 CET 2003

I think storing the AR in 2 integers is the safest.

I onced proposed to store the fixed display width/length for a content (maybe
that was in MCF) so that even on a large screen, if your movie was intented to
be played on 4x3cm it would still have the same size. I'm not sure it's
currently possible on computers (you have to know the pixel size) and nearly
impossible on a DVD player+TV (no way that the DVD player would know the size of
the screen, or maybe with a calibration).

Anyway, that means we can have the PixelWidth/PixelHeight and
DisplayWidth/DisplayHeight. Other parameters that could be added would set
wether the display size is free, in centimeters, millimeters, inches, etc.

Only the PixelWidth/PixelHeight should be mandatory (the default for the
DisplayXXX is the same value as for the pixel).

[Proposal 1]

  - horizontal pixel count [u-integer]	1) 
  - vertical   pixel count [u-integer]	1)
  - aspect ratio of the pixel as a:b, where are a and b are nonzero [u-integer]s

    Examples:  hor_res =  720, vert_res =  576, pixel_AR = {16,15}
               hor_res = 1280, vert_res =  720, pixel_AR = {1,1}
               hor_res = 1920, vert_res = 1080, pixel_AR = {1,1}
               hor_res =  352, vert_res =  288, pixel_AR = {16,15}

    disadvantage: "unusual" number for the AR
    advantage:    cropping an image don't affect the pixel_AR

    1) please don't use the word "horizontal resolution", because it isn't a
       resolution in the physical sense. Such dirtiness in word selection is
       one reason why are standards are often so difficult to read.

[Proposal 2]

  - horizontal pixel count [u-integer]
  - vertical   pixel count [u-integer]
  - aspect ratio of the display as a:b, where are a and b are nonzero [u-integer]s

    Examples:  hor_res =  720, vert_res =  576, display_AR = {4,3}
               hor_res = 1280, vert_res =  720, display_AR = {16,9}
               hor_res = 1920, vert_res = 1080, display_AR = {16,9}
               hor_res =  352, vert_res =  288, display_AR = {176,135}

    advantage:    "usual" number for the AR
    advantage:    cropping an image affects display_AR, and this, and in
                  reality this is nearly never corrected.
[Remark 3]
   both ARs can be stored using two different ways:

   - stored as float [usually 4 bytes are more than enough]

     + you calculate and store the AR with an accuracy of less than 3*10^-8.
     - you find seldom correct values in floating point entities, I expect
       more incorrect values when stored as FP value.

   - stored as 2 u-integers (size of each is half the size of the item)
     - to store a calculated value is more difficult, you must search two a
       and b's which do approximate AR=a/b very well.
     - it is easier to force correct ARs, because you can say what is right
       and what is very likely wrong.

Hope this info is enough to make a wise decision.

More information about the Matroska-devel mailing list