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
8dead2aa
Commit
8dead2aa
authored
Mar 22, 2016
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move const qualifier before type name
parent
d909f43b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
28 deletions
+28
-28
aacpsy.c
libavcodec/aacpsy.c
+5
-5
alacenc.c
libavcodec/alacenc.c
+4
-4
dnxhdenc.c
libavcodec/dnxhdenc.c
+2
-2
intrax8.c
libavcodec/intrax8.c
+6
-6
libopenh264enc.c
libavcodec/libopenh264enc.c
+1
-1
motion_est_template.c
libavcodec/motion_est_template.c
+9
-9
pcx.c
libavcodec/pcx.c
+1
-1
No files found.
libavcodec/aacpsy.c
View file @
8dead2aa
...
...
@@ -796,7 +796,7 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio,
if
(
la
)
{
float
hpfsmpl
[
AAC_BLOCK_SIZE_LONG
];
float
cons
t
*
pf
=
hpfsmpl
;
const
floa
t
*
pf
=
hpfsmpl
;
float
attack_intensity
[(
AAC_NUM_BLOCKS_SHORT
+
1
)
*
PSY_LAME_NUM_SUBBLOCKS
];
float
energy_subshort
[(
AAC_NUM_BLOCKS_SHORT
+
1
)
*
PSY_LAME_NUM_SUBBLOCKS
];
float
energy_short
[
AAC_NUM_BLOCKS_SHORT
+
1
]
=
{
0
};
...
...
@@ -826,7 +826,7 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio,
}
for
(
i
=
0
;
i
<
AAC_NUM_BLOCKS_SHORT
*
PSY_LAME_NUM_SUBBLOCKS
;
i
++
)
{
float
cons
t
*
const
pfe
=
pf
+
AAC_BLOCK_SIZE_LONG
/
(
AAC_NUM_BLOCKS_SHORT
*
PSY_LAME_NUM_SUBBLOCKS
);
const
floa
t
*
const
pfe
=
pf
+
AAC_BLOCK_SIZE_LONG
/
(
AAC_NUM_BLOCKS_SHORT
*
PSY_LAME_NUM_SUBBLOCKS
);
float
p
=
1
.
0
f
;
for
(;
pf
<
pfe
;
pf
++
)
p
=
FFMAX
(
p
,
fabsf
(
*
pf
));
...
...
@@ -859,9 +859,9 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio,
/* GB: tuned (1) to avoid too many short blocks for test sample TRUMPET */
/* RH: tuned (2) to let enough short blocks through for test sample FSOL and SNAPS */
for
(
i
=
1
;
i
<
AAC_NUM_BLOCKS_SHORT
+
1
;
i
++
)
{
float
cons
t
u
=
energy_short
[
i
-
1
];
float
cons
t
v
=
energy_short
[
i
];
float
cons
t
m
=
FFMAX
(
u
,
v
);
const
floa
t
u
=
energy_short
[
i
-
1
];
const
floa
t
v
=
energy_short
[
i
];
const
floa
t
m
=
FFMAX
(
u
,
v
);
if
(
m
<
40000
)
{
/* (2) */
if
(
u
<
1
.
7
f
*
v
&&
v
<
1
.
7
f
*
u
)
{
/* (1) */
if
(
i
==
1
&&
attacks
[
0
]
<
attacks
[
i
])
...
...
libavcodec/alacenc.c
View file @
8dead2aa
...
...
@@ -81,7 +81,7 @@ typedef struct AlacEncodeContext {
static
void
init_sample_buffers
(
AlacEncodeContext
*
s
,
int
channels
,
uint8_t
cons
t
*
samples
[
2
])
const
uint8_
t
*
samples
[
2
])
{
int
ch
,
i
;
int
shift
=
av_get_bytes_per_sample
(
s
->
avctx
->
sample_fmt
)
*
8
-
...
...
@@ -364,7 +364,7 @@ static void write_element(AlacEncodeContext *s,
enum
AlacRawDataBlockType
element
,
int
instance
,
const
uint8_t
*
samples0
,
const
uint8_t
*
samples1
)
{
uint8_t
cons
t
*
samples
[
2
]
=
{
samples0
,
samples1
};
const
uint8_
t
*
samples
[
2
]
=
{
samples0
,
samples1
};
int
i
,
j
,
channels
;
int
prediction_type
=
0
;
PutBitContext
*
pb
=
&
s
->
pbctx
;
...
...
@@ -376,14 +376,14 @@ static void write_element(AlacEncodeContext *s,
/* samples are channel-interleaved in verbatim mode */
if
(
s
->
avctx
->
sample_fmt
==
AV_SAMPLE_FMT_S32P
)
{
int
shift
=
32
-
s
->
avctx
->
bits_per_raw_sample
;
int32_t
cons
t
*
samples_s32
[
2
]
=
{
(
const
int32_t
*
)
samples0
,
const
int32_
t
*
samples_s32
[
2
]
=
{
(
const
int32_t
*
)
samples0
,
(
const
int32_t
*
)
samples1
};
for
(
i
=
0
;
i
<
s
->
frame_size
;
i
++
)
for
(
j
=
0
;
j
<
channels
;
j
++
)
put_sbits
(
pb
,
s
->
avctx
->
bits_per_raw_sample
,
samples_s32
[
j
][
i
]
>>
shift
);
}
else
{
int16_t
cons
t
*
samples_s16
[
2
]
=
{
(
const
int16_t
*
)
samples0
,
const
int16_
t
*
samples_s16
[
2
]
=
{
(
const
int16_t
*
)
samples0
,
(
const
int16_t
*
)
samples1
};
for
(
i
=
0
;
i
<
s
->
frame_size
;
i
++
)
for
(
j
=
0
;
j
<
channels
;
j
++
)
...
...
libavcodec/dnxhdenc.c
View file @
8dead2aa
...
...
@@ -751,7 +751,7 @@ static int dnxhd_mb_var_thread(AVCodecContext *avctx, void *arg,
ctx
->
mb_cmp
[
mb
].
mb
=
mb
;
}
}
else
{
// 10-bit
int
cons
t
linesize
=
ctx
->
m
.
linesize
>>
1
;
const
in
t
linesize
=
ctx
->
m
.
linesize
>>
1
;
for
(
mb_x
=
0
;
mb_x
<
ctx
->
m
.
mb_width
;
++
mb_x
)
{
uint16_t
*
pix
=
(
uint16_t
*
)
ctx
->
thread
[
0
]
->
src
[
0
]
+
((
mb_y
<<
4
)
*
linesize
)
+
(
mb_x
<<
4
);
...
...
@@ -764,7 +764,7 @@ static int dnxhd_mb_var_thread(AVCodecContext *avctx, void *arg,
for
(
i
=
0
;
i
<
16
;
++
i
)
{
for
(
j
=
0
;
j
<
16
;
++
j
)
{
// Turn 16-bit pixels into 10-bit ones.
int
cons
t
sample
=
(
unsigned
)
pix
[
j
]
>>
6
;
const
in
t
sample
=
(
unsigned
)
pix
[
j
]
>>
6
;
sum
+=
sample
;
sqsum
+=
sample
*
sample
;
// 2^10 * 2^10 * 16 * 16 = 2^28, which is less than INT_MAX
...
...
libavcodec/intrax8.c
View file @
8dead2aa
...
...
@@ -289,8 +289,8 @@ static const uint8_t dc_index_offset[] = {
0
,
1
,
2
,
3
,
4
,
5
,
7
,
9
,
13
,
17
,
25
,
33
,
49
,
65
,
97
,
129
,
193
,
};
static
int
x8_get_dc_rlf
(
IntraX8Context
*
const
w
,
int
const
mode
,
int
*
const
level
,
int
*
const
final
)
static
int
x8_get_dc_rlf
(
IntraX8Context
*
const
w
,
const
int
mode
,
int
*
const
level
,
int
*
const
final
)
{
MpegEncContext
*
const
s
=
w
->
s
;
int
i
,
e
,
c
;
...
...
@@ -487,8 +487,8 @@ static void x8_get_prediction(IntraX8Context *const w)
*/
}
static
void
x8_ac_compensation
(
IntraX8Context
*
const
w
,
int
cons
t
direction
,
int
cons
t
dc_level
)
static
void
x8_ac_compensation
(
IntraX8Context
*
const
w
,
const
in
t
direction
,
const
in
t
dc_level
)
{
MpegEncContext
*
const
s
=
w
->
s
;
int
t
;
...
...
@@ -559,8 +559,8 @@ static void x8_ac_compensation(IntraX8Context *const w, int const direction,
#undef T
}
static
void
dsp_x8_put_solidcolor
(
uint8_t
cons
t
pix
,
uint8_t
*
dst
,
int
cons
t
linesize
)
static
void
dsp_x8_put_solidcolor
(
const
uint8_
t
pix
,
uint8_t
*
dst
,
const
in
t
linesize
)
{
int
k
;
for
(
k
=
0
;
k
<
8
;
k
++
)
{
...
...
libavcodec/libopenh264enc.c
View file @
8dead2aa
...
...
@@ -85,7 +85,7 @@ static int libopenh264_to_libav_log_level(int libopenh264_log_level)
//
// typedef void (*WelsTraceCallback) (void* ctx, int level, const char* string);
static
void
libopenh264_trace_callback
(
void
*
ctx
,
int
level
,
c
har
const
*
msg
)
static
void
libopenh264_trace_callback
(
void
*
ctx
,
int
level
,
c
onst
char
*
msg
)
{
// The message will be logged only if the requested EQUIVALENT libav log level is
// less than or equal to the current libav log level.
...
...
libavcodec/motion_est_template.c
View file @
8dead2aa
...
...
@@ -416,7 +416,7 @@ if( (y)>(ymax<<(S)) ) printf("%d %d %d %d %d ymax" #v, ymax, (x), (y), s->mb_x,
const int shift= 1+qpel;\
static
av_always_inline
int
small_diamond_search
(
MpegEncContext
*
s
,
int
*
best
,
int
dmin
,
int
src_index
,
int
ref_index
,
int
cons
t
penalty_factor
,
int
src_index
,
int
ref_index
,
const
in
t
penalty_factor
,
int
size
,
int
h
,
int
flags
)
{
MotionEstContext
*
const
c
=
&
s
->
me
;
...
...
@@ -457,7 +457,7 @@ static av_always_inline int small_diamond_search(MpegEncContext * s, int *best,
}
static
int
funny_diamond_search
(
MpegEncContext
*
s
,
int
*
best
,
int
dmin
,
int
src_index
,
int
ref_index
,
int
cons
t
penalty_factor
,
int
src_index
,
int
ref_index
,
const
in
t
penalty_factor
,
int
size
,
int
h
,
int
flags
)
{
MotionEstContext
*
const
c
=
&
s
->
me
;
...
...
@@ -499,7 +499,7 @@ static int funny_diamond_search(MpegEncContext * s, int *best, int dmin,
}
static
int
hex_search
(
MpegEncContext
*
s
,
int
*
best
,
int
dmin
,
int
src_index
,
int
ref_index
,
int
cons
t
penalty_factor
,
int
src_index
,
int
ref_index
,
const
in
t
penalty_factor
,
int
size
,
int
h
,
int
flags
,
int
dia_size
)
{
MotionEstContext
*
const
c
=
&
s
->
me
;
...
...
@@ -533,7 +533,7 @@ static int hex_search(MpegEncContext * s, int *best, int dmin,
}
static
int
l2s_dia_search
(
MpegEncContext
*
s
,
int
*
best
,
int
dmin
,
int
src_index
,
int
ref_index
,
int
cons
t
penalty_factor
,
int
src_index
,
int
ref_index
,
const
in
t
penalty_factor
,
int
size
,
int
h
,
int
flags
)
{
MotionEstContext
*
const
c
=
&
s
->
me
;
...
...
@@ -571,7 +571,7 @@ static int l2s_dia_search(MpegEncContext * s, int *best, int dmin,
}
static
int
umh_search
(
MpegEncContext
*
s
,
int
*
best
,
int
dmin
,
int
src_index
,
int
ref_index
,
int
cons
t
penalty_factor
,
int
src_index
,
int
ref_index
,
const
in
t
penalty_factor
,
int
size
,
int
h
,
int
flags
)
{
MotionEstContext
*
const
c
=
&
s
->
me
;
...
...
@@ -618,7 +618,7 @@ static int umh_search(MpegEncContext * s, int *best, int dmin,
}
static
int
full_search
(
MpegEncContext
*
s
,
int
*
best
,
int
dmin
,
int
src_index
,
int
ref_index
,
int
cons
t
penalty_factor
,
int
src_index
,
int
ref_index
,
const
in
t
penalty_factor
,
int
size
,
int
h
,
int
flags
)
{
MotionEstContext
*
const
c
=
&
s
->
me
;
...
...
@@ -681,7 +681,7 @@ static int full_search(MpegEncContext * s, int *best, int dmin,
#define MAX_SAB_SIZE ME_MAP_SIZE
static
int
sab_diamond_search
(
MpegEncContext
*
s
,
int
*
best
,
int
dmin
,
int
src_index
,
int
ref_index
,
int
cons
t
penalty_factor
,
int
src_index
,
int
ref_index
,
const
in
t
penalty_factor
,
int
size
,
int
h
,
int
flags
)
{
MotionEstContext
*
const
c
=
&
s
->
me
;
...
...
@@ -769,7 +769,7 @@ static int sab_diamond_search(MpegEncContext * s, int *best, int dmin,
}
static
int
var_diamond_search
(
MpegEncContext
*
s
,
int
*
best
,
int
dmin
,
int
src_index
,
int
ref_index
,
int
cons
t
penalty_factor
,
int
src_index
,
int
ref_index
,
const
in
t
penalty_factor
,
int
size
,
int
h
,
int
flags
)
{
MotionEstContext
*
const
c
=
&
s
->
me
;
...
...
@@ -830,7 +830,7 @@ static int var_diamond_search(MpegEncContext * s, int *best, int dmin,
}
static
av_always_inline
int
diamond_search
(
MpegEncContext
*
s
,
int
*
best
,
int
dmin
,
int
src_index
,
int
ref_index
,
int
cons
t
penalty_factor
,
int
src_index
,
int
ref_index
,
const
in
t
penalty_factor
,
int
size
,
int
h
,
int
flags
){
MotionEstContext
*
const
c
=
&
s
->
me
;
if
(
c
->
dia_size
==-
1
)
...
...
libavcodec/pcx.c
View file @
8dead2aa
...
...
@@ -81,7 +81,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
bytes_per_scanline
;
uint8_t
*
ptr
;
const
uint8_t
*
buf_end
=
buf
+
buf_size
;
uint8_t
cons
t
*
bufstart
=
buf
;
const
uint8_
t
*
bufstart
=
buf
;
uint8_t
*
scanline
;
int
ret
=
-
1
;
...
...
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