* Chinese AVS video (AVS1-P2, JiZhun profile) decoder.
* Copyright (c) 2006 Stefan Gehrer <stefan.gehrer@gmx.de>
*
- * This file is part of FFmpeg.
+ * This file is part of Libav.
*
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav 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,
+ * Libav 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
+ * License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "cavs.h"
-static const uint8_t partition_flags[30] = {
+const uint8_t ff_cavs_partition_flags[30] = {
0, //I_8X8
0, //P_SKIP
0, //P_16X16
SPLITH|SPLITV, //B_8X8 = 29
};
-static const uint8_t scan3x3[4] = {4,5,7,8};
+const uint8_t ff_cavs_scan3x3[4] = {4,5,7,8};
-static const uint8_t mv_scan[4] = {
- MV_FWD_X0,MV_FWD_X1,
- MV_FWD_X2,MV_FWD_X3
-};
-
-static const uint8_t cbp_tab[64][2] = {
- {63, 0},{15,15},{31,63},{47,31},{ 0,16},{14,32},{13,47},{11,13},
- { 7,14},{ 5,11},{10,12},{ 8, 5},{12,10},{61, 7},{ 4,48},{55, 3},
- { 1, 2},{ 2, 8},{59, 4},{ 3, 1},{62,61},{ 9,55},{ 6,59},{29,62},
- {45,29},{51,27},{23,23},{39,19},{27,30},{46,28},{53, 9},{30, 6},
- {43,60},{37,21},{60,44},{16,26},{21,51},{28,35},{19,18},{35,20},
- {42,24},{26,53},{44,17},{32,37},{58,39},{24,45},{20,58},{17,43},
- {18,42},{48,46},{22,36},{33,33},{25,34},{49,40},{40,52},{36,49},
- {34,50},{50,56},{52,25},{54,22},{41,54},{56,57},{38,41},{57,38}
-};
-
-static const uint8_t chroma_qp[64] = {
+const uint8_t ff_cavs_chroma_qp[64] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,
16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
32,33,34,35,36,37,38,39,40,41,42,42,43,43,44,44,
45,45,46,46,47,47,48,48,48,49,49,49,50,50,50,51
};
-static const uint8_t dequant_shift[64] = {
+const uint8_t ff_cavs_dequant_shift[64] = {
14,14,14,14,14,14,14,14,
13,13,13,13,13,13,13,13,
13,12,12,12,12,12,12,12,
7, 7, 7, 7, 7, 7, 7, 7
};
-static const uint16_t dequant_mul[64] = {
+const uint16_t ff_cavs_dequant_mul[64] = {
32768,36061,38968,42495,46341,50535,55437,60424,
32932,35734,38968,42495,46177,50535,55109,59933,
65535,35734,38968,42577,46341,50617,55027,60097,
32771,35734,38965,42497,46341,50535,55109,60099
};
-/** marks block as unavailable, i.e. out of picture
+/** mark block as unavailable, i.e. out of picture
or not yet decoded */
-const vector_t ff_cavs_un_mv = {0,0,1,NOT_AVAIL};
+const cavs_vector ff_cavs_un_mv = {0,0,1,NOT_AVAIL};
-/** marks block as "no prediction from this direction"
+/** mark block as "no prediction from this direction"
e.g. forward motion vector in BWD partition */
-const vector_t ff_cavs_dir_mv = {0,0,1,REF_DIR};
+const cavs_vector ff_cavs_dir_mv = {0,0,1,REF_DIR};
-/** marks block as using intra prediction */
-const vector_t ff_cavs_intra_mv = {0,0,1,REF_INTRA};
+/** mark block as using intra prediction */
+const cavs_vector ff_cavs_intra_mv = {0,0,1,REF_INTRA};
#define EOB 0,0,0
-static const residual_vlc_t intra_2dvlc[7] = {
+const struct dec_2dvlc ff_cavs_intra_dec[7] = {
{
{ //level / run / table_inc
{ 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1},
}
};
-static const residual_vlc_t inter_2dvlc[7] = {
+const struct dec_2dvlc ff_cavs_inter_dec[7] = {
{
{ //level / run
{ 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1},
}
};
-static const residual_vlc_t chroma_2dvlc[5] = {
+const struct dec_2dvlc ff_cavs_chroma_dec[5] = {
{
{ //level / run
{ 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1},
5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9
};
-static const int_fast8_t left_modifier_l[8] = { 0,-1, 6,-1,-1, 7, 6, 7};
-static const int_fast8_t top_modifier_l[8] = {-1, 1, 5,-1,-1, 5, 7, 7};
-static const int_fast8_t left_modifier_c[7] = { 5,-1, 2,-1, 6, 5, 6};
-static const int_fast8_t top_modifier_c[7] = { 4, 1,-1,-1, 4, 6, 6};
+const int8_t ff_left_modifier_l[8] = { 0, -1, 6, -1, -1, 7, 6, 7 };
+const int8_t ff_top_modifier_l[8] = { -1, 1, 5, -1, -1, 5, 7, 7 };
+const int8_t ff_left_modifier_c[7] = { 5, -1, 2, -1, 6, 5, 6 };
+const int8_t ff_top_modifier_c[7] = { 4, 1, -1, -1, 4, 6, 6 };
-#endif // AVCODEC_CAVSDATA_H
+#endif /* AVCODEC_CAVSDATA_H */