Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
088f38a4
Commit
088f38a4
authored
Apr 20, 2013
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: Drop unnecessary ff_ name prefixes from static functions
parent
38282149
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
117 additions
and
114 deletions
+117
-114
ass.c
libavcodec/ass.c
+13
-13
cavsdsp.c
libavcodec/cavsdsp.c
+35
-35
dct.c
libavcodec/dct.c
+8
-8
dsputil.c
libavcodec/dsputil.c
+4
-4
fft.c
libavcodec/fft.c
+6
-6
h261dec.c
libavcodec/h261dec.c
+2
-2
h264_parser.c
libavcodec/h264_parser.c
+3
-3
mlpdsp.c
libavcodec/mlpdsp.c
+5
-5
motion_est.c
libavcodec/motion_est.c
+6
-4
mpegaudiodec.c
libavcodec/mpegaudiodec.c
+9
-8
ra144.c
libavcodec/ra144.c
+4
-4
rdft.c
libavcodec/rdft.c
+2
-2
utils.c
libavcodec/utils.c
+20
-20
No files found.
libavcodec/ass.c
View file @
088f38a4
...
...
@@ -39,11 +39,11 @@
* the layout of the numpad (1-3 sub, 4-6 mid, 7-9 top)
* @return >= 0 on success otherwise an error code <0
*/
static
int
ff_
ass_subtitle_header
(
AVCodecContext
*
avctx
,
const
char
*
font
,
int
font_size
,
int
color
,
int
back_color
,
int
bold
,
int
italic
,
int
underline
,
int
alignment
)
static
int
ass_subtitle_header
(
AVCodecContext
*
avctx
,
const
char
*
font
,
int
font_size
,
int
color
,
int
back_color
,
int
bold
,
int
italic
,
int
underline
,
int
alignment
)
{
char
header
[
512
];
...
...
@@ -69,14 +69,14 @@ static int ff_ass_subtitle_header(AVCodecContext *avctx,
int
ff_ass_subtitle_header_default
(
AVCodecContext
*
avctx
)
{
return
ff_
ass_subtitle_header
(
avctx
,
ASS_DEFAULT_FONT
,
ASS_DEFAULT_FONT_SIZE
,
ASS_DEFAULT_COLOR
,
ASS_DEFAULT_BACK_COLOR
,
ASS_DEFAULT_BOLD
,
ASS_DEFAULT_ITALIC
,
ASS_DEFAULT_UNDERLINE
,
ASS_DEFAULT_ALIGNMENT
);
return
ass_subtitle_header
(
avctx
,
ASS_DEFAULT_FONT
,
ASS_DEFAULT_FONT_SIZE
,
ASS_DEFAULT_COLOR
,
ASS_DEFAULT_BACK_COLOR
,
ASS_DEFAULT_BOLD
,
ASS_DEFAULT_ITALIC
,
ASS_DEFAULT_UNDERLINE
,
ASS_DEFAULT_ALIGNMENT
);
}
void
ff_ass_init
(
AVSubtitle
*
sub
)
...
...
libavcodec/cavsdsp.c
View file @
088f38a4
...
...
@@ -421,77 +421,77 @@ static void OPNAME ## cavs_filt16_hv_ ## NAME(uint8_t *dst, uint8_t *src1, uint8
}\
#define CAVS_MC(OPNAME, SIZE) \
static void
ff_ ##
OPNAME ## cavs_qpel ## SIZE ## _mc10_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
static void OPNAME ## cavs_qpel ## SIZE ## _mc10_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
{\
OPNAME ## cavs_filt ## SIZE ## _h_qpel_l(dst, src, stride, stride);\
}\
\
static void
ff_ ##
OPNAME ## cavs_qpel ## SIZE ## _mc20_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
static void OPNAME ## cavs_qpel ## SIZE ## _mc20_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
{\
OPNAME ## cavs_filt ## SIZE ## _h_hpel(dst, src, stride, stride);\
}\
\
static void
ff_ ##
OPNAME ## cavs_qpel ## SIZE ## _mc30_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
static void OPNAME ## cavs_qpel ## SIZE ## _mc30_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
{\
OPNAME ## cavs_filt ## SIZE ## _h_qpel_r(dst, src, stride, stride);\
}\
\
static void
ff_ ##
OPNAME ## cavs_qpel ## SIZE ## _mc01_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
static void OPNAME ## cavs_qpel ## SIZE ## _mc01_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
{\
OPNAME ## cavs_filt ## SIZE ## _v_qpel_l(dst, src, stride, stride);\
}\
\
static void
ff_ ##
OPNAME ## cavs_qpel ## SIZE ## _mc02_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
static void OPNAME ## cavs_qpel ## SIZE ## _mc02_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
{\
OPNAME ## cavs_filt ## SIZE ## _v_hpel(dst, src, stride, stride);\
}\
\
static void
ff_ ##
OPNAME ## cavs_qpel ## SIZE ## _mc03_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
static void OPNAME ## cavs_qpel ## SIZE ## _mc03_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
{\
OPNAME ## cavs_filt ## SIZE ## _v_qpel_r(dst, src, stride, stride);\
}\
\
static void
ff_ ##
OPNAME ## cavs_qpel ## SIZE ## _mc22_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
static void OPNAME ## cavs_qpel ## SIZE ## _mc22_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
{\
OPNAME ## cavs_filt ## SIZE ## _hv_jj(dst, src, NULL, stride, stride); \
}\
\
static void
ff_ ##
OPNAME ## cavs_qpel ## SIZE ## _mc11_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
static void OPNAME ## cavs_qpel ## SIZE ## _mc11_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
{\
OPNAME ## cavs_filt ## SIZE ## _hv_egpr(dst, src, src, stride, stride); \
}\
\
static void
ff_ ##
OPNAME ## cavs_qpel ## SIZE ## _mc13_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
static void OPNAME ## cavs_qpel ## SIZE ## _mc13_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
{\
OPNAME ## cavs_filt ## SIZE ## _hv_egpr(dst, src, src+stride, stride, stride); \
}\
\
static void
ff_ ##
OPNAME ## cavs_qpel ## SIZE ## _mc31_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
static void OPNAME ## cavs_qpel ## SIZE ## _mc31_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
{\
OPNAME ## cavs_filt ## SIZE ## _hv_egpr(dst, src, src+1, stride, stride); \
}\
\
static void
ff_ ##
OPNAME ## cavs_qpel ## SIZE ## _mc33_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
static void OPNAME ## cavs_qpel ## SIZE ## _mc33_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
{\
OPNAME ## cavs_filt ## SIZE ## _hv_egpr(dst, src, src+stride+1,stride, stride); \
}\
\
static void
ff_ ##
OPNAME ## cavs_qpel ## SIZE ## _mc21_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
static void OPNAME ## cavs_qpel ## SIZE ## _mc21_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
{\
OPNAME ## cavs_filt ## SIZE ## _hv_ff(dst, src, src+stride+1,stride, stride); \
}\
\
static void
ff_ ##
OPNAME ## cavs_qpel ## SIZE ## _mc12_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
static void OPNAME ## cavs_qpel ## SIZE ## _mc12_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
{\
OPNAME ## cavs_filt ## SIZE ## _hv_ii(dst, src, src+stride+1,stride, stride); \
}\
\
static void
ff_ ##
OPNAME ## cavs_qpel ## SIZE ## _mc32_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
static void OPNAME ## cavs_qpel ## SIZE ## _mc32_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
{\
OPNAME ## cavs_filt ## SIZE ## _hv_kk(dst, src, src+stride+1,stride, stride); \
}\
\
static void
ff_ ##
OPNAME ## cavs_qpel ## SIZE ## _mc23_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
static void OPNAME ## cavs_qpel ## SIZE ## _mc23_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\
{\
OPNAME ## cavs_filt ## SIZE ## _hv_qq(dst, src, src+stride+1,stride, stride); \
}\
...
...
@@ -527,29 +527,29 @@ CAVS_MC(put_, 16)
CAVS_MC
(
avg_
,
8
)
CAVS_MC
(
avg_
,
16
)
#define
ff_
put_cavs_qpel8_mc00_c ff_put_pixels8x8_c
#define
ff_
avg_cavs_qpel8_mc00_c ff_avg_pixels8x8_c
#define
ff_
put_cavs_qpel16_mc00_c ff_put_pixels16x16_c
#define
ff_
avg_cavs_qpel16_mc00_c ff_avg_pixels16x16_c
#define put_cavs_qpel8_mc00_c ff_put_pixels8x8_c
#define avg_cavs_qpel8_mc00_c ff_avg_pixels8x8_c
#define put_cavs_qpel16_mc00_c ff_put_pixels16x16_c
#define avg_cavs_qpel16_mc00_c ff_avg_pixels16x16_c
av_cold
void
ff_cavsdsp_init
(
CAVSDSPContext
*
c
,
AVCodecContext
*
avctx
)
{
#define dspfunc(PFX, IDX, NUM) \
c->PFX ## _pixels_tab[IDX][ 0] =
ff_ ##
PFX ## NUM ## _mc00_c; \
c->PFX ## _pixels_tab[IDX][ 1] =
ff_ ##
PFX ## NUM ## _mc10_c; \
c->PFX ## _pixels_tab[IDX][ 2] =
ff_ ##
PFX ## NUM ## _mc20_c; \
c->PFX ## _pixels_tab[IDX][ 3] =
ff_ ##
PFX ## NUM ## _mc30_c; \
c->PFX ## _pixels_tab[IDX][ 4] =
ff_ ##
PFX ## NUM ## _mc01_c; \
c->PFX ## _pixels_tab[IDX][ 5] =
ff_ ##
PFX ## NUM ## _mc11_c; \
c->PFX ## _pixels_tab[IDX][ 6] =
ff_ ##
PFX ## NUM ## _mc21_c; \
c->PFX ## _pixels_tab[IDX][ 7] =
ff_ ##
PFX ## NUM ## _mc31_c; \
c->PFX ## _pixels_tab[IDX][ 8] =
ff_ ##
PFX ## NUM ## _mc02_c; \
c->PFX ## _pixels_tab[IDX][ 9] =
ff_ ##
PFX ## NUM ## _mc12_c; \
c->PFX ## _pixels_tab[IDX][10] =
ff_ ##
PFX ## NUM ## _mc22_c; \
c->PFX ## _pixels_tab[IDX][11] =
ff_ ##
PFX ## NUM ## _mc32_c; \
c->PFX ## _pixels_tab[IDX][12] =
ff_ ##
PFX ## NUM ## _mc03_c; \
c->PFX ## _pixels_tab[IDX][13] =
ff_ ##
PFX ## NUM ## _mc13_c; \
c->PFX ## _pixels_tab[IDX][14] =
ff_ ##
PFX ## NUM ## _mc23_c; \
c->PFX ## _pixels_tab[IDX][15] =
ff_ ##
PFX ## NUM ## _mc33_c
c->PFX ## _pixels_tab[IDX][ 0] = PFX ## NUM ## _mc00_c; \
c->PFX ## _pixels_tab[IDX][ 1] = PFX ## NUM ## _mc10_c; \
c->PFX ## _pixels_tab[IDX][ 2] = PFX ## NUM ## _mc20_c; \
c->PFX ## _pixels_tab[IDX][ 3] = PFX ## NUM ## _mc30_c; \
c->PFX ## _pixels_tab[IDX][ 4] = PFX ## NUM ## _mc01_c; \
c->PFX ## _pixels_tab[IDX][ 5] = PFX ## NUM ## _mc11_c; \
c->PFX ## _pixels_tab[IDX][ 6] = PFX ## NUM ## _mc21_c; \
c->PFX ## _pixels_tab[IDX][ 7] = PFX ## NUM ## _mc31_c; \
c->PFX ## _pixels_tab[IDX][ 8] = PFX ## NUM ## _mc02_c; \
c->PFX ## _pixels_tab[IDX][ 9] = PFX ## NUM ## _mc12_c; \
c->PFX ## _pixels_tab[IDX][10] = PFX ## NUM ## _mc22_c; \
c->PFX ## _pixels_tab[IDX][11] = PFX ## NUM ## _mc32_c; \
c->PFX ## _pixels_tab[IDX][12] = PFX ## NUM ## _mc03_c; \
c->PFX ## _pixels_tab[IDX][13] = PFX ## NUM ## _mc13_c; \
c->PFX ## _pixels_tab[IDX][14] = PFX ## NUM ## _mc23_c; \
c->PFX ## _pixels_tab[IDX][15] = PFX ## NUM ## _mc33_c
dspfunc
(
put_cavs_qpel
,
0
,
16
);
dspfunc
(
put_cavs_qpel
,
1
,
8
);
dspfunc
(
avg_cavs_qpel
,
0
,
16
);
...
...
libavcodec/dct.c
View file @
088f38a4
...
...
@@ -40,7 +40,7 @@
/* cos((M_PI * x / (2 * n)) */
#define COS(s, n, x) (s->costab[x])
static
void
ff_
dst_calc_I_c
(
DCTContext
*
ctx
,
FFTSample
*
data
)
static
void
dst_calc_I_c
(
DCTContext
*
ctx
,
FFTSample
*
data
)
{
int
n
=
1
<<
ctx
->
nbits
;
int
i
;
...
...
@@ -70,7 +70,7 @@ static void ff_dst_calc_I_c(DCTContext *ctx, FFTSample *data)
data
[
n
-
1
]
=
0
;
}
static
void
ff_
dct_calc_I_c
(
DCTContext
*
ctx
,
FFTSample
*
data
)
static
void
dct_calc_I_c
(
DCTContext
*
ctx
,
FFTSample
*
data
)
{
int
n
=
1
<<
ctx
->
nbits
;
int
i
;
...
...
@@ -100,7 +100,7 @@ static void ff_dct_calc_I_c(DCTContext *ctx, FFTSample *data)
data
[
i
]
=
data
[
i
-
2
]
-
data
[
i
];
}
static
void
ff_
dct_calc_III_c
(
DCTContext
*
ctx
,
FFTSample
*
data
)
static
void
dct_calc_III_c
(
DCTContext
*
ctx
,
FFTSample
*
data
)
{
int
n
=
1
<<
ctx
->
nbits
;
int
i
;
...
...
@@ -133,7 +133,7 @@ static void ff_dct_calc_III_c(DCTContext *ctx, FFTSample *data)
}
}
static
void
ff_
dct_calc_II_c
(
DCTContext
*
ctx
,
FFTSample
*
data
)
static
void
dct_calc_II_c
(
DCTContext
*
ctx
,
FFTSample
*
data
)
{
int
n
=
1
<<
ctx
->
nbits
;
int
i
;
...
...
@@ -201,10 +201,10 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse)
s
->
csc2
[
i
]
=
0
.
5
/
sin
((
M_PI
/
(
2
*
n
)
*
(
2
*
i
+
1
)));
switch
(
inverse
)
{
case
DCT_I
:
s
->
dct_calc
=
ff_
dct_calc_I_c
;
break
;
case
DCT_II
:
s
->
dct_calc
=
ff_
dct_calc_II_c
;
break
;
case
DCT_III
:
s
->
dct_calc
=
ff_
dct_calc_III_c
;
break
;
case
DST_I
:
s
->
dct_calc
=
ff_
dst_calc_I_c
;
break
;
case
DCT_I
:
s
->
dct_calc
=
dct_calc_I_c
;
break
;
case
DCT_II
:
s
->
dct_calc
=
dct_calc_II_c
;
break
;
case
DCT_III
:
s
->
dct_calc
=
dct_calc_III_c
;
break
;
case
DST_I
:
s
->
dct_calc
=
dst_calc_I_c
;
break
;
}
}
...
...
libavcodec/dsputil.c
View file @
088f38a4
...
...
@@ -2483,12 +2483,12 @@ static void vector_clip_int32_c(int32_t *dst, const int32_t *src, int32_t min,
}
while
(
len
>
0
);
}
static
void
ff_
jref_idct_put
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
)
static
void
jref_idct_put
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
)
{
ff_j_rev_dct
(
block
);
put_pixels_clamped_c
(
block
,
dest
,
line_size
);
}
static
void
ff_
jref_idct_add
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
)
static
void
jref_idct_add
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
)
{
ff_j_rev_dct
(
block
);
add_pixels_clamped_c
(
block
,
dest
,
line_size
);
...
...
@@ -2557,8 +2557,8 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx)
c
->
idct_permutation_type
=
FF_NO_IDCT_PERM
;
}
else
{
if
(
avctx
->
idct_algo
==
FF_IDCT_INT
){
c
->
idct_put
=
ff_
jref_idct_put
;
c
->
idct_add
=
ff_
jref_idct_add
;
c
->
idct_put
=
jref_idct_put
;
c
->
idct_add
=
jref_idct_add
;
c
->
idct
=
ff_j_rev_dct
;
c
->
idct_permutation_type
=
FF_LIBMPEG2_IDCT_PERM
;
}
else
if
(
avctx
->
idct_algo
==
FF_IDCT_FAAN
){
...
...
libavcodec/fft.c
View file @
088f38a4
...
...
@@ -65,8 +65,8 @@ COSTABLE_CONST FFTSample * const FFT_NAME(ff_cos_tabs)[] = {
FFT_NAME
(
ff_cos_65536
),
};
static
void
ff
_ff
t_permute_c
(
FFTContext
*
s
,
FFTComplex
*
z
);
static
void
ff
_ff
t_calc_c
(
FFTContext
*
s
,
FFTComplex
*
z
);
static
void
fft_permute_c
(
FFTContext
*
s
,
FFTComplex
*
z
);
static
void
fft_calc_c
(
FFTContext
*
s
,
FFTComplex
*
z
);
static
int
split_radix_permutation
(
int
i
,
int
n
,
int
inverse
)
{
...
...
@@ -149,8 +149,8 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
s
->
inverse
=
inverse
;
s
->
fft_permutation
=
FF_FFT_PERM_DEFAULT
;
s
->
fft_permute
=
ff
_ff
t_permute_c
;
s
->
fft_calc
=
ff
_ff
t_calc_c
;
s
->
fft_permute
=
fft_permute_c
;
s
->
fft_calc
=
fft_calc_c
;
#if CONFIG_MDCT
s
->
imdct_calc
=
ff_imdct_calc_c
;
s
->
imdct_half
=
ff_imdct_half_c
;
...
...
@@ -189,7 +189,7 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
return
-
1
;
}
static
void
ff
_ff
t_permute_c
(
FFTContext
*
s
,
FFTComplex
*
z
)
static
void
fft_permute_c
(
FFTContext
*
s
,
FFTComplex
*
z
)
{
int
j
,
np
;
const
uint16_t
*
revtab
=
s
->
revtab
;
...
...
@@ -346,7 +346,7 @@ static void (* const fft_dispatch[])(FFTComplex*) = {
fft2048
,
fft4096
,
fft8192
,
fft16384
,
fft32768
,
fft65536
,
};
static
void
ff
_ff
t_calc_c
(
FFTContext
*
s
,
FFTComplex
*
z
)
static
void
fft_calc_c
(
FFTContext
*
s
,
FFTComplex
*
z
)
{
fft_dispatch
[
s
->
nbits
-
2
](
z
);
}
libavcodec/h261dec.c
View file @
088f38a4
...
...
@@ -147,7 +147,7 @@ static int h261_decode_gob_header(H261Context *h)
* Decode the group of blocks / video packet header.
* @return <0 if no resync found
*/
static
int
ff_
h261_resync
(
H261Context
*
h
)
static
int
h261_resync
(
H261Context
*
h
)
{
MpegEncContext
*
const
s
=
&
h
->
s
;
int
left
,
ret
;
...
...
@@ -627,7 +627,7 @@ retry:
s
->
mb_y
=
0
;
while
(
h
->
gob_number
<
(
s
->
mb_height
==
18
?
12
:
5
))
{
if
(
ff_
h261_resync
(
h
)
<
0
)
if
(
h261_resync
(
h
)
<
0
)
break
;
h261_decode_gob
(
h
);
}
...
...
libavcodec/h264_parser.c
View file @
088f38a4
...
...
@@ -33,7 +33,7 @@
#include <assert.h>
static
int
ff_
h264_find_frame_end
(
H264Context
*
h
,
const
uint8_t
*
buf
,
int
buf_size
)
static
int
h264_find_frame_end
(
H264Context
*
h
,
const
uint8_t
*
buf
,
int
buf_size
)
{
int
i
;
uint32_t
state
;
...
...
@@ -265,7 +265,7 @@ static int h264_parse(AVCodecParserContext *s,
if
(
s
->
flags
&
PARSER_FLAG_COMPLETE_FRAMES
){
next
=
buf_size
;
}
else
{
next
=
ff_
h264_find_frame_end
(
h
,
buf
,
buf_size
);
next
=
h264_find_frame_end
(
h
,
buf
,
buf_size
);
if
(
ff_combine_frame
(
pc
,
next
,
&
buf
,
&
buf_size
)
<
0
)
{
*
poutbuf
=
NULL
;
...
...
@@ -275,7 +275,7 @@ static int h264_parse(AVCodecParserContext *s,
if
(
next
<
0
&&
next
!=
END_NOT_FOUND
){
assert
(
pc
->
last_index
+
next
>=
0
);
ff_h264_find_frame_end
(
h
,
&
pc
->
buffer
[
pc
->
last_index
+
next
],
-
next
);
//
update state
h264_find_frame_end
(
h
,
&
pc
->
buffer
[
pc
->
last_index
+
next
],
-
next
);
//
update state
}
}
...
...
libavcodec/mlpdsp.c
View file @
088f38a4
...
...
@@ -23,10 +23,10 @@
#include "mlpdsp.h"
#include "mlp.h"
static
void
ff_
mlp_filter_channel
(
int32_t
*
state
,
const
int32_t
*
coeff
,
int
firorder
,
int
iirorder
,
unsigned
int
filter_shift
,
int32_t
mask
,
int
blocksize
,
int32_t
*
sample_buffer
)
static
void
mlp_filter_channel
(
int32_t
*
state
,
const
int32_t
*
coeff
,
int
firorder
,
int
iirorder
,
unsigned
int
filter_shift
,
int32_t
mask
,
int
blocksize
,
int32_t
*
sample_buffer
)
{
int32_t
*
firbuf
=
state
;
int32_t
*
iirbuf
=
state
+
MAX_BLOCKSIZE
+
MAX_FIR_ORDER
;
...
...
@@ -58,7 +58,7 @@ static void ff_mlp_filter_channel(int32_t *state, const int32_t *coeff,
void
ff_mlpdsp_init
(
MLPDSPContext
*
c
)
{
c
->
mlp_filter_channel
=
ff_
mlp_filter_channel
;
c
->
mlp_filter_channel
=
mlp_filter_channel
;
if
(
ARCH_X86
)
ff_mlpdsp_init_x86
(
c
);
}
libavcodec/motion_est.c
View file @
088f38a4
...
...
@@ -1104,8 +1104,8 @@ int ff_pre_estimate_p_frame_motion(MpegEncContext * s,
return
dmin
;
}
static
int
ff_estimate_motion_b
(
MpegEncContext
*
s
,
int
mb_x
,
int
mb_y
,
int16_t
(
*
mv_table
)[
2
],
int
ref_index
,
int
f_code
)
static
int
estimate_motion_b
(
MpegEncContext
*
s
,
int
mb_x
,
int
mb_y
,
int16_t
(
*
mv_table
)[
2
],
int
ref_index
,
int
f_code
)
{
MotionEstContext
*
const
c
=
&
s
->
me
;
int
mx
,
my
,
dmin
;
...
...
@@ -1522,10 +1522,12 @@ void ff_estimate_b_frame_motion(MpegEncContext * s,
dmin
=
INT_MAX
;
//FIXME penalty stuff for non mpeg4
c
->
skip
=
0
;
fmin
=
ff_estimate_motion_b
(
s
,
mb_x
,
mb_y
,
s
->
b_forw_mv_table
,
0
,
s
->
f_code
)
+
3
*
penalty_factor
;
fmin
=
estimate_motion_b
(
s
,
mb_x
,
mb_y
,
s
->
b_forw_mv_table
,
0
,
s
->
f_code
)
+
3
*
penalty_factor
;
c
->
skip
=
0
;
bmin
=
ff_estimate_motion_b
(
s
,
mb_x
,
mb_y
,
s
->
b_back_mv_table
,
2
,
s
->
b_code
)
+
2
*
penalty_factor
;
bmin
=
estimate_motion_b
(
s
,
mb_x
,
mb_y
,
s
->
b_back_mv_table
,
2
,
s
->
b_code
)
+
2
*
penalty_factor
;
av_dlog
(
s
,
" %d %d "
,
s
->
b_forw_mv_table
[
xy
][
0
],
s
->
b_forw_mv_table
[
xy
][
1
]);
c
->
skip
=
0
;
...
...
libavcodec/mpegaudiodec.c
View file @
088f38a4
...
...
@@ -165,7 +165,7 @@ static const int32_t scale_factor_mult2[3][3] = {
* Convert region offsets to region sizes and truncate
* size to big_values.
*/
static
void
ff_
region_offset2size
(
GranuleDef
*
g
)
static
void
region_offset2size
(
GranuleDef
*
g
)
{
int
i
,
k
,
j
=
0
;
g
->
region_size
[
2
]
=
576
/
2
;
...
...
@@ -176,7 +176,7 @@ static void ff_region_offset2size(GranuleDef *g)
}
}
static
void
ff_
init_short_region
(
MPADecodeContext
*
s
,
GranuleDef
*
g
)
static
void
init_short_region
(
MPADecodeContext
*
s
,
GranuleDef
*
g
)
{
if
(
g
->
block_type
==
2
)
{
if
(
s
->
sample_rate_index
!=
8
)
...
...
@@ -194,7 +194,8 @@ static void ff_init_short_region(MPADecodeContext *s, GranuleDef *g)
g
->
region_size
[
1
]
=
(
576
/
2
);
}
static
void
ff_init_long_region
(
MPADecodeContext
*
s
,
GranuleDef
*
g
,
int
ra1
,
int
ra2
)
static
void
init_long_region
(
MPADecodeContext
*
s
,
GranuleDef
*
g
,
int
ra1
,
int
ra2
)
{
int
l
;
g
->
region_size
[
0
]
=
band_index_long
[
s
->
sample_rate_index
][
ra1
+
1
]
>>
1
;
...
...
@@ -203,7 +204,7 @@ static void ff_init_long_region(MPADecodeContext *s, GranuleDef *g, int ra1, int
g
->
region_size
[
1
]
=
band_index_long
[
s
->
sample_rate_index
][
l
]
>>
1
;
}
static
void
ff_
compute_band_indexes
(
MPADecodeContext
*
s
,
GranuleDef
*
g
)
static
void
compute_band_indexes
(
MPADecodeContext
*
s
,
GranuleDef
*
g
)
{
if
(
g
->
block_type
==
2
)
{
if
(
g
->
switch_point
)
{
...
...
@@ -1354,7 +1355,7 @@ static int mp_decode_layer3(MPADecodeContext *s)
g
->
table_select
[
i
]
=
get_bits
(
&
s
->
gb
,
5
);
for
(
i
=
0
;
i
<
3
;
i
++
)
g
->
subblock_gain
[
i
]
=
get_bits
(
&
s
->
gb
,
3
);
ff_
init_short_region
(
s
,
g
);
init_short_region
(
s
,
g
);
}
else
{
int
region_address1
,
region_address2
;
g
->
block_type
=
0
;
...
...
@@ -1366,10 +1367,10 @@ static int mp_decode_layer3(MPADecodeContext *s)
region_address2
=
get_bits
(
&
s
->
gb
,
3
);
av_dlog
(
s
->
avctx
,
"region1=%d region2=%d
\n
"
,
region_address1
,
region_address2
);
ff_
init_long_region
(
s
,
g
,
region_address1
,
region_address2
);
init_long_region
(
s
,
g
,
region_address1
,
region_address2
);
}
ff_
region_offset2size
(
g
);
ff_
compute_band_indexes
(
s
,
g
);
region_offset2size
(
g
);
compute_band_indexes
(
s
,
g
);
g
->
preflag
=
0
;
if
(
!
s
->
lsf
)
...
...
libavcodec/ra144.c
View file @
088f38a4
...
...
@@ -1504,8 +1504,8 @@ const int16_t * const ff_lpc_refl_cb[10]={
lpc_refl_cb6
,
lpc_refl_cb7
,
lpc_refl_cb8
,
lpc_refl_cb9
,
lpc_refl_cb10
};
static
void
ff_add_wav
(
int16_t
*
dest
,
int
n
,
int
skip_first
,
int
*
m
,
const
int16_t
*
s1
,
const
int8_t
*
s2
,
const
int8_t
*
s3
)
static
void
add_wav
(
int16_t
*
dest
,
int
n
,
int
skip_first
,
int
*
m
,
const
int16_t
*
s1
,
const
int8_t
*
s2
,
const
int8_t
*
s3
)
{
int
i
;
int
v
[
3
];
...
...
@@ -1709,8 +1709,8 @@ void ff_subblock_synthesis(RA144Context *ractx, const uint16_t *lpc_coefs,
block
=
ractx
->
adapt_cb
+
BUFFERSIZE
-
BLOCKSIZE
;
ff_
add_wav
(
block
,
gain
,
cba_idx
,
m
,
cba_idx
?
buffer_a
:
NULL
,
ff_cb1_vects
[
cb1_idx
],
ff_cb2_vects
[
cb2_idx
]);
add_wav
(
block
,
gain
,
cba_idx
,
m
,
cba_idx
?
buffer_a
:
NULL
,
ff_cb1_vects
[
cb1_idx
],
ff_cb2_vects
[
cb2_idx
]);
memcpy
(
ractx
->
curr_sblock
,
ractx
->
curr_sblock
+
BLOCKSIZE
,
LPC_ORDER
*
sizeof
(
*
ractx
->
curr_sblock
));
...
...
libavcodec/rdft.c
View file @
088f38a4
...
...
@@ -54,7 +54,7 @@ static SINTABLE_CONST FFTSample * const ff_sin_tabs[] = {
* the two real FFTs into one complex FFT. Unmangle the results.
* ref: http://www.engineeringproductivitytools.com/stuff/T0001/PT10.HTM
*/
static
void
ff_rdft_calc_c
(
RDFTContext
*
s
,
FFTSample
*
data
)
static
void
rdft_calc_c
(
RDFTContext
*
s
,
FFTSample
*
data
)
{
int
i
,
i1
,
i2
;
FFTComplex
ev
,
od
;
...
...
@@ -120,7 +120,7 @@ av_cold int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans)
s
->
tsin
[
i
]
=
sin
(
i
*
theta
);
}
#endif
s
->
rdft_calc
=
ff_
rdft_calc_c
;
s
->
rdft_calc
=
rdft_calc_c
;
if
(
ARCH_ARM
)
ff_rdft_init_arm
(
s
);
...
...
libavcodec/utils.c
View file @
088f38a4
...
...
@@ -49,7 +49,7 @@
#include <float.h>
static
int
volatile
entangled_thread_counter
=
0
;
static
int
(
*
ff_
lockmgr_cb
)(
void
**
mutex
,
enum
AVLockOp
op
);
static
int
(
*
lockmgr_cb
)(
void
**
mutex
,
enum
AVLockOp
op
);
static
void
*
codec_mutex
;
static
void
*
avformat_mutex
;
...
...
@@ -869,8 +869,8 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
av_dict_copy
(
&
tmp
,
*
options
,
0
);
/* If there is a user-supplied mutex locking routine, call it. */
if
(
ff_
lockmgr_cb
)
{
if
((
*
ff_
lockmgr_cb
)(
&
codec_mutex
,
AV_LOCK_OBTAIN
))
if
(
lockmgr_cb
)
{
if
((
*
lockmgr_cb
)(
&
codec_mutex
,
AV_LOCK_OBTAIN
))
return
-
1
;
}
...
...
@@ -1066,8 +1066,8 @@ end:
entangled_thread_counter
--
;
/* Release any user-supplied mutex. */
if
(
ff_
lockmgr_cb
)
{
(
*
ff_
lockmgr_cb
)(
&
codec_mutex
,
AV_LOCK_RELEASE
);
if
(
lockmgr_cb
)
{
(
*
lockmgr_cb
)(
&
codec_mutex
,
AV_LOCK_RELEASE
);
}
if
(
options
)
{
av_dict_free
(
options
);
...
...
@@ -1515,8 +1515,8 @@ void avsubtitle_free(AVSubtitle *sub)
av_cold
int
avcodec_close
(
AVCodecContext
*
avctx
)
{
/* If there is a user-supplied mutex locking routine, call it. */
if
(
ff_
lockmgr_cb
)
{
if
((
*
ff_
lockmgr_cb
)(
&
codec_mutex
,
AV_LOCK_OBTAIN
))
if
(
lockmgr_cb
)
{
if
((
*
lockmgr_cb
)(
&
codec_mutex
,
AV_LOCK_OBTAIN
))
return
-
1
;
}
...
...
@@ -1554,8 +1554,8 @@ av_cold int avcodec_close(AVCodecContext *avctx)
entangled_thread_counter
--
;
/* Release any user-supplied mutex. */
if
(
ff_
lockmgr_cb
)
{
(
*
ff_
lockmgr_cb
)(
&
codec_mutex
,
AV_LOCK_RELEASE
);
if
(
lockmgr_cb
)
{
(
*
lockmgr_cb
)(
&
codec_mutex
,
AV_LOCK_RELEASE
);
}
return
0
;
}
...
...
@@ -2106,19 +2106,19 @@ AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum AVPixelFormat pix_fmt)
int
av_lockmgr_register
(
int
(
*
cb
)(
void
**
mutex
,
enum
AVLockOp
op
))
{
if
(
ff_
lockmgr_cb
)
{
if
(
ff_
lockmgr_cb
(
&
codec_mutex
,
AV_LOCK_DESTROY
))
if
(
lockmgr_cb
)
{
if
(
lockmgr_cb
(
&
codec_mutex
,
AV_LOCK_DESTROY
))
return
-
1
;
if
(
ff_
lockmgr_cb
(
&
avformat_mutex
,
AV_LOCK_DESTROY
))
if
(
lockmgr_cb
(
&
avformat_mutex
,
AV_LOCK_DESTROY
))
return
-
1
;
}
ff_
lockmgr_cb
=
cb
;
lockmgr_cb
=
cb
;
if
(
ff_
lockmgr_cb
)
{
if
(
ff_
lockmgr_cb
(
&
codec_mutex
,
AV_LOCK_CREATE
))
if
(
lockmgr_cb
)
{
if
(
lockmgr_cb
(
&
codec_mutex
,
AV_LOCK_CREATE
))
return
-
1
;
if
(
ff_
lockmgr_cb
(
&
avformat_mutex
,
AV_LOCK_CREATE
))
if
(
lockmgr_cb
(
&
avformat_mutex
,
AV_LOCK_CREATE
))
return
-
1
;
}
return
0
;
...
...
@@ -2126,8 +2126,8 @@ int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op))
int
avpriv_lock_avformat
(
void
)
{
if
(
ff_
lockmgr_cb
)
{
if
((
*
ff_
lockmgr_cb
)(
&
avformat_mutex
,
AV_LOCK_OBTAIN
))
if
(
lockmgr_cb
)
{
if
((
*
lockmgr_cb
)(
&
avformat_mutex
,
AV_LOCK_OBTAIN
))
return
-
1
;
}
return
0
;
...
...
@@ -2135,8 +2135,8 @@ int avpriv_lock_avformat(void)
int
avpriv_unlock_avformat
(
void
)
{
if
(
ff_
lockmgr_cb
)
{
if
((
*
ff_
lockmgr_cb
)(
&
avformat_mutex
,
AV_LOCK_RELEASE
))
if
(
lockmgr_cb
)
{
if
((
*
lockmgr_cb
)(
&
avformat_mutex
,
AV_LOCK_RELEASE
))
return
-
1
;
}
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment