cook: Use the correct table for 6-bit stereo coupling

Message ID 20181014193233.48001-1-lu_zero@gentoo.org
State New
Headers show
Series
  • cook: Use the correct table for 6-bit stereo coupling
Related show

Commit Message

Luca Barbato Oct. 14, 2018, 7:32 p.m.
Thanks to Kostya for digging it out and telling me.
---
 libavcodec/cookdata.h | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

--
2.12.2

Comments

Vittorio Giovara Oct. 15, 2018, 3:20 a.m. | #1
On Sun, Oct 14, 2018 at 3:32 PM Luca Barbato <lu_zero@gentoo.org> wrote:

> Thanks to Kostya for digging it out and telling me.
> ---
>
 libavcodec/cookdata.h | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/libavcodec/cookdata.h b/libavcodec/cookdata.h
> index 714ba1e76d..83fd7c71fb 100644
> --- a/libavcodec/cookdata.h
> +++ b/libavcodec/cookdata.h
> @@ -453,12 +453,13 @@ static const uint16_t ccpl_huffcodes5[31] = {
>  };
>
>  static const uint16_t ccpl_huffcodes6[63] = {
> -
> 0x0004,0x0005,0x0005,0x0006,0x0006,0x0007,0x0007,0x0007,0x0007,0x0008,0x0008,0x0008,
> -
> 0x0008,0x0009,0x0009,0x0009,0x0009,0x000a,0x000a,0x000a,0x000a,0x000a,0x000b,0x000b,
> -
> 0x000b,0x000b,0x000c,0x000d,0x000e,0x000e,0x0010,0x0000,0x000a,0x0018,0x0019,0x0036,
> -
> 0x0037,0x0074,0x0075,0x0076,0x0077,0x00f4,0x00f5,0x00f6,0x00f7,0x01f5,0x01f6,0x01f7,
> -
> 0x01f8,0x03f6,0x03f7,0x03f8,0x03f9,0x03fa,0x07fa,0x07fb,0x07fc,0x07fd,0x0ffd,0x1ffd,
> -    0x3ffd,0x3ffe,0xffff,
> +    0Xfffe, 0X7ffe, 0X3ffc, 0X1ffc, 0X0ffc, 0X07f6, 0X07f7, 0X07f8,
> 0X07f9,
> +    0X03f2, 0X03f3, 0X03f4, 0X03f5, 0X01f0, 0X01f1, 0X01f2, 0X01f3,
> 0X01f4,
> +    0X00f0, 0X00f1, 0X00f2, 0X00f3, 0X0070, 0X0071, 0X0072, 0X0073,
> 0X0034,
> +    0X0035, 0X0016, 0X0017, 0X0004, 0X0000, 0X000a, 0X0018, 0X0019,
> 0X0036,
> +    0X0037, 0X0074, 0X0075, 0X0076, 0X0077, 0X00f4, 0X00f5, 0X00f6,
> 0X00f7,
> +    0X01f5, 0X01f6, 0X01f7, 0X01f8, 0X03f6, 0X03f7, 0X03f8, 0X03f9,
> 0X03fa,
> +    0X07fa, 0X07fb, 0X07fc, 0X07fd, 0X0ffd, 0X1ffd, 0X3ffd, 0X3ffe, 0Xffff
>  };
>
>  static const uint8_t ccpl_huffbits2[3] = {
> --
>

ok but please use the 0x notation instead of 0X
does this fix any particular sample?

Patch

diff --git a/libavcodec/cookdata.h b/libavcodec/cookdata.h
index 714ba1e76d..83fd7c71fb 100644
--- a/libavcodec/cookdata.h
+++ b/libavcodec/cookdata.h
@@ -453,12 +453,13 @@  static const uint16_t ccpl_huffcodes5[31] = {
 };

 static const uint16_t ccpl_huffcodes6[63] = {
-    0x0004,0x0005,0x0005,0x0006,0x0006,0x0007,0x0007,0x0007,0x0007,0x0008,0x0008,0x0008,
-    0x0008,0x0009,0x0009,0x0009,0x0009,0x000a,0x000a,0x000a,0x000a,0x000a,0x000b,0x000b,
-    0x000b,0x000b,0x000c,0x000d,0x000e,0x000e,0x0010,0x0000,0x000a,0x0018,0x0019,0x0036,
-    0x0037,0x0074,0x0075,0x0076,0x0077,0x00f4,0x00f5,0x00f6,0x00f7,0x01f5,0x01f6,0x01f7,
-    0x01f8,0x03f6,0x03f7,0x03f8,0x03f9,0x03fa,0x07fa,0x07fb,0x07fc,0x07fd,0x0ffd,0x1ffd,
-    0x3ffd,0x3ffe,0xffff,
+    0Xfffe, 0X7ffe, 0X3ffc, 0X1ffc, 0X0ffc, 0X07f6, 0X07f7, 0X07f8, 0X07f9,
+    0X03f2, 0X03f3, 0X03f4, 0X03f5, 0X01f0, 0X01f1, 0X01f2, 0X01f3, 0X01f4,
+    0X00f0, 0X00f1, 0X00f2, 0X00f3, 0X0070, 0X0071, 0X0072, 0X0073, 0X0034,
+    0X0035, 0X0016, 0X0017, 0X0004, 0X0000, 0X000a, 0X0018, 0X0019, 0X0036,
+    0X0037, 0X0074, 0X0075, 0X0076, 0X0077, 0X00f4, 0X00f5, 0X00f6, 0X00f7,
+    0X01f5, 0X01f6, 0X01f7, 0X01f8, 0X03f6, 0X03f7, 0X03f8, 0X03f9, 0X03fa,
+    0X07fa, 0X07fb, 0X07fc, 0X07fd, 0X0ffd, 0X1ffd, 0X3ffd, 0X3ffe, 0Xffff
 };

 static const uint8_t ccpl_huffbits2[3] = {