#16 HorizontalSubSampling, etc

closed-fixed
nobody
None
5
2003-08-20
2003-03-01
Jim Trainor
No

1) This is a bug:
The V101 specification defines the legal CDCI horizontal
chrominance subsampling values as 1, 2, and 4.

However,
ImplAAFCDCIDescriptor::SetHorizontalSubsampling()
only accepts the values 1 and 2.

2) This is just a comment:
The horizontal and vertical chroma subsampling values
map to the following: 4:4:4 (V=1 H=1), 4:2:2 (V=1 H=2),
4:1:1 (V=1 H=4), and 4:2:0 (V=2 H=2).

To the best of my knowledge, the following V/H pairs are
not in common use: V=2 H=1, and V=2 H=4.

Since the individual H/V values are enforced, perhaps
that should also be enforced? It may be troublesome to
do so, however, since the values are set independently

Discussion

  • Stuart Cunningham

    Logged In: YES
    user_id=692703

    1) This has been fixed in revision 1.21 of
    ref-impl/src/impl/ImplAAFCDCIDescriptor.cpp

    2) Regarding enforcing the known (common) subsampling
    pairs, I would suggest that we do not attempt to enforce the
    permitted value pairs with the current interface consisting of:
    SetHorizontalSubsampling (aafUInt32)
    SetVerticalSubsampling (aafUInt32)

    The current interface does not imply a relationship between
    vertical and horizontal subsampling. A more intuitive
    interface would be:
    SetHorizontalAndVerticalSubsampling(aafUInt32, aafUInt32)
    or even
    SetSubsampling(aafUInt32, aafUInt32)

    If the current interface did enforce valid pairs, the
    following awkward situation could arise.
    A setting of V=2,H=2 (4:2:0) is made.
    Later on, a setting of V=1, H=4 (4:1:1) is required.
    A call to SetHorizontalSubsampling( 4 ) would fail since
    V=2,H=4 is not a permitted pair (in the scenario of enforced
    pairs). The programmer would have to detect this situation
    and provide an algorithm for safely moving from one valid
    pair (V=2,H=2) to the other valid pair (V=1,H=4).
    E.g.
    SetVerticalSubsampling( 1 )
    SetHorizontalSubsampling( 4 )

    So, to avoid this headache, either have a new interface
    where both values are set atomically, or don't enforce valid
    pairs.

     
  • Stuart Cunningham

    Logged In: YES
    user_id=692703

    1) This has been fixed in revision 1.21 of
    ref-impl/src/impl/ImplAAFCDCIDescriptor.cpp

    2) Regarding enforcing the known (common) subsampling
    pairs, I would suggest that we do not attempt to enforce the
    permitted value pairs with the current interface consisting of:
    SetHorizontalSubsampling (aafUInt32)
    SetVerticalSubsampling (aafUInt32)

    The current interface does not imply a relationship between
    vertical and horizontal subsampling. A more intuitive
    interface would be:
    SetHorizontalAndVerticalSubsampling(aafUInt32, aafUInt32)
    or even
    SetSubsampling(aafUInt32, aafUInt32)

    If the current interface did enforce valid pairs, the
    following awkward situation could arise.
    A setting of V=2,H=2 (4:2:0) is made.
    Later on, a setting of V=1, H=4 (4:1:1) is required.
    A call to SetHorizontalSubsampling( 4 ) would fail since
    V=2,H=4 is not a permitted pair (in the scenario of enforced
    pairs). The programmer would have to detect this situation
    and provide an algorithm for safely moving from one valid
    pair (V=2,H=2) to the other valid pair (V=1,H=4).
    E.g.
    SetVerticalSubsampling( 1 )
    SetHorizontalSubsampling( 4 )

    So, to avoid this headache, either have a new interface
    where both values are set atomically, or don't enforce valid
    pairs.

     
  • Phil Tudor

    Phil Tudor - 2003-08-20
    • status: open --> closed
     
  • Phil Tudor

    Phil Tudor - 2003-08-20
    • status: closed --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks