vcodec/vp8data: Move ff_vp8_dct_cat_prob to vp8data.c

Avoid compiling error if included by multiple sources.

Signed-off-by: Jianhui Dai <jianhui.j.dai@intel.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
Dai, Jianhui J 2023-05-09 05:28:26 +00:00 committed by Ronald S. Bultje
parent 5ce76506de
commit a4abe37fb5
3 changed files with 45 additions and 21 deletions

View File

@ -762,8 +762,8 @@ OBJS-$(CONFIG_VP3_DECODER) += vp3.o jpegquanttables.o
OBJS-$(CONFIG_VP5_DECODER) += vp5.o vp56.o vp56data.o vpx_rac.o
OBJS-$(CONFIG_VP6_DECODER) += vp6.o vp56.o vp56data.o \
vp6dsp.o vpx_rac.o
OBJS-$(CONFIG_VP7_DECODER) += vp8.o vpx_rac.o
OBJS-$(CONFIG_VP8_DECODER) += vp8.o vpx_rac.o
OBJS-$(CONFIG_VP7_DECODER) += vp8.o vp8data.o vpx_rac.o
OBJS-$(CONFIG_VP8_DECODER) += vp8.o vp8data.o vpx_rac.o
OBJS-$(CONFIG_VP8_CUVID_DECODER) += cuviddec.o
OBJS-$(CONFIG_VP8_MEDIACODEC_DECODER) += mediacodecdec.o
OBJS-$(CONFIG_VP8_QSV_DECODER) += qsvdec.o

42
libavcodec/vp8data.c Normal file
View File

@ -0,0 +1,42 @@
/*
* This file is part of FFmpeg.
*
* FFmpeg 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,
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "stdint.h"
// cat 1 and 2 are defined in vp8data.h
static const uint8_t vp8_dct_cat3_prob[] = {
173, 148, 140, 0
};
static const uint8_t vp8_dct_cat4_prob[] = {
176, 155, 140, 135, 0
};
static const uint8_t vp8_dct_cat5_prob[] = {
180, 157, 141, 134, 130, 0
};
static const uint8_t vp8_dct_cat6_prob[] = {
254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0
};
// only used for cat3 and above; cat 1 and 2 are referenced directly.
const uint8_t *const ff_vp8_dct_cat_prob[] = {
vp8_dct_cat3_prob,
vp8_dct_cat4_prob,
vp8_dct_cat5_prob,
vp8_dct_cat6_prob,
};

View File

@ -339,26 +339,8 @@ static const uint8_t vp8_dct_cat1_prob[] = {
static const uint8_t vp8_dct_cat2_prob[] = {
165, 145, 0
};
static const uint8_t vp8_dct_cat3_prob[] = {
173, 148, 140, 0
};
static const uint8_t vp8_dct_cat4_prob[] = {
176, 155, 140, 135, 0
};
static const uint8_t vp8_dct_cat5_prob[] = {
180, 157, 141, 134, 130, 0
};
static const uint8_t vp8_dct_cat6_prob[] = {
254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0
};
// only used for cat3 and above; cat 1 and 2 are referenced directly
const uint8_t *const ff_vp8_dct_cat_prob[] = {
vp8_dct_cat3_prob,
vp8_dct_cat4_prob,
vp8_dct_cat5_prob,
vp8_dct_cat6_prob,
};
extern const uint8_t *const ff_vp8_dct_cat_prob[];
static const uint8_t vp8_token_default_probs[4][8][3][NUM_DCT_TOKENS - 1] = {
{