00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00027 #include "avcodec.h"
00028 #include "dvdata.h"
00029
00030
00031 const uint8_t ff_dv_quant_shifts[22][4] = {
00032 { 3,3,4,4 },
00033 { 3,3,4,4 },
00034 { 2,3,3,4 },
00035 { 2,3,3,4 },
00036 { 2,2,3,3 },
00037 { 2,2,3,3 },
00038 { 1,2,2,3 },
00039 { 1,2,2,3 },
00040 { 1,1,2,2 },
00041 { 1,1,2,2 },
00042 { 0,1,1,2 },
00043 { 0,1,1,2 },
00044 { 0,0,1,1 },
00045 { 0,0,1,1 },
00046 { 0,0,0,1 },
00047 { 0,0,0,0 },
00048 { 0,0,0,0 },
00049 { 0,0,0,0 },
00050 { 0,0,0,0 },
00051 { 0,0,0,0 },
00052 { 0,0,0,0 },
00053 { 0,0,0,0 },
00054 };
00055
00056 const uint8_t ff_dv_quant_offset[4] = { 6, 3, 0, 1 };
00057
00058 const int ff_dv_iweight_88[64] = {
00059 32768, 16710, 16710, 17735, 17015, 17735, 18197, 18079,
00060 18079, 18197, 18725, 18559, 19196, 18559, 18725, 19284,
00061 19108, 19692, 19692, 19108, 19284, 21400, 19645, 20262,
00062 20214, 20262, 19645, 21400, 22733, 21845, 20867, 20815,
00063 20815, 20867, 21845, 22733, 23173, 23173, 21400, 21400,
00064 21400, 23173, 23173, 24600, 23764, 22017, 22017, 23764,
00065 24600, 25267, 24457, 22672, 24457, 25267, 25971, 25191,
00066 25191, 25971, 26715, 27962, 26715, 29642, 29642, 31536,
00067 };
00068 const int ff_dv_iweight_248[64] = {
00069 32768, 17735, 16710, 18079, 18725, 21400, 17735, 19196,
00070 19108, 21845, 16384, 17735, 18725, 21400, 16710, 18079,
00071 20262, 23173, 18197, 19692, 18725, 20262, 20815, 23764,
00072 17735, 19196, 19108, 21845, 20262, 23173, 18197, 19692,
00073 21400, 24457, 19284, 20867, 21400, 23173, 22017, 25191,
00074 18725, 20262, 20815, 23764, 21400, 24457, 19284, 20867,
00075 24457, 27962, 22733, 24600, 25971, 29642, 21400, 23173,
00076 22017, 25191, 24457, 27962, 22733, 24600, 25971, 29642,
00077 };
00078
00082 const int ff_dv_iweight_1080_y[64] = {
00083 128, 16, 16, 17, 17, 17, 18, 18,
00084 18, 18, 18, 18, 19, 18, 18, 19,
00085 19, 19, 19, 19, 19, 42, 38, 40,
00086 40, 40, 38, 42, 44, 43, 41, 41,
00087 41, 41, 43, 44, 45, 45, 42, 42,
00088 42, 45, 45, 48, 46, 43, 43, 46,
00089 48, 49, 48, 44, 48, 49, 101, 98,
00090 98, 101, 104, 109, 104, 116, 116, 123,
00091 };
00092 const int ff_dv_iweight_1080_c[64] = {
00093 128, 16, 16, 17, 17, 17, 25, 25,
00094 25, 25, 26, 25, 26, 25, 26, 26,
00095 26, 27, 27, 26, 26, 42, 38, 40,
00096 40, 40, 38, 42, 44, 43, 41, 41,
00097 41, 41, 43, 44, 91, 91, 84, 84,
00098 84, 91, 91, 96, 93, 86, 86, 93,
00099 96, 197, 191, 177, 191, 197, 203, 197,
00100 197, 203, 209, 219, 209, 232, 232, 246,
00101 };
00102 const int ff_dv_iweight_720_y[64] = {
00103 128, 16, 16, 17, 17, 17, 18, 18,
00104 18, 18, 18, 18, 19, 18, 18, 19,
00105 19, 19, 19, 19, 19, 42, 38, 40,
00106 40, 40, 38, 42, 44, 43, 41, 41,
00107 41, 41, 43, 44, 68, 68, 63, 63,
00108 63, 68, 68, 96, 92, 86, 86, 92,
00109 96, 98, 96, 88, 96, 98, 202, 196,
00110 196, 202, 208, 218, 208, 232, 232, 246,
00111 };
00112 const int ff_dv_iweight_720_c[64] = {
00113 128, 24, 24, 26, 26, 26, 36, 36,
00114 36, 36, 36, 36, 38, 36, 36, 38,
00115 38, 38, 38, 38, 38, 84, 76, 80,
00116 80, 80, 76, 84, 88, 86, 82, 82,
00117 82, 82, 86, 88, 182, 182, 168, 168,
00118 168, 182, 182, 192, 186, 192, 172, 186,
00119 192, 394, 382, 354, 382, 394, 406, 394,
00120 394, 406, 418, 438, 418, 464, 464, 492,
00121 };
00122