libavcodec/vp56data.c
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2006  Aurelien Jacobs <aurel@gnuage.org>
00003  *
00004  * This file is part of FFmpeg.
00005  *
00006  * FFmpeg is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * FFmpeg is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with FFmpeg; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00019  */
00020 
00026 #include "vp56data.h"
00027 
00028 const uint8_t vp56_b2p[]   = { 0, 0, 0, 0, 1, 2, 3, 3, 3, 3 };
00029 const uint8_t vp56_b6to4[] = { 0, 0, 1, 1, 2, 3 };
00030 
00031 const uint8_t vp56_coeff_parse_table[6][11] = {
00032     { 159,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0 },
00033     { 145, 165,   0,   0,   0,   0,   0,   0,   0,   0,   0 },
00034     { 140, 148, 173,   0,   0,   0,   0,   0,   0,   0,   0 },
00035     { 135, 140, 155, 176,   0,   0,   0,   0,   0,   0,   0 },
00036     { 130, 134, 141, 157, 180,   0,   0,   0,   0,   0,   0 },
00037     { 129, 130, 133, 140, 153, 177, 196, 230, 243, 254, 254 },
00038 };
00039 
00040 const uint8_t vp56_def_mb_types_stats[3][10][2] = {
00041     { {  69, 42 }, {   1,  2 }, {  1,   7 }, {  44, 42 }, {  6, 22 },
00042       {   1,  3 }, {   0,  2 }, {  1,   5 }, {   0,  1 }, {  0,  0 }, },
00043     { { 229,  8 }, {   1,  1 }, {  0,   8 }, {   0,  0 }, {  0,  0 },
00044       {   1,  2 }, {   0,  1 }, {  0,   0 }, {   1,  1 }, {  0,  0 }, },
00045     { { 122, 35 }, {   1,  1 }, {  1,   6 }, {  46, 34 }, {  0,  0 },
00046       {   1,  2 }, {   0,  1 }, {  0,   1 }, {   1,  1 }, {  0,  0 }, },
00047 };
00048 
00049 const VP56Tree vp56_pva_tree[] = {
00050     { 8, 0},
00051     { 4, 1},
00052     { 2, 2}, {-0}, {-1},
00053     { 2, 3}, {-2}, {-3},
00054     { 4, 4},
00055     { 2, 5}, {-4}, {-5},
00056     { 2, 6}, {-6}, {-7},
00057 };
00058 
00059 const VP56Tree vp56_pc_tree[] = {
00060     { 4, 6},
00061     { 2, 7}, {-0}, {-1},
00062     { 4, 8},
00063     { 2, 9}, {-2}, {-3},
00064     { 2,10}, {-4}, {-5},
00065 };
00066 
00067 const uint8_t vp56_coeff_bias[] = { 0, 1, 2, 3, 4, 5, 7, 11, 19, 35, 67 };
00068 const uint8_t vp56_coeff_bit_length[] = { 0, 1, 2, 3, 4, 10 };