Commit 6e16398a authored by Vitor Sessak's avatar Vitor Sessak

Make dc_lum_vlc and dc_chroma_vlc non-static symbols,

this fixed the decoding of version 3 PSX MDEC files.

Originally committed as revision 26230 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent ab043374
...@@ -137,6 +137,9 @@ void ff_mpeg1_clean_buffers(MpegEncContext *s){ ...@@ -137,6 +137,9 @@ void ff_mpeg1_clean_buffers(MpegEncContext *s){
/******************************************/ /******************************************/
/* decoding */ /* decoding */
VLC ff_dc_lum_vlc;
VLC ff_dc_chroma_vlc;
static VLC mv_vlc; static VLC mv_vlc;
static VLC mbincr_vlc; static VLC mbincr_vlc;
static VLC mb_ptype_vlc; static VLC mb_ptype_vlc;
...@@ -150,10 +153,10 @@ av_cold void ff_mpeg12_init_vlcs(void) ...@@ -150,10 +153,10 @@ av_cold void ff_mpeg12_init_vlcs(void)
if (!done) { if (!done) {
done = 1; done = 1;
INIT_VLC_STATIC(&dc_lum_vlc, DC_VLC_BITS, 12, INIT_VLC_STATIC(&ff_dc_lum_vlc, DC_VLC_BITS, 12,
ff_mpeg12_vlc_dc_lum_bits, 1, 1, ff_mpeg12_vlc_dc_lum_bits, 1, 1,
ff_mpeg12_vlc_dc_lum_code, 2, 2, 512); ff_mpeg12_vlc_dc_lum_code, 2, 2, 512);
INIT_VLC_STATIC(&dc_chroma_vlc, DC_VLC_BITS, 12, INIT_VLC_STATIC(&ff_dc_chroma_vlc, DC_VLC_BITS, 12,
ff_mpeg12_vlc_dc_chroma_bits, 1, 1, ff_mpeg12_vlc_dc_chroma_bits, 1, 1,
ff_mpeg12_vlc_dc_chroma_code, 2, 2, 514); ff_mpeg12_vlc_dc_chroma_code, 2, 2, 514);
INIT_VLC_STATIC(&mv_vlc, MV_VLC_BITS, 17, INIT_VLC_STATIC(&mv_vlc, MV_VLC_BITS, 17,
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
#define DC_VLC_BITS 9 #define DC_VLC_BITS 9
#define TEX_VLC_BITS 9 #define TEX_VLC_BITS 9
static VLC dc_lum_vlc; extern VLC ff_dc_lum_vlc;
static VLC dc_chroma_vlc; extern VLC ff_dc_chroma_vlc;
extern uint8_t ff_mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3]; extern uint8_t ff_mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3];
...@@ -40,9 +40,9 @@ static inline int decode_dc(GetBitContext *gb, int component) ...@@ -40,9 +40,9 @@ static inline int decode_dc(GetBitContext *gb, int component)
int code, diff; int code, diff;
if (component == 0) { if (component == 0) {
code = get_vlc2(gb, dc_lum_vlc.table, DC_VLC_BITS, 2); code = get_vlc2(gb, ff_dc_lum_vlc.table, DC_VLC_BITS, 2);
} else { } else {
code = get_vlc2(gb, dc_chroma_vlc.table, DC_VLC_BITS, 2); code = get_vlc2(gb, ff_dc_chroma_vlc.table, DC_VLC_BITS, 2);
} }
if (code < 0){ if (code < 0){
av_log(NULL, AV_LOG_ERROR, "invalid dc code at\n"); av_log(NULL, AV_LOG_ERROR, "invalid dc code at\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment