History

aacdec_usac: skip coeff decoding if the number to be decoded is 0

Yet another thing not mentioned in the spec.

Lynne committed 2 years ago

Commit a18d0651 parent 1ad9a401 file · +7 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/aac/aacdec_usac.c+7−1
@@ -572,9 +572,15 @@ static int decode_spectrum_and_dequant_ac(AACDecContext *s, float coef[1024], · 571 unmodified lines
572572 int gb_count;
573573 GetBitContext gb2;
574574
575− ff_aac_ac_init(&ac, gb);
576575 c = ff_aac_ac_map_process(state, reset, N);
577576
577+ if (!len) {
578+ ff_aac_ac_finish(state, 0, N);
579+ return 0;
580+ }
581+
582+ ff_aac_ac_init(&ac, gb);
583+
578584 /* Backup reader for rolling back by 14 bits at the end */
579585 gb2 = *gb;
580586 gb_count = get_bits_count(&gb2);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t