From f9f8491ddf6da460f677f874c3d4683463b315aa Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 28 Jun 2014 19:06:32 +0200 Subject: [PATCH] avcodec/cavs: make cavs_chroma_qp non static The table is needed by multiple files Reverts part of ef07ac1e126b95ad7e1b56504c19b59901265c3e Signed-off-by: Michael Niedermayer --- libavcodec/cavs.h | 1 + libavcodec/cavsdata.c | 7 +++++++ libavcodec/cavsdec.c | 11 ++--------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h index 5569d822d9..37fa4d2155 100644 --- a/libavcodec/cavs.h +++ b/libavcodec/cavs.h @@ -242,6 +242,7 @@ typedef struct AVSContext { int16_t *block; } AVSContext; +extern const uint8_t ff_cavs_chroma_qp[64]; extern const uint8_t ff_cavs_partition_flags[30]; extern const cavs_vector ff_cavs_intra_mv; extern const cavs_vector ff_cavs_dir_mv; diff --git a/libavcodec/cavsdata.c b/libavcodec/cavsdata.c index 905a306efb..2835a4be09 100644 --- a/libavcodec/cavsdata.c +++ b/libavcodec/cavsdata.c @@ -54,6 +54,13 @@ const uint8_t ff_cavs_partition_flags[30] = { SPLITH|SPLITV, //B_8X8 = 29 }; +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 +}; + /** 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}; diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 122deeb39b..34b65e6890 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -52,13 +52,6 @@ static const uint8_t cbp_tab[64][2] = { static const uint8_t scan3x3[4] = { 4, 5, 7, 8 }; -static const uint8_t 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] = { 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, @@ -598,10 +591,10 @@ static inline void decode_residual_chroma(AVSContext *h) { if (h->cbp & (1 << 4)) decode_residual_block(h, &h->gb, chroma_dec, 0, - cavs_chroma_qp[h->qp], h->cu, h->c_stride); + ff_cavs_chroma_qp[h->qp], h->cu, h->c_stride); if (h->cbp & (1 << 5)) decode_residual_block(h, &h->gb, chroma_dec, 0, - cavs_chroma_qp[h->qp], h->cv, h->c_stride); + ff_cavs_chroma_qp[h->qp], h->cv, h->c_stride); } static inline int decode_residual_inter(AVSContext *h)