On 4/2/2019 3:36 PM, James Almer wrote: > On 4/1/2019 8:39 PM, Mark Thompson wrote: >> --- >> Unsure about this one - while the patch is short, it's rather invasive in a >> pretty ugly way with how it abuses the read call. It will still do >> allocations for the decomposition because of that, even though we don't >> really want them. >> >> Any ideas welcome. > > How about copying most of cbs_av1_read_unit() into cbs_av1_parse_obu(), > factorizing the parts that can be shared (like pretty much everything > before the switch), without the call to ff_cbs_alloc_unit_content() and > only bothering to parse Sequence Header, Frame Header, Frame (Only the > header, and not the Tile Group part), using the needed structs on stack? > You wouldn't have to worry about cbs_av1_ref_tile_data() being called > with unit->data_ref as NULL at all.
So Tile Groups probably need to be parsed to set seen_frame_header back to 0 before the next frame, but you can still skip the cbs_av1_ref_tile_data() calls with the above suggestion. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".