I know it's counter intuitive but see "Figure 4.41 Calculation of
fTableLim if bs_limiter_bands > 0"
From 8cf80a333c2acc55bbc6a71e49075ac0df129cd0 Mon Sep 17 00:00:00 2001
From: Alex Converse <[email protected]>
Date: Tue, 17 Nov 2009 14:14:02 -0500
Subject: [PATCH 6/8] nrLim is the last element in limTable not the number of elements.
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------1"
This is a multi-part message in MIME format.
--------------1
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
aacsbr.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
--------------1
Content-Type: text/x-patch; name="0006-nrLim-is-the-last-element-in-limTable-not-the-number.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0006-nrLim-is-the-last-element-in-limTable-not-the-number.patch"
diff --git a/aacsbr.c b/aacsbr.c
index 050486e..799c0e7 100644
--- a/aacsbr.c
+++ b/aacsbr.c
@@ -390,18 +390,18 @@ static int sbr_hf_calc_npatches(AACContext *ac, SpectralBandReplication *sbr)
return 0;
}
-static inline void remove_table_element(void *table, uint8_t *nel, int el_size,
+static inline void remove_table_element(void *table, uint8_t *last_el, int el_size,
int el)
{
- memmove((uint8_t *)table + el_size*el, (uint8_t *)table + el_size*(el + 1), (*nel - el - 1)*el_size);
- (*nel)--;
+ memmove((uint8_t *)table + el_size*el, (uint8_t *)table + el_size*(el + 1), (*last_el - el)*el_size);
+ (*last_el)--;
}
-static inline int in_table(void *table, int nel, int el_size, void *needle)
+static inline int in_table(void *table, int last_el, int el_size, void *needle)
{
int i;
uint8_t *table_ptr = table; // avoids a warning with void * ptr arith
- for (i = 0; i < nel; i++, table_ptr += el_size)
+ for (i = 0; i <= last_el; i++, table_ptr += el_size)
if (!memcmp(table_ptr, needle, el_size))
return 1;
return 0;
--------------1--
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc