diff options
author | Mans Rullgard <mans@mansr.com> | 2012-08-26 09:59:41 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2012-08-26 14:03:56 +0200 |
commit | 88386feefd52f3d4292b9be26d299e1bb74ef703 (patch) | |
tree | 623fbfa6644b8ee6d6f6929c38ec77546a2c29e8 /libavcodec | |
parent | a6d9f9e60e090d3ef1be6c8497d3f5eaa7bd4e2e (diff) | |
download | ffmpeg-streaming-88386feefd52f3d4292b9be26d299e1bb74ef703.zip ffmpeg-streaming-88386feefd52f3d4292b9be26d299e1bb74ef703.tar.gz |
cavs: convert cavsdata.h to a .c file
Defining tables in header files is ugly and prone to duplication.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/Makefile | 2 | ||||
-rw-r--r-- | libavcodec/cavs.c | 1 | ||||
-rw-r--r-- | libavcodec/cavsdata.c | 62 |
3 files changed, 63 insertions, 2 deletions
diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 5219a00..394966e 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -117,7 +117,7 @@ OBJS-$(CONFIG_BMV_VIDEO_DECODER) += bmv.o OBJS-$(CONFIG_BMV_AUDIO_DECODER) += bmv.o OBJS-$(CONFIG_C93_DECODER) += c93.o OBJS-$(CONFIG_CAVS_DECODER) += cavs.o cavsdec.o cavsdsp.o \ - mpeg12data.o + cavsdata.o mpeg12data.o OBJS-$(CONFIG_CDGRAPHICS_DECODER) += cdgraphics.o OBJS-$(CONFIG_CDXL_DECODER) += cdxl.o OBJS-$(CONFIG_CINEPAK_DECODER) += cinepak.o diff --git a/libavcodec/cavs.c b/libavcodec/cavs.c index 1188974..02d572e 100644 --- a/libavcodec/cavs.c +++ b/libavcodec/cavs.c @@ -30,7 +30,6 @@ #include "golomb.h" #include "mathops.h" #include "cavs.h" -#include "cavsdata.h" static const uint8_t alpha_tab[64] = { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, diff --git a/libavcodec/cavsdata.c b/libavcodec/cavsdata.c new file mode 100644 index 0000000..4e4a131 --- /dev/null +++ b/libavcodec/cavsdata.c @@ -0,0 +1,62 @@ +/* + * Chinese AVS video (AVS1-P2, JiZhun profile) decoder. + * Copyright (c) 2006 Stefan Gehrer <stefan.gehrer@gmx.de> + * + * This file is part of Libav. + * + * 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. + * + * 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 Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "cavs.h" + +const uint8_t ff_cavs_partition_flags[30] = { + 0, //I_8X8 + 0, //P_SKIP + 0, //P_16X16 + SPLITH, //P_16X8 + SPLITV, //P_8X16 + SPLITH|SPLITV, //P_8X8 + SPLITH|SPLITV, //B_SKIP + SPLITH|SPLITV, //B_DIRECT + 0, //B_FWD_16X16 + 0, //B_BWD_16X16 + 0, //B_SYM_16X16 + FWD0|FWD1 |SPLITH, + FWD0|FWD1 |SPLITV, + BWD0|BWD1 |SPLITH, + BWD0|BWD1 |SPLITV, + FWD0|BWD1 |SPLITH, + FWD0|BWD1 |SPLITV, + BWD0|FWD1 |SPLITH, + BWD0|FWD1 |SPLITV, + FWD0|FWD1 |SYM1|SPLITH, + FWD0|FWD1 |SYM1 |SPLITV, + BWD0|FWD1 |SYM1|SPLITH, + BWD0|FWD1 |SYM1 |SPLITV, + FWD0|FWD1|SYM0 |SPLITH, + FWD0|FWD1|SYM0 |SPLITV, + FWD0|BWD1|SYM0 |SPLITH, + FWD0|BWD1|SYM0 |SPLITV, + FWD0|FWD1|SYM0|SYM1|SPLITH, + FWD0|FWD1|SYM0|SYM1 |SPLITV, + SPLITH|SPLITV, //B_8X8 = 29 +}; + +/** mark block as "no prediction from this direction" + e.g. forward motion vector in BWD partition */ +const cavs_vector ff_cavs_dir_mv = {0,0,1,REF_DIR}; + +/** mark block as using intra prediction */ +const cavs_vector ff_cavs_intra_mv = {0,0,1,REF_INTRA}; |