-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added progressive refinement example files #131
Conversation
It might be better to have @cconcolato review these -- I haven't personally attempted any kind of progressive implementation at all yet, so I'd be coming into this somewhat blind. |
testFiles/Apple/multilayer_examples/animals_00_multilayer_lsel.avif.txt
Outdated
Show resolved
Hide resolved
Thanks for the files @leo-barnes. I had a look at animals_00_multilayer.avif and it appears the spatial scalability layers are not being set correctly. Using
As said above, this second layer is 2048x1536 and should have |
This appears to be a bug in |
Yeah, there's a bug in libaom as well with regards to what spatial_id you get out when decoding. At the moment you always get the spatial_id of the final layer even though the dimensions clearly match what I would expect of the base layer. @wantehchang confirmed by code inspection that it seems to be a bug and sent me a patch that I'm going to try today. Here's the issue I filed about it: |
Turns out libaom was automatically creating multiple operating points when creating the streams. I haven't found any OBU parser that can actually output what's inside the OBUs for me, and oddly enough the libaom decoder doesn't seem to give me any way to query the number of operating points in the stream either (https://bugs.chromium.org/p/aomedia/issues/detail?id=2995). I can verify that there are multiple operating points by setting AV1D_SET_OPERATING_POINT when decoding, so I'll create some files that use the new operating point selector property as well. |
I updated libaom to v2.0.2 per Wan-Teh's suggestion (I was using v1.0.something), so the encoded data is now slightly different. |
I am unclear about the usage of a1lx here. The a1lx-containing and a1lx-missing files differ in that the a1lx example contains one Item, whereas the a1lx-less contains two (or more) Items. However, I am not sure that is enough for progressive decoding of a MIAF image - I would expect there still to be two or more Items regardless of the presence or absence of a1lx. |
Good question! We may want to add some more wording to the spec with some examples of how we think files should look. As a summary of the last couple of meetings, the idea is as follows:
Creating multiple items that selects different layers and adding them to an Next question is why we have There is nothing stopping you from using |
I had a quick look at the files. They look good to me. In the multi-item image, I was able to extract the items separately, repackage them separately and compare the 2 qualities. One thing I noted at least in animals_00_singlelayer.avif with MP4Box.js FileReader is that the
I usually use MP4Box (command line) as follows:
This produces an XML structure that looks like:
|
Nit: it looks like all the files start with a temporal unit OBU, but they are a SHOULD NOT in the ISOBMFF spec. |
@tdaede I also thought it would be a Temporal Delimiter but it does not seem to be one. I've tried patching the offsets in the file and extracting the whole thing but MP4Box then fails with:
|
I was able to see it via:
I also double checked that 0x12 0x00 appears in the .avif, in case MP4Box was cleverly adding a TU on export. |
@tdaede I had not realized the TD were there, but in my experiment I was talking about the 8 bytes before the TD. The offset indicated in the extent points to the start of the TD. I still don't know what those bytes before are. @leo-barnes can you double-check in the tool that generated the container what those bytes are? |
These files are using the 64-bit form box size for
Any idea how I configure libaom to not output the TU OBU? I also noticed it but couldn't figure out how to get it to stop. I can of course manually strip it, but there should ideally be some way of configuring it I hope. |
Unfortunately no, it has to be manually stripped by the packager. |
I've now removed the TU delimiter from all the files from what I can see. I have also added two I think the files are correct, but I would be very thankful if people could do some sanity checking on them in case I screwed something up in my scripts. |
Also removed TU delimiter from animals_00_multilayer.avif
596185f
to
8acb870
Compare
I've now updated the I've also updated |
I've tried running the files through the compliance warden and fixed an issue for the singlelayer file. All the multilayer files fail with the tool assertion issue in the linked ComplianceWarden issue above, so can't tell if anything is wrong with them. |
Ran through the multilayer files and fixed the |
I tested these with our most recent stack of patches on GPAC and noticed the following: animals_00_multilayer_a1op.avif: This seems to still have the fullbox bytes at the beginning of the a1op box, it's 4 bytes larger than it should be. animals_00_multilayer_a1lx.avif: The a1lx box seems to be encoding the large_size bitfield as 4 bytes rather than 1 byte. |
Are you sure/using the latest commit? The boxes are supposed to be 9 bytes in size if they are simple boxes. If I pass it through my parser I see this:
If I do the same for
I see the same when looking at the actual bytes in a hex viewer.
My parser shows this:
I've looked at the bytes in my hex editor and they look correct. And the size is the size I would expect: |
Ah indeed my bad, I failed to set up a tracking branch correctly when I pulled your changes last time. I've updated them and now everything parses correctly here. Sorry about the false alarm! |
No worries, I'm just glad someone could sanity check them! |
I added some examples of files that contain multiple layers as well as the
lsel
anda1lx
properties. I could not figure out how to generate streams containing multiple operating points.