-struct huffcode {
- char*code;
- int len;
- int index;
-};
+/* h263tables.c
+
+ Huffman Tables for h.263 encoding.
+
+ Copyright (c) 2003 Matthias Kramm <kramm@quiss.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#define MCBPC_INTRA_STUFFING 8
+#include "h263tables.h"
struct huffcode mcbpc_intra[] = {
{"1",1, 0}, /*cbpc-00 mb type 3*/
};
struct mcbpc_intra_params
-{
- int index;
- int mb_type;
- int cbpc;
-} mcbpc_intra_params[] =
+ mcbpc_intra_params[] =
{{0, 3, 0}, //00
{1, 3, 1}, //01
{2, 3, 2}, //10
{8 -1, -1}
};
-#define MCBPC_INTER_STUFFING 20
-
struct huffcode mcbpc_inter[] = {
{"1", 1, 0},
{"0011", 4, 1},
};
struct mcbpc_inter_params
-{
- int index;
- int mb_type;
- int cbpc;
-} mcbpc_inter_params[] =
+ mcbpc_inter_params[] =
{ {0, 0, 0}, {1, 0, 1}, {2, 0, 2}, {3, 0, 3},
{4, 1, 0}, {5, 1, 1}, {6, 1, 2}, {7, 1, 3},
{8, 2, 0}, {9, 2, 1}, {10, 2, 2}, {11, 2, 3},
{0,0,0}
};
-#define RLE_ESCAPE 102
-
struct rle_params
-{
- int index;
- int last;
- int run;
- int level;
-} rle_params[] =
+ rle_params[] =
{{0,0,0,1}, {1,0,0,2}, {2,0,0,3}, {3,0,0,4}, {4,0,0,5}, {5,0,0,6}, {6,0,0,7},
{7,0,0,8}, {8,0,0,9}, {9,0,0,10}, {10,0,0,11}, {11,0,0,12}, {12,0,1,1}, {13,0,1,2},
{14,0,1,3}, {15,0,1,4}, {16,0,1,5}, {17,0,1,6}, {18,0,2,1}, {19,0,2,2}, {20,0,2,3}, {21,0,2,4},