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

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
572 int gb_count;572 int gb_count;
573 GetBitContext gb2;573 GetBitContext gb2;
574 574
575 ff_aac_ac_init(&ac, gb);
576 c = ff_aac_ac_map_process(state, reset, N);575 c = ff_aac_ac_map_process(state, reset, N);
577 576
577 if (!len) {
578 ff_aac_ac_finish(state, 0, N);
579 return 0;
580 }
581
582 ff_aac_ac_init(&ac, gb);
583
578 /* Backup reader for rolling back by 14 bits at the end */584 /* Backup reader for rolling back by 14 bits at the end */
579 gb2 = *gb;585 gb2 = *gb;
580 gb_count = get_bits_count(&gb2);586 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