Skip to content

Commit

Permalink
Remove dependency on AVM internal headers. (#1928)
Browse files Browse the repository at this point in the history
Releases are unfrequent anyway so we might as well use the proper
values and not the enums.
  • Loading branch information
vrabaud authored Jan 11, 2024
1 parent 03dceb6 commit c105111
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/obu.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@

#if defined(AVIF_CODEC_AVM)
#include "config/aom_config.h"
#if CONFIG_LR_IMPROVEMENTS
#include "av1/common/enums.h"
#include "av1/common/restoration.h"
#endif
#endif

// ---------------------------------------------------------------------------
Expand Down Expand Up @@ -383,14 +379,9 @@ static avifBool parseAV2SequenceHeader(avifBits * bits, avifSequenceHeader * hea
avifBitsRead(bits, 2); // enable_superres, enable_cdef
if (avifBitsRead(bits, 1)) { // enable_restoration
#if CONFIG_LR_IMPROVEMENTS
avifBitsRead(bits, RESTORE_SWITCHABLE_TYPES); // lr_tools_disable_mask[0]
avifBitsRead(bits, /*RESTORE_SWITCHABLE_TYPES=*/5); // lr_tools_disable_mask[0]
if (avifBitsRead(bits, 1)) {
for (int i = 1; i < RESTORE_SWITCHABLE_TYPES; ++i) {
if (DEF_UV_LR_TOOLS_DISABLE_MASK & (1 << i)) {
continue;
}
avifBitsRead(bits, 1); // lr_tools_disable_mask[1]
}
avifBitsRead(bits, /*RESTORE_SWITCHABLE_TYPES=*/5 - 1); // lr_tools_disable_mask[1]
}
#endif
}
Expand Down

0 comments on commit c105111

Please sign in to comment.