Open Bug 1477888 Opened 8 years ago Updated 4 years ago

Multiple copies of AOM lookup tables in libxul

Categories

(Core :: Audio/Video: Playback, defect, P3)

defect

Tracking

()

People

(Reporter: glandium, Unassigned)

Details

The lookup tables defined in third_party/aom/av1/common/common_data.h are used in multiple files, and as such end up included multiple times in libxul. For example, a linux build has 5 copies of tx_size_wide_unit. A mac build has 9. tx_size_wide_unit is 76 bytes large. Other than that, on a linux build: 8 copies of mi_size_wide, 22 bytes each, 6 copies of mi_size_wide_log2, 22 bytes each, 9 copies of mi_size_high, 22 bytes each, 3 copies of mi_size_high_log2, 22 bytes each, 10 copies of block_size_wide, 22 bytes each, 10 copies of block_size_high, 22 bytes each, 3 copies of num_pels_log2_lookup, 2 of 22 bytes, one of 13 bytes. 2 copies of subsize_lookup, one of 52 bytes, one of 60 bytes, 5 copies of max_txsize_rect_lookup, 22 bytes each, 4 copies of sub_tx_size_map, 19 bytes each, 10 copies of tx_size_wide, 76 bytes each, 5 copies of tx_size_wide_unit, 76 bytes each, 8 copies of tx_size_wide_log2, 76 bytes each, 2 copies of tx_size_wide_log2_eob, 76 bytes each, 10 copies of tx_size_high, 76 bytes each, 5 copies of tx_size_high_unit, 76 bytes each, 8 copies of tx_size_high_log2, 76 bytes each, 2 copies of tx_size_2d, 80 bytes each, 3 copies of txsize_to_bsize, 2 of which are 19 bytes, one is 4 bytes 4 copies of txsize_sqr_map, 19 bytes each, 4 copies of txsize_sqr_up_map, 19 bytes each, 2 copies of tx_mode_to_biggest_tx_size, one of which is 3 bytes, the other is 5 bytes, 7 copies of ss_size_lookup, 6 of which are 88 bytes, one is 52. 2 copies of partition_context_lookup, one of which is 44 bytes, the other is 26.
Is the ask here for us to optimize libaom for memory consumption?
Rank: 25
Priority: -- → P3
The problem here is that these data structures take up space in all instances of Firefox whether they are executing AOM code or not. So it's more about minimizing passive footprint and being pay-for-play than the traditional sort of "optimize memory used during actual operation".
Alternatively, you could view this as just a "C language usage" bug. If these tables were moved out of header files, they wouldn't be duplicated.
Component: Audio/Video → Audio/Video: Playback
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.