MPEGGroup / FileFormat

MPEG file format discussions
23 stars 0 forks source link

Gathering feedback on saiz extension. New version vs. new 4CC #99

Closed podborski closed 3 months ago

podborski commented 6 months ago

We noticed that the 8 bit sample_info_size limitation in the version=0 of saiz can be problematic . Therefore, we proposed a fix to just extend the range by defining a new box saz2 that is equivalent to saiz. This is what the current CDAM text defines, it is basically the same as saiz but with 16 and 32 bits used for the size signaling:

aligned(8) class ExtendedSampleAuxiliaryInformationSizesBox
    extends FullBox('saz2', version, flags)
{
    if(version == 0) {
        if (flags & 1) {
            unsigned int(32) aux_info_type;
            unsigned int(32) aux_info_type_parameter;
        }
        unsigned int(16) default_sample_info_size;
        unsigned int(32) sample_count;
        if (default_sample_info_size == 0) {
            unsigned int(16) sample_info_size[ sample_count ];
        }
    }
    if(version == 1) {
        if (flags & 1) {
            unsigned int(32) aux_info_type;
            unsigned int(32) aux_info_type_parameter;
        }
        unsigned int(32) default_sample_info_size;
        unsigned int(32) sample_count;
        if (default_sample_info_size == 0) {
            unsigned int(32) sample_info_size[ sample_count ];
        }
    }
}

At Apple we think that having a new 4CC saz2 is a bit “safer” than defining a new version=1 saiz as there could be implementations out there that would still try to parse saiz version=1 as saiz version = 0. However, in the file format group, when the issue was discussed, the feedback was a bit different. The group was leaning more towards extending the existing saiz as it is defined as FullBox in the first place and versions field can be used for that. This approach is currently in the TuC.

This issue here is just to get more feedback from the industry on the possible implications. Especially since it relates to CENC.

AUGxhub commented 6 months ago

vote up for new 4CC(FourCC) solution

bradh commented 6 months ago

I don't think there is significant effort difference between reworking an existing saiz implementation and the cut-n-paste that would be involved in making saz2. So probably not an important consideration.

There is precedent for adding versions to published FullBox definitions.

I think it depends on whether saiz is seen as "generally applicable but a mainly a CENC thing". If so, saz2 might be better.

bradh commented 6 months ago

Orthogonal to my previous comment, if there is going to be a new box with per-sample auxiliary information sizes / lengths, maybe it could be called sais or sail. Neither of those appears to be registered.

cconcolato commented 3 months ago

At its previous meeting, the group decided to use versioning.