]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blobdiff - libavcodec/truemotion1data.h
Add PCE support to the ADTS muxer.
[frescor/ffmpeg.git] / libavcodec / truemotion1data.h
index afbd280a49e7462939f949b1cfb2e2f786980609..6a9822a3ccb592f85fd311983d356a9761551c02 100644 (file)
@@ -5,32 +5,52 @@
  * distributed under the GNU GPL. It is redistributed with ffmpeg under the
  * GNU LGPL using the common understanding that data tables necessary for
  * decoding algorithms are not necessarily licensable.
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
+#ifndef AVCODEC_TRUEMOTION1DATA_H
+#define AVCODEC_TRUEMOTION1DATA_H
 
-/* Y delta tables, skinny and fat */
-static int16_t ydt1[8] = { 0, -2, 2, -6, 6, -12, 12, -12 };
-static int16_t ydt2[8] = { 0, -2, 2, -6, 6, -12, 12, -12 };
-static int16_t ydt3[8] = { 4, -6, 20, -20, 46, -46, 94, -94 };
-static int16_t fat_ydt3[8] = { 0, -15, 50, -50, 115, -115, 235, -235 };
-static int16_t ydt4[8] = { 0, -4, 4, -16, 16, -36, 36, -80 };
-static int16_t fat_ydt4[8] = { 0, 40, 80, -76, 160, -154, 236, -236 };
+#include <stdint.h>
+#include <stdlib.h>
 
-/* C delta tables, skinny and fat */
-static int16_t cdt1[8] = { 0, -1, 1, -2, 3, -4, 5, -4 };
-static int16_t cdt2[8] = { 0, -4, 3, -16, 20, -32, 36, -32 };
-static int16_t fat_cdt2[8] = { 0, -20, 15, -80, 100, -160, 180, -160 };
-static int16_t cdt3[8] = { 0, -2, 2, -8, 8, -18, 18, -40 };
+/* Y delta tables, skinny and fat */
+static const int16_t ydt1[8] = { 0, -2, 2, -6, 6, -12, 12, -12 };
+static const int16_t ydt2[8] = { 0, -2, 4, -6, 8, -12, 12, -12 };
+static const int16_t ydt3[8] = { 4, -6, 20, -20, 46, -46, 94, -94 };
+static const int16_t fat_ydt3[8] = { 0, -15, 50, -50, 115, -115, 235, -235 };
+static const int16_t ydt4[8] = { 0, -4, 4, -16, 16, -36, 36, -80 };
 /* NOTE: This table breaks the [+,-] pattern that the rest of the
  * tables maintain. Is this intentional? */
-static int16_t fat_cdt3[8] = { 0, 40, 80, -76, 160, -154, 236, -236 };
+static const int16_t fat_ydt4[8] = { 0, 40, 80, -76, 160, -154, 236, -236 };
+
+/* C delta tables, skinny and fat */
+static const int16_t cdt1[8] = { 0, -1, 1, -2, 3, -4, 5, -4 };
+static const int16_t cdt2[8] = { 0, -4, 3, -16, 20, -32, 36, -32 };
+static const int16_t fat_cdt2[8] = { 0, -20, 15, -80, 100, -160, 180, -160 };
+static const int16_t cdt3[8] = { 0, -2, 2, -8, 8, -18, 18, -40 };
 
 /* all the delta tables to choose from, at all 4 delta levels */
-static int16_t *ydts[] = { ydt1, ydt2, ydt3, ydt4, NULL };
-static int16_t *fat_ydts[] = { fat_ydt3, fat_ydt3, fat_ydt3, fat_ydt4, NULL };
-static int16_t *cdts[] = { cdt1, cdt2, cdt3, cdt3, NULL };
-static int16_t *fat_cdts[] = { fat_cdt2, fat_cdt2, fat_cdt2, fat_cdt3, NULL };
+static const int16_t * const ydts[] = { ydt1, ydt2, ydt3, ydt4, NULL };
+static const int16_t * const fat_ydts[] = { fat_ydt3, fat_ydt3, fat_ydt3, fat_ydt4, NULL };
+static const int16_t * const cdts[] = { cdt1, cdt1, cdt2, cdt3, NULL };
+static const int16_t * const fat_cdts[] = { fat_cdt2, fat_cdt2, fat_cdt2, fat_ydt4, NULL };
 
-static uint8_t pc_tbl2[] = {
+static const uint8_t pc_tbl2[] = {
 0x8,0x00,0x00,0x00,0x00,
 0x8,0x00,0x00,0x00,0x00,
 0x8,0x10,0x00,0x00,0x00,
@@ -289,7 +309,7 @@ static uint8_t pc_tbl2[] = {
 0x2,0x66
 };
 
-static uint8_t pc_tbl3[] = {
+static const uint8_t pc_tbl3[] = {
 0x6,0x00,0x00,0x00,
 0x6,0x00,0x00,0x00,
 0x6,0x00,0x00,0x01,
@@ -548,7 +568,7 @@ static uint8_t pc_tbl3[] = {
 0x2,0x77
 };
 
-static uint8_t pc_tbl4[] = {
+static const uint8_t pc_tbl4[] = {
 0x8,0x00,0x00,0x00,0x00,
 0x8,0x00,0x00,0x00,0x00,
 0x8,0x20,0x00,0x00,0x00,
@@ -807,4 +827,6 @@ static uint8_t pc_tbl4[] = {
 0x2,0x77
 };
 
-uint8_t *tables[] = { pc_tbl2, pc_tbl3, pc_tbl4 };
+static const uint8_t * const tables[] = { pc_tbl2, pc_tbl3, pc_tbl4 };
+
+#endif /* AVCODEC_TRUEMOTION1DATA_H */