Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
external
ffmpeg
Commits
e96b4a53
Commit
e96b4a53
authored
Feb 09, 2012
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlc/rl: Add ff_ prefix to the nonstatic symbols
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
ddce8953
Changes
36
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
107 additions
and
107 deletions
+107
-107
libavcodec/4xm.c
libavcodec/4xm.c
+1
-1
libavcodec/bitstream.c
libavcodec/bitstream.c
+3
-3
libavcodec/cook.c
libavcodec/cook.c
+3
-3
libavcodec/dnxhddec.c
libavcodec/dnxhddec.c
+6
-6
libavcodec/dv.c
libavcodec/dv.c
+1
-1
libavcodec/faxcompr.c
libavcodec/faxcompr.c
+5
-5
libavcodec/fraps.c
libavcodec/fraps.c
+2
-2
libavcodec/get_bits.h
libavcodec/get_bits.h
+6
-6
libavcodec/h261dec.c
libavcodec/h261dec.c
+1
-1
libavcodec/h261enc.c
libavcodec/h261enc.c
+1
-1
libavcodec/huffman.c
libavcodec/huffman.c
+1
-1
libavcodec/huffyuv.c
libavcodec/huffyuv.c
+6
-6
libavcodec/indeo5.c
libavcodec/indeo5.c
+1
-1
libavcodec/ituh263dec.c
libavcodec/ituh263dec.c
+2
-2
libavcodec/ituh263enc.c
libavcodec/ituh263enc.c
+2
-2
libavcodec/ivi_common.c
libavcodec/ivi_common.c
+2
-2
libavcodec/mimic.c
libavcodec/mimic.c
+1
-1
libavcodec/mjpegdec.c
libavcodec/mjpegdec.c
+5
-5
libavcodec/motionpixels.c
libavcodec/motionpixels.c
+1
-1
libavcodec/mpc8.c
libavcodec/mpc8.c
+2
-2
libavcodec/mpeg12.c
libavcodec/mpeg12.c
+2
-2
libavcodec/mpeg12enc.c
libavcodec/mpeg12enc.c
+2
-2
libavcodec/mpeg4videodec.c
libavcodec/mpeg4videodec.c
+3
-3
libavcodec/mpeg4videoenc.c
libavcodec/mpeg4videoenc.c
+1
-1
libavcodec/mpegvideo.c
libavcodec/mpegvideo.c
+3
-3
libavcodec/msmpeg4.c
libavcodec/msmpeg4.c
+2
-2
libavcodec/rl.h
libavcodec/rl.h
+3
-3
libavcodec/rv34.c
libavcodec/rv34.c
+4
-4
libavcodec/rv40.c
libavcodec/rv40.c
+8
-8
libavcodec/smacker.c
libavcodec/smacker.c
+3
-3
libavcodec/truemotion2.c
libavcodec/truemotion2.c
+1
-1
libavcodec/utvideo.c
libavcodec/utvideo.c
+6
-6
libavcodec/vorbisdec.c
libavcodec/vorbisdec.c
+1
-1
libavcodec/vp3.c
libavcodec/vp3.c
+9
-9
libavcodec/vp6.c
libavcodec/vp6.c
+4
-4
libavcodec/wma.c
libavcodec/wma.c
+3
-3
No files found.
libavcodec/4xm.c
View file @
e96b4a53
...
...
@@ -918,7 +918,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
av_freep
(
&
f
->
cfrm
[
i
].
data
);
f
->
cfrm
[
i
].
allocated_size
=
0
;
}
free_vlc
(
&
f
->
pre_vlc
);
ff_
free_vlc
(
&
f
->
pre_vlc
);
if
(
f
->
current_picture
.
data
[
0
])
avctx
->
release_buffer
(
avctx
,
&
f
->
current_picture
);
if
(
f
->
last_picture
.
data
[
0
])
...
...
libavcodec/bitstream.c
View file @
e96b4a53
...
...
@@ -253,9 +253,9 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
(byte/word/long) to store the 'bits', 'codes', and 'symbols' tables.
'use_static' should be set to 1 for tables, which should be freed
with av_free_static(), 0 if free_vlc() will be used.
with av_free_static(), 0 if
ff_
free_vlc() will be used.
*/
int
init_vlc_sparse
(
VLC
*
vlc
,
int
nb_bits
,
int
nb_codes
,
int
ff_
init_vlc_sparse
(
VLC
*
vlc
,
int
nb_bits
,
int
nb_codes
,
const
void
*
bits
,
int
bits_wrap
,
int
bits_size
,
const
void
*
codes
,
int
codes_wrap
,
int
codes_size
,
const
void
*
symbols
,
int
symbols_wrap
,
int
symbols_size
,
...
...
@@ -318,7 +318,7 @@ int init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
}
void
free_vlc
(
VLC
*
vlc
)
void
ff_
free_vlc
(
VLC
*
vlc
)
{
av_freep
(
&
vlc
->
table
);
}
libavcodec/cook.c
View file @
e96b4a53
...
...
@@ -321,11 +321,11 @@ static av_cold int cook_decode_close(AVCodecContext *avctx)
/* Free the VLC tables. */
for
(
i
=
0
;
i
<
13
;
i
++
)
free_vlc
(
&
q
->
envelope_quant_index
[
i
]);
ff_
free_vlc
(
&
q
->
envelope_quant_index
[
i
]);
for
(
i
=
0
;
i
<
7
;
i
++
)
free_vlc
(
&
q
->
sqvh
[
i
]);
ff_
free_vlc
(
&
q
->
sqvh
[
i
]);
for
(
i
=
0
;
i
<
q
->
num_subpackets
;
i
++
)
free_vlc
(
&
q
->
subpacket
[
i
].
ccpl
);
ff_
free_vlc
(
&
q
->
subpacket
[
i
].
ccpl
);
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Memory deallocated.
\n
"
);
...
...
libavcodec/dnxhddec.c
View file @
e96b4a53
...
...
@@ -79,9 +79,9 @@ static int dnxhd_init_vlc(DNXHDContext *ctx, int cid)
}
ctx
->
cid_table
=
&
ff_dnxhd_cid_table
[
index
];
free_vlc
(
&
ctx
->
ac_vlc
);
free_vlc
(
&
ctx
->
dc_vlc
);
free_vlc
(
&
ctx
->
run_vlc
);
ff_
free_vlc
(
&
ctx
->
ac_vlc
);
ff_
free_vlc
(
&
ctx
->
dc_vlc
);
ff_
free_vlc
(
&
ctx
->
run_vlc
);
init_vlc
(
&
ctx
->
ac_vlc
,
DNXHD_VLC_BITS
,
257
,
ctx
->
cid_table
->
ac_bits
,
1
,
1
,
...
...
@@ -391,9 +391,9 @@ static av_cold int dnxhd_decode_close(AVCodecContext *avctx)
if
(
ctx
->
picture
.
data
[
0
])
avctx
->
release_buffer
(
avctx
,
&
ctx
->
picture
);
free_vlc
(
&
ctx
->
ac_vlc
);
free_vlc
(
&
ctx
->
dc_vlc
);
free_vlc
(
&
ctx
->
run_vlc
);
ff_
free_vlc
(
&
ctx
->
ac_vlc
);
ff_
free_vlc
(
&
ctx
->
dc_vlc
);
ff_
free_vlc
(
&
ctx
->
run_vlc
);
return
0
;
}
...
...
libavcodec/dv.c
View file @
e96b4a53
...
...
@@ -313,7 +313,7 @@ static av_cold int dvvideo_init(AVCodecContext *avctx)
dv_rl_vlc
[
i
].
level
=
level
;
dv_rl_vlc
[
i
].
run
=
run
;
}
free_vlc
(
&
dv_vlc
);
ff_
free_vlc
(
&
dv_vlc
);
dv_vlc_map_tableinit
();
}
...
...
libavcodec/faxcompr.c
View file @
e96b4a53
...
...
@@ -110,11 +110,11 @@ av_cold void ff_ccitt_unpack_init(void)
ccitt_vlc
[
1
].
table
=
code_table2
;
ccitt_vlc
[
1
].
table_allocated
=
648
;
for
(
i
=
0
;
i
<
2
;
i
++
){
init_vlc_sparse
(
&
ccitt_vlc
[
i
],
9
,
CCITT_SYMS
,
ccitt_codes_lens
[
i
],
1
,
1
,
ccitt_codes_bits
[
i
],
1
,
1
,
ccitt_syms
,
2
,
2
,
INIT_VLC_USE_NEW_STATIC
);
ff_
init_vlc_sparse
(
&
ccitt_vlc
[
i
],
9
,
CCITT_SYMS
,
ccitt_codes_lens
[
i
],
1
,
1
,
ccitt_codes_bits
[
i
],
1
,
1
,
ccitt_syms
,
2
,
2
,
INIT_VLC_USE_NEW_STATIC
);
}
INIT_VLC_STATIC
(
&
ccitt_group3_2d_vlc
,
9
,
11
,
ccitt_group3_2d_lens
,
1
,
1
,
...
...
libavcodec/fraps.c
View file @
e96b4a53
...
...
@@ -113,13 +113,13 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
if
(
j
)
dst
[
i
]
+=
dst
[
i
-
stride
];
else
if
(
Uoff
)
dst
[
i
]
+=
0x80
;
if
(
get_bits_left
(
&
gb
)
<
0
)
{
free_vlc
(
&
vlc
);
ff_
free_vlc
(
&
vlc
);
return
AVERROR_INVALIDDATA
;
}
}
dst
+=
stride
;
}
free_vlc
(
&
vlc
);
ff_
free_vlc
(
&
vlc
);
return
0
;
}
...
...
libavcodec/get_bits.h
View file @
e96b4a53
...
...
@@ -364,19 +364,19 @@ static inline void align_get_bits(GetBitContext *s)
bits, bits_wrap, bits_size, \
codes, codes_wrap, codes_size, \
flags) \
init_vlc_sparse(vlc, nb_bits, nb_codes, \
bits, bits_wrap, bits_size, \
codes, codes_wrap, codes_size, \
NULL, 0, 0, flags)
ff_
init_vlc_sparse(vlc, nb_bits, nb_codes, \
bits, bits_wrap, bits_size, \
codes, codes_wrap, codes_size, \
NULL, 0, 0, flags)
int
init_vlc_sparse
(
VLC
*
vlc
,
int
nb_bits
,
int
nb_codes
,
int
ff_
init_vlc_sparse
(
VLC
*
vlc
,
int
nb_bits
,
int
nb_codes
,
const
void
*
bits
,
int
bits_wrap
,
int
bits_size
,
const
void
*
codes
,
int
codes_wrap
,
int
codes_size
,
const
void
*
symbols
,
int
symbols_wrap
,
int
symbols_size
,
int
flags
);
#define INIT_VLC_LE 2
#define INIT_VLC_USE_NEW_STATIC 4
void
free_vlc
(
VLC
*
vlc
);
void
ff_
free_vlc
(
VLC
*
vlc
);
#define INIT_VLC_STATIC(vlc, bits, a,b,c,d,e,f,g, static_size) do { \
static VLC_TYPE table[static_size][2]; \
...
...
libavcodec/h261dec.c
View file @
e96b4a53
...
...
@@ -66,7 +66,7 @@ static av_cold void h261_decode_init_vlc(H261Context *h){
INIT_VLC_STATIC
(
&
h261_cbp_vlc
,
H261_CBP_VLC_BITS
,
63
,
&
h261_cbp_tab
[
0
][
1
],
2
,
1
,
&
h261_cbp_tab
[
0
][
0
],
2
,
1
,
512
);
init_rl
(
&
h261_rl_tcoeff
,
ff_h261_rl_table_store
);
ff_
init_rl
(
&
h261_rl_tcoeff
,
ff_h261_rl_table_store
);
INIT_VLC_RL
(
h261_rl_tcoeff
,
552
);
}
}
...
...
libavcodec/h261enc.c
View file @
e96b4a53
...
...
@@ -240,7 +240,7 @@ void ff_h261_encode_init(MpegEncContext *s){
if
(
!
done
)
{
done
=
1
;
init_rl
(
&
h261_rl_tcoeff
,
ff_h261_rl_table_store
);
ff_
init_rl
(
&
h261_rl_tcoeff
,
ff_h261_rl_table_store
);
}
s
->
min_qcoeff
=
-
127
;
...
...
libavcodec/huffman.c
View file @
e96b4a53
...
...
@@ -61,7 +61,7 @@ static int build_huff_tree(VLC *vlc, Node *nodes, int head, int flags)
int
pos
=
0
;
get_tree_codes
(
bits
,
lens
,
xlat
,
nodes
,
head
,
0
,
0
,
&
pos
,
no_zero_count
);
return
init_vlc_sparse
(
vlc
,
9
,
pos
,
lens
,
2
,
2
,
bits
,
4
,
4
,
xlat
,
1
,
1
,
0
);
return
ff_
init_vlc_sparse
(
vlc
,
9
,
pos
,
lens
,
2
,
2
,
bits
,
4
,
4
,
xlat
,
1
,
1
,
0
);
}
...
...
libavcodec/huffyuv.c
View file @
e96b4a53
...
...
@@ -294,8 +294,8 @@ static void generate_joint_tables(HYuvContext *s){
i
++
;
}
}
free_vlc
(
&
s
->
vlc
[
3
+
p
]);
init_vlc_sparse
(
&
s
->
vlc
[
3
+
p
],
VLC_BITS
,
i
,
len
,
1
,
1
,
bits
,
2
,
2
,
symbols
,
2
,
2
,
0
);
ff_
free_vlc
(
&
s
->
vlc
[
3
+
p
]);
ff_
init_vlc_sparse
(
&
s
->
vlc
[
3
+
p
],
VLC_BITS
,
i
,
len
,
1
,
1
,
bits
,
2
,
2
,
symbols
,
2
,
2
,
0
);
}
}
else
{
uint8_t
(
*
map
)[
4
]
=
(
uint8_t
(
*
)[
4
])
s
->
pix_bgr_map
;
...
...
@@ -335,7 +335,7 @@ static void generate_joint_tables(HYuvContext *s){
}
}
}
free_vlc
(
&
s
->
vlc
[
3
]);
ff_
free_vlc
(
&
s
->
vlc
[
3
]);
init_vlc
(
&
s
->
vlc
[
3
],
VLC_BITS
,
i
,
len
,
1
,
1
,
bits
,
2
,
2
,
0
);
}
}
...
...
@@ -352,7 +352,7 @@ static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length){
if
(
generate_bits_table
(
s
->
bits
[
i
],
s
->
len
[
i
])
<
0
){
return
-
1
;
}
free_vlc
(
&
s
->
vlc
[
i
]);
ff_
free_vlc
(
&
s
->
vlc
[
i
]);
init_vlc
(
&
s
->
vlc
[
i
],
VLC_BITS
,
256
,
s
->
len
[
i
],
1
,
1
,
s
->
bits
[
i
],
4
,
4
,
0
);
}
...
...
@@ -384,7 +384,7 @@ static int read_old_huffman_tables(HYuvContext *s){
memcpy
(
s
->
len
[
2
]
,
s
->
len
[
1
],
256
*
sizeof
(
uint8_t
));
for
(
i
=
0
;
i
<
3
;
i
++
){
free_vlc
(
&
s
->
vlc
[
i
]);
ff_
free_vlc
(
&
s
->
vlc
[
i
]);
init_vlc
(
&
s
->
vlc
[
i
],
VLC_BITS
,
256
,
s
->
len
[
i
],
1
,
1
,
s
->
bits
[
i
],
4
,
4
,
0
);
}
...
...
@@ -1218,7 +1218,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
av_freep
(
&
s
->
bitstream_buffer
);
for
(
i
=
0
;
i
<
6
;
i
++
){
free_vlc
(
&
s
->
vlc
[
i
]);
ff_
free_vlc
(
&
s
->
vlc
[
i
]);
}
return
0
;
...
...
libavcodec/indeo5.c
View file @
e96b4a53
...
...
@@ -813,7 +813,7 @@ static av_cold int decode_close(AVCodecContext *avctx)
ff_ivi_free_buffers
(
&
ctx
->
planes
[
0
]);
if
(
ctx
->
mb_vlc
.
cust_tab
.
table
)
free_vlc
(
&
ctx
->
mb_vlc
.
cust_tab
);
ff_
free_vlc
(
&
ctx
->
mb_vlc
.
cust_tab
);
if
(
ctx
->
frame
.
data
[
0
])
avctx
->
release_buffer
(
avctx
,
&
ctx
->
frame
);
...
...
libavcodec/ituh263dec.c
View file @
e96b4a53
...
...
@@ -120,8 +120,8 @@ void ff_h263_decode_init_vlc(MpegEncContext *s)
INIT_VLC_STATIC
(
&
mv_vlc
,
MV_VLC_BITS
,
33
,
&
ff_mvtab
[
0
][
1
],
2
,
1
,
&
ff_mvtab
[
0
][
0
],
2
,
1
,
538
);
init_rl
(
&
ff_h263_rl_inter
,
ff_h263_static_rl_table_store
[
0
]);
init_rl
(
&
ff_rl_intra_aic
,
ff_h263_static_rl_table_store
[
1
]);
ff_
init_rl
(
&
ff_h263_rl_inter
,
ff_h263_static_rl_table_store
[
0
]);
ff_
init_rl
(
&
ff_rl_intra_aic
,
ff_h263_static_rl_table_store
[
1
]);
INIT_VLC_RL
(
ff_h263_rl_inter
,
554
);
INIT_VLC_RL
(
ff_rl_intra_aic
,
554
);
INIT_VLC_STATIC
(
&
h263_mbtype_b_vlc
,
H263_MBTYPE_B_VLC_BITS
,
15
,
...
...
libavcodec/ituh263enc.c
View file @
e96b4a53
...
...
@@ -775,8 +775,8 @@ void ff_h263_encode_init(MpegEncContext *s)
if
(
!
done
)
{
done
=
1
;
init_rl
(
&
ff_h263_rl_inter
,
ff_h263_static_rl_table_store
[
0
]);
init_rl
(
&
ff_rl_intra_aic
,
ff_h263_static_rl_table_store
[
1
]);
ff_
init_rl
(
&
ff_h263_rl_inter
,
ff_h263_static_rl_table_store
[
0
]);
ff_
init_rl
(
&
ff_rl_intra_aic
,
ff_h263_static_rl_table_store
[
1
]);
init_uni_h263_rl_tab
(
&
ff_rl_intra_aic
,
NULL
,
uni_h263_intra_aic_rl_len
);
init_uni_h263_rl_tab
(
&
ff_h263_rl_inter
,
NULL
,
uni_h263_inter_rl_len
);
...
...
libavcodec/ivi_common.c
View file @
e96b4a53
...
...
@@ -132,7 +132,7 @@ int ff_ivi_dec_huff_desc(GetBitContext *gb, int desc_coded, int which_tab,
ff_ivi_huff_desc_copy
(
&
huff_tab
->
cust_desc
,
&
new_huff
);
if
(
huff_tab
->
cust_tab
.
table
)
free_vlc
(
&
huff_tab
->
cust_tab
);
ff_
free_vlc
(
&
huff_tab
->
cust_tab
);
result
=
ff_ivi_create_huff_from_desc
(
&
huff_tab
->
cust_desc
,
&
huff_tab
->
cust_tab
,
0
);
if
(
result
)
{
...
...
@@ -237,7 +237,7 @@ void av_cold ff_ivi_free_buffers(IVIPlaneDesc *planes)
av_freep
(
&
planes
[
p
].
bands
[
b
].
bufs
[
2
]);
if
(
planes
[
p
].
bands
[
b
].
blk_vlc
.
cust_tab
.
table
)
free_vlc
(
&
planes
[
p
].
bands
[
b
].
blk_vlc
.
cust_tab
);
ff_
free_vlc
(
&
planes
[
p
].
bands
[
b
].
blk_vlc
.
cust_tab
);
for
(
t
=
0
;
t
<
planes
[
p
].
bands
[
b
].
num_tiles
;
t
++
)
av_freep
(
&
planes
[
p
].
bands
[
b
].
tiles
[
t
].
mbs
);
av_freep
(
&
planes
[
p
].
bands
[
b
].
tiles
);
...
...
libavcodec/mimic.c
View file @
e96b4a53
...
...
@@ -412,7 +412,7 @@ static av_cold int mimic_decode_end(AVCodecContext *avctx)
for
(
i
=
0
;
i
<
16
;
i
++
)
if
(
ctx
->
buf_ptrs
[
i
].
data
[
0
])
ff_thread_release_buffer
(
avctx
,
&
ctx
->
buf_ptrs
[
i
]);
free_vlc
(
&
ctx
->
vlc
);
ff_
free_vlc
(
&
ctx
->
vlc
);
return
0
;
}
...
...
libavcodec/mjpegdec.c
View file @
e96b4a53
...
...
@@ -62,8 +62,8 @@ static int build_vlc(VLC *vlc, const uint8_t *bits_table,
if
(
is_ac
)
huff_sym
[
0
]
=
16
*
256
;
return
init_vlc_sparse
(
vlc
,
9
,
nb_codes
,
huff_size
,
1
,
1
,
huff_code
,
2
,
2
,
huff_sym
,
2
,
2
,
use_static
);
return
ff_
init_vlc_sparse
(
vlc
,
9
,
nb_codes
,
huff_size
,
1
,
1
,
huff_code
,
2
,
2
,
huff_sym
,
2
,
2
,
use_static
);
}
static
void
build_basic_mjpeg_vlc
(
MJpegDecodeContext
*
s
)
...
...
@@ -191,7 +191,7 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s)
len
-=
n
;
/* build VLC and flush previous vlc if present */
free_vlc
(
&
s
->
vlcs
[
class
][
index
]);
ff_
free_vlc
(
&
s
->
vlcs
[
class
][
index
]);
av_log
(
s
->
avctx
,
AV_LOG_DEBUG
,
"class=%d index=%d nb_codes=%d
\n
"
,
class
,
index
,
code_max
+
1
);
if
(
build_vlc
(
&
s
->
vlcs
[
class
][
index
],
bits_table
,
val_table
,
...
...
@@ -199,7 +199,7 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s)
return
-
1
;
if
(
class
>
0
)
{
free_vlc
(
&
s
->
vlcs
[
2
][
index
]);
ff_
free_vlc
(
&
s
->
vlcs
[
2
][
index
]);
if
(
build_vlc
(
&
s
->
vlcs
[
2
][
index
],
bits_table
,
val_table
,
code_max
+
1
,
0
,
0
)
<
0
)
return
-
1
;
...
...
@@ -1632,7 +1632,7 @@ av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx)
for
(
i
=
0
;
i
<
3
;
i
++
)
{
for
(
j
=
0
;
j
<
4
;
j
++
)
free_vlc
(
&
s
->
vlcs
[
i
][
j
]);
ff_
free_vlc
(
&
s
->
vlcs
[
i
][
j
]);
}
for
(
i
=
0
;
i
<
MAX_COMPONENTS
;
i
++
)
{
av_freep
(
&
s
->
blocks
[
i
]);
...
...
libavcodec/motionpixels.c
View file @
e96b4a53
...
...
@@ -286,7 +286,7 @@ static int mp_decode_frame(AVCodecContext *avctx,
if
(
init_vlc
(
&
mp
->
vlc
,
mp
->
max_codes_bits
,
mp
->
codes_count
,
&
mp
->
codes
[
0
].
size
,
sizeof
(
HuffCode
),
1
,
&
mp
->
codes
[
0
].
code
,
sizeof
(
HuffCode
),
4
,
0
))
goto
end
;
mp_decode_frame_helper
(
mp
,
&
gb
);
free_vlc
(
&
mp
->
vlc
);
ff_
free_vlc
(
&
mp
->
vlc
);
end:
*
data_size
=
sizeof
(
AVFrame
);
...
...
libavcodec/mpc8.c
View file @
e96b4a53
...
...
@@ -182,13 +182,13 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx)
q3_vlc
[
0
].
table
=
q3_0_table
;
q3_vlc
[
0
].
table_allocated
=
512
;
init_vlc_sparse
(
&
q3_vlc
[
0
],
MPC8_Q3_BITS
,
MPC8_Q3_SIZE
,
ff_
init_vlc_sparse
(
&
q3_vlc
[
0
],
MPC8_Q3_BITS
,
MPC8_Q3_SIZE
,
mpc8_q3_bits
,
1
,
1
,
mpc8_q3_codes
,
1
,
1
,
mpc8_q3_syms
,
1
,
1
,
INIT_VLC_USE_NEW_STATIC
);
q3_vlc
[
1
].
table
=
q3_1_table
;
q3_vlc
[
1
].
table_allocated
=
516
;
init_vlc_sparse
(
&
q3_vlc
[
1
],
MPC8_Q4_BITS
,
MPC8_Q4_SIZE
,
ff_
init_vlc_sparse
(
&
q3_vlc
[
1
],
MPC8_Q4_BITS
,
MPC8_Q4_SIZE
,
mpc8_q4_bits
,
1
,
1
,
mpc8_q4_codes
,
1
,
1
,
mpc8_q4_syms
,
1
,
1
,
INIT_VLC_USE_NEW_STATIC
);
...
...
libavcodec/mpeg12.c
View file @
e96b4a53
...
...
@@ -693,8 +693,8 @@ av_cold void ff_mpeg12_init_vlcs(void)
INIT_VLC_STATIC
(
&
mb_btype_vlc
,
MB_BTYPE_VLC_BITS
,
11
,
&
table_mb_btype
[
0
][
1
],
2
,
1
,
&
table_mb_btype
[
0
][
0
],
2
,
1
,
64
);
init_rl
(
&
ff_rl_mpeg1
,
ff_mpeg12_static_rl_table_store
[
0
]);
init_rl
(
&
ff_rl_mpeg2
,
ff_mpeg12_static_rl_table_store
[
1
]);
ff_
init_rl
(
&
ff_rl_mpeg1
,
ff_mpeg12_static_rl_table_store
[
0
]);
ff_
init_rl
(
&
ff_rl_mpeg2
,
ff_mpeg12_static_rl_table_store
[
1
]);
INIT_2D_VLC_RL
(
ff_rl_mpeg1
,
680
);
INIT_2D_VLC_RL
(
ff_rl_mpeg2
,
674
);
...
...
libavcodec/mpeg12enc.c
View file @
e96b4a53
...
...
@@ -715,8 +715,8 @@ void ff_mpeg1_encode_init(MpegEncContext *s)
int
i
;
done
=
1
;
init_rl
(
&
ff_rl_mpeg1
,
ff_mpeg12_static_rl_table_store
[
0
]);
init_rl
(
&
ff_rl_mpeg2
,
ff_mpeg12_static_rl_table_store
[
1
]);
ff_
init_rl
(
&
ff_rl_mpeg1
,
ff_mpeg12_static_rl_table_store
[
0
]);
ff_
init_rl
(
&
ff_rl_mpeg2
,
ff_mpeg12_static_rl_table_store
[
1
]);
for
(
i
=
0
;
i
<
64
;
i
++
)
{
...
...
libavcodec/mpeg4videodec.c
View file @
e96b4a53
...
...
@@ -2205,9 +2205,9 @@ static av_cold int decode_init(AVCodecContext *avctx)
if
(
!
done
)
{
done
=
1
;
init_rl
(
&
ff_mpeg4_rl_intra
,
ff_mpeg4_static_rl_table_store
[
0
]);
init_rl
(
&
rvlc_rl_inter
,
ff_mpeg4_static_rl_table_store
[
1
]);
init_rl
(
&
rvlc_rl_intra
,
ff_mpeg4_static_rl_table_store
[
2
]);
ff_
init_rl
(
&
ff_mpeg4_rl_intra
,
ff_mpeg4_static_rl_table_store
[
0
]);
ff_
init_rl
(
&
rvlc_rl_inter
,
ff_mpeg4_static_rl_table_store
[
1
]);
ff_
init_rl
(
&
rvlc_rl_intra
,
ff_mpeg4_static_rl_table_store
[
2
]);
INIT_VLC_RL
(
ff_mpeg4_rl_intra
,
554
);
INIT_VLC_RL
(
rvlc_rl_inter
,
1072
);
INIT_VLC_RL
(
rvlc_rl_intra
,
1072
);
...
...
libavcodec/mpeg4videoenc.c
View file @
e96b4a53
...
...
@@ -1230,7 +1230,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
init_uni_dc_tab
();
init_rl
(
&
ff_mpeg4_rl_intra
,
ff_mpeg4_static_rl_table_store
[
0
]);
ff_
init_rl
(
&
ff_mpeg4_rl_intra
,
ff_mpeg4_static_rl_table_store
[
0
]);
init_uni_mpeg4_rl_tab
(
&
ff_mpeg4_rl_intra
,
uni_mpeg4_intra_rl_bits
,
uni_mpeg4_intra_rl_len
);
init_uni_mpeg4_rl_tab
(
&
ff_h263_rl_inter
,
uni_mpeg4_inter_rl_bits
,
uni_mpeg4_inter_rl_len
);
...
...
libavcodec/mpegvideo.c
View file @
e96b4a53
...
...
@@ -1003,8 +1003,8 @@ void MPV_common_end(MpegEncContext *s)
avcodec_default_free_buffers
(
s
->
avctx
);
}
void
init_rl
(
RLTable
*
rl
,
uint8_t
static_store
[
2
][
2
*
MAX_RUN
+
MAX_LEVEL
+
3
])
void
ff_
init_rl
(
RLTable
*
rl
,
uint8_t
static_store
[
2
][
2
*
MAX_RUN
+
MAX_LEVEL
+
3
])
{
int8_t
max_level
[
MAX_RUN
+
1
],
max_run
[
MAX_LEVEL
+
1
];
uint8_t
index_run
[
MAX_RUN
+
1
];
...
...
@@ -1055,7 +1055,7 @@ void init_rl(RLTable *rl,
}
}
void
init_vlc_rl
(
RLTable
*
rl
)
void
ff_
init_vlc_rl
(
RLTable
*
rl
)
{
int
i
,
q
;
...
...
libavcodec/msmpeg4.c
View file @
e96b4a53
...
...
@@ -262,7 +262,7 @@ av_cold void ff_msmpeg4_encode_init(MpegEncContext *s)
init_mv_table
(
&
mv_tables
[
0
]);
init_mv_table
(
&
mv_tables
[
1
]);
for
(
i
=
0
;
i
<
NB_RL_TABLES
;
i
++
)
init_rl
(
&
rl_table
[
i
],
static_rl_table_store
[
i
]);
ff_
init_rl
(
&
rl_table
[
i
],
static_rl_table_store
[
i
]);
for
(
i
=
0
;
i
<
NB_RL_TABLES
;
i
++
){
int
level
;
...
...
@@ -1271,7 +1271,7 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
done
=
1
;
for
(
i
=
0
;
i
<
NB_RL_TABLES
;
i
++
)
{
init_rl
(
&
rl_table
[
i
],
static_rl_table_store
[
i
]);
ff_
init_rl
(
&
rl_table
[
i
],
static_rl_table_store
[
i
]);
}
INIT_VLC_RL
(
rl_table
[
0
],
642
);
INIT_VLC_RL
(
rl_table
[
1
],
1104
);
...
...
libavcodec/rl.h
View file @
e96b4a53
...
...
@@ -53,8 +53,8 @@ typedef struct RLTable {
* @param static_store static uint8_t array[2][2*MAX_RUN + MAX_LEVEL + 3] which will hold
* the level and run tables, if this is NULL av_malloc() will be used
*/
void
init_rl
(
RLTable
*
rl
,
uint8_t
static_store
[
2
][
2
*
MAX_RUN
+
MAX_LEVEL
+
3
]);
void
init_vlc_rl
(
RLTable
*
rl
);
void
ff_
init_rl
(
RLTable
*
rl
,
uint8_t
static_store
[
2
][
2
*
MAX_RUN
+
MAX_LEVEL
+
3
]);
void
ff_
init_vlc_rl
(
RLTable
*
rl
);
#define INIT_VLC_RL(rl, static_size)\
{\
...
...
@@ -68,7 +68,7 @@ void init_vlc_rl(RLTable *rl);
for(q=0; q<32; q++)\
rl.rl_vlc[q]= rl_vlc_table[q];\
\
init_vlc_rl(&rl);\
ff_
init_vlc_rl(&rl);\
}\
}
...
...
libavcodec/rv34.c
View file @
e96b4a53
...
...
@@ -131,10 +131,10 @@ static void rv34_gen_vlc(const uint8_t *bits, int size, VLC *vlc, const uint8_t
vlc
->
table
=
&
table_data
[
table_offs
[
num
]];
vlc
->
table_allocated
=
table_offs
[
num
+
1
]
-
table_offs
[
num
];
init_vlc_sparse
(
vlc
,
FFMIN
(
maxbits
,
9
),
realsize
,
bits2
,
1
,
1
,
cw
,
2
,
2
,
syms
,
2
,
2
,
INIT_VLC_USE_NEW_STATIC
);
ff_
init_vlc_sparse
(
vlc
,
FFMIN
(
maxbits
,
9
),
realsize
,
bits2
,
1
,
1
,
cw
,
2
,
2
,
syms
,
2
,
2
,
INIT_VLC_USE_NEW_STATIC
);
}
/**
...
...
libavcodec/rv40.c
View file @
e96b4a53
...
...
@@ -80,18 +80,18 @@ static av_cold void rv40_init_tables(void)
for
(
i
=
0
;
i
<
NUM_PTYPE_VLCS
;
i
++
){
ptype_vlc
[
i
].
table
=
&
ptype_table
[
i
<<
PTYPE_VLC_BITS
];
ptype_vlc
[
i
].
table_allocated
=
1
<<
PTYPE_VLC_BITS
;
init_vlc_sparse
(
&
ptype_vlc
[
i
],
PTYPE_VLC_BITS
,
PTYPE_VLC_SIZE
,
ptype_vlc_bits
[
i
],
1
,
1
,
ptype_vlc_codes
[
i
],
1
,
1
,
ptype_vlc_syms
,
1
,
1
,
INIT_VLC_USE_NEW_STATIC
);
ff_
init_vlc_sparse
(
&
ptype_vlc
[
i
],
PTYPE_VLC_BITS
,
PTYPE_VLC_SIZE
,
ptype_vlc_bits
[
i
],
1
,
1
,
ptype_vlc_codes
[
i
],
1
,
1
,
ptype_vlc_syms
,
1
,
1
,
INIT_VLC_USE_NEW_STATIC
);
}
for
(
i
=
0
;
i
<
NUM_BTYPE_VLCS
;
i
++
){
btype_vlc
[
i
].
table
=
&
btype_table
[
i
<<
BTYPE_VLC_BITS
];
btype_vlc
[
i
].
table_allocated
=
1
<<
BTYPE_VLC_BITS
;
init_vlc_sparse
(
&
btype_vlc
[
i
],
BTYPE_VLC_BITS
,
BTYPE_VLC_SIZE
,
btype_vlc_bits
[
i
],
1
,
1
,
btype_vlc_codes
[
i
],
1
,
1
,
btype_vlc_syms
,
1
,
1
,
INIT_VLC_USE_NEW_STATIC
);
ff_
init_vlc_sparse
(
&
btype_vlc
[
i
],
BTYPE_VLC_BITS
,
BTYPE_VLC_SIZE
,
btype_vlc_bits
[
i
],
1
,
1
,
btype_vlc_codes
[
i
],
1
,
1
,
btype_vlc_syms
,
1
,
1
,
INIT_VLC_USE_NEW_STATIC
);
}
}
...
...
libavcodec/smacker.c
View file @
e96b4a53
...
...
@@ -267,9 +267,9 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int
*
recodes
=
huff
.
values
;
if
(
vlc
[
0
].
table
)
free_vlc
(
&
vlc
[
0
]);
ff_
free_vlc
(
&
vlc
[
0
]);
if
(
vlc
[
1
].
table
)
free_vlc
(
&
vlc
[
1
]);
ff_
free_vlc
(
&
vlc
[
1
]);
av_free
(
tmp1
.
bits
);
av_free
(
tmp1
.
lengths
);
av_free
(
tmp1
.
values
);
...
...
@@ -718,7 +718,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data,
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
vlc
[
i
].
table
)
free_vlc
(
&
vlc
[
i
]);
ff_
free_vlc
(
&
vlc
[
i
]);
av_free
(
h
[
i
].
bits
);
av_free
(
h
[
i
].
lengths
);
av_free
(
h
[
i
].
values
);
...
...
libavcodec/truemotion2.c
View file @
e96b4a53
...
...
@@ -187,7 +187,7 @@ static void tm2_free_codes(TM2Codes *code)
{
av_free
(
code
->
recode
);
if
(
code
->
vlc
.
table
)
free_vlc
(
&
code
->
vlc
);
ff_
free_vlc
(
&
code
->
vlc
);
}
static
inline
int
tm2_get_token
(
GetBitContext
*
gb
,
TM2Codes
*
code
)
...
...
libavcodec/utvideo.c
View file @
e96b4a53
...
...
@@ -103,10 +103,10 @@ static int build_huff(const uint8_t *src, VLC *vlc, int *fsym)
code
+=
0x80000000u
>>
(
he
[
i
].
len
-
1
);
}
return
init_vlc_sparse
(
vlc
,
FFMIN
(
he
[
last
].
len
,
9
),
last
+
1
,
bits
,
sizeof
(
*
bits
),
sizeof
(
*
bits
),
codes
,
sizeof
(
*
codes
),
sizeof
(
*
codes
),
syms
,
sizeof
(
*
syms
),
sizeof
(
*
syms
),
0
);
return
ff_
init_vlc_sparse
(
vlc
,
FFMIN
(
he
[
last
].
len
,
9
),
last
+
1
,
bits
,
sizeof
(
*
bits
),
sizeof
(
*
bits
),
codes
,
sizeof
(
*
codes
),
sizeof
(
*
codes
),
syms
,
sizeof
(
*
syms
),
sizeof
(
*
syms
),
0
);
}
static
int
decode_plane
(
UtvideoContext
*
c
,
int
plane_no
,
...
...
@@ -207,11 +207,11 @@ static int decode_plane(UtvideoContext *c, int plane_no,
get_bits_left
(
&
gb
));
}
free_vlc
(
&
vlc
);
ff_
free_vlc
(
&
vlc
);
return
0
;
fail:
free_vlc
(
&
vlc
);
ff_
free_vlc
(
&
vlc
);
return
AVERROR_INVALIDDATA
;
}
...
...
libavcodec/vorbisdec.c
View file @
e96b4a53
...
...
@@ -203,7 +203,7 @@ static void vorbis_free(vorbis_context *vc)
for
(
i
=
0
;
i
<
vc
->
codebook_count
;
++
i
)
{
av_free
(
vc
->
codebooks
[
i
].
codevectors
);
free_vlc
(
&
vc
->
codebooks
[
i
].
vlc
);
ff_
free_vlc
(
&
vc
->
codebooks
[
i
].
vlc
);
}
av_freep
(
&
vc
->
codebooks
);
...
...
libavcodec/vp3.c
View file @
e96b4a53
...
...
@@ -292,17 +292,17 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx)
return
0
;
for
(
i
=
0
;
i
<
16
;
i
++
)
{
free_vlc
(
&
s
->
dc_vlc
[
i
]);
free_vlc
(
&
s
->
ac_vlc_1
[
i
]);
free_vlc
(
&
s
->
ac_vlc_2
[
i
]);
free_vlc
(
&
s
->
ac_vlc_3
[
i
]);
free_vlc
(
&
s
->
ac_vlc_4
[
i
]);
ff_
free_vlc
(
&
s
->
dc_vlc
[
i
]);
ff_
free_vlc
(
&
s
->
ac_vlc_1
[
i
]);
ff_
free_vlc
(
&
s
->
ac_vlc_2
[
i
]);
ff_
free_vlc
(
&
s
->
ac_vlc_3
[
i
]);
ff_
free_vlc
(
&
s
->
ac_vlc_4
[
i
]);
}
free_vlc
(
&
s
->
superblock_run_length_vlc
);
free_vlc
(
&
s
->
fragment_run_length_vlc
);
free_vlc
(
&
s
->
mode_code_vlc
);
free_vlc
(
&
s
->
motion_vector_vlc
);