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
d4b63054
Commit
d4b63054
authored
Dec 29, 2011
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosmetics: Drop unnecessary parentheses around return values.
parent
f486fb33
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
32 additions
and
31 deletions
+32
-31
avplay.c
avplay.c
+1
-1
cmdutils.c
cmdutils.c
+3
-2
atrac3.c
libavcodec/atrac3.c
+3
-3
dv.c
libavcodec/dv.c
+1
-1
indeo4.c
libavcodec/indeo4.c
+1
-1
ivi_common.h
libavcodec/ivi_common.h
+4
-4
libvorbis.c
libavcodec/libvorbis.c
+1
-1
ra144enc.c
libavcodec/ra144enc.c
+1
-1
vaapi_mpeg2.c
libavcodec/vaapi_mpeg2.c
+2
-2
vaapi_vc1.c
libavcodec/vaapi_vc1.c
+14
-14
vf_drawtext.c
libavfilter/vf_drawtext.c
+1
-1
No files found.
avplay.c
View file @
d4b63054
...
...
@@ -2343,7 +2343,7 @@ static VideoState *global_video_state;
static
int
decode_interrupt_cb
(
void
*
ctx
)
{
return
(
global_video_state
&&
global_video_state
->
abort_request
)
;
return
global_video_state
&&
global_video_state
->
abort_request
;
}
/* this thread gets the stream from the disk or the network */
...
...
cmdutils.c
View file @
d4b63054
...
...
@@ -914,8 +914,9 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
if
(
*
endptr
++
==
':'
)
{
int
stream_idx
=
strtol
(
endptr
,
NULL
,
0
);
return
(
stream_idx
>=
0
&&
stream_idx
<
s
->
programs
[
i
]
->
nb_stream_indexes
&&
st
->
index
==
s
->
programs
[
i
]
->
stream_index
[
stream_idx
]);
return
stream_idx
>=
0
&&
stream_idx
<
s
->
programs
[
i
]
->
nb_stream_indexes
&&
st
->
index
==
s
->
programs
[
i
]
->
stream_index
[
stream_idx
];
}
for
(
j
=
0
;
j
<
s
->
programs
[
i
]
->
nb_stream_indexes
;
j
++
)
...
...
libavcodec/atrac3.c
View file @
d4b63054
...
...
@@ -742,7 +742,7 @@ static int decodeFrame(ATRAC3Context *q, const uint8_t* databuf,
result
=
decodeChannelSoundUnit
(
q
,
&
q
->
gb
,
q
->
pUnits
,
out_samples
[
0
],
0
,
JOINT_STEREO
);
if
(
result
!=
0
)
return
(
result
)
;
return
result
;
/* Framedata of the su2 in the joint-stereo mode is encoded in
* reverse byte order so we need to swap it first. */
...
...
@@ -783,7 +783,7 @@ static int decodeFrame(ATRAC3Context *q, const uint8_t* databuf,
/* Decode Sound Unit 2. */
result
=
decodeChannelSoundUnit
(
q
,
&
q
->
gb
,
&
q
->
pUnits
[
1
],
out_samples
[
1
],
1
,
JOINT_STEREO
);
if
(
result
!=
0
)
return
(
result
)
;
return
result
;
/* Reconstruct the channel coefficients. */
reverseMatrixing
(
out_samples
[
0
],
out_samples
[
1
],
q
->
matrix_coeff_index_prev
,
q
->
matrix_coeff_index_now
);
...
...
@@ -802,7 +802,7 @@ static int decodeFrame(ATRAC3Context *q, const uint8_t* databuf,
result
=
decodeChannelSoundUnit
(
q
,
&
q
->
gb
,
&
q
->
pUnits
[
i
],
out_samples
[
i
],
i
,
q
->
codingMode
);
if
(
result
!=
0
)
return
(
result
)
;
return
result
;
}
}
...
...
libavcodec/dv.c
View file @
d4b63054
...
...
@@ -757,7 +757,7 @@ static av_always_inline int dv_guess_dct_mode(DVVideoContext *s, uint8_t *data,
if
(
ps
>
0
)
{
int
is
=
s
->
ildct_cmp
(
NULL
,
data
,
NULL
,
linesize
<<
1
,
4
)
+
s
->
ildct_cmp
(
NULL
,
data
+
linesize
,
NULL
,
linesize
<<
1
,
4
);
return
(
ps
>
is
)
;
return
ps
>
is
;
}
}
...
...
libavcodec/indeo4.c
View file @
d4b63054
...
...
@@ -148,7 +148,7 @@ static int decode_plane_subdivision(GetBitContext *gb)
static
inline
int
scale_tile_size
(
int
def_size
,
int
size_factor
)
{
return
(
size_factor
==
15
?
def_size
:
(
size_factor
+
1
)
<<
5
)
;
return
size_factor
==
15
?
def_size
:
(
size_factor
+
1
)
<<
5
;
}
/**
...
...
libavcodec/ivi_common.h
View file @
d4b63054
...
...
@@ -195,10 +195,10 @@ typedef struct {
/** compare some properties of two pictures */
static
inline
int
ivi_pic_config_cmp
(
IVIPicConfig
*
str1
,
IVIPicConfig
*
str2
)
{
return
(
str1
->
pic_width
!=
str2
->
pic_width
||
str1
->
pic_height
!=
str2
->
pic_height
||
str1
->
chroma_width
!=
str2
->
chroma_width
||
str1
->
chroma_height
!=
str2
->
chroma_height
||
str1
->
tile_width
!=
str2
->
tile_width
||
str1
->
tile_height
!=
str2
->
tile_height
||
str1
->
luma_bands
!=
str2
->
luma_bands
||
str1
->
chroma_bands
!=
str2
->
chroma_bands
)
;
return
str1
->
pic_width
!=
str2
->
pic_width
||
str1
->
pic_height
!=
str2
->
pic_height
||
str1
->
chroma_width
!=
str2
->
chroma_width
||
str1
->
chroma_height
!=
str2
->
chroma_height
||
str1
->
tile_width
!=
str2
->
tile_width
||
str1
->
tile_height
!=
str2
->
tile_height
||
str1
->
luma_bands
!=
str2
->
luma_bands
||
str1
->
chroma_bands
!=
str2
->
chroma_bands
;
}
/** calculate number of tiles in a stride */
...
...
libavcodec/libvorbis.c
View file @
d4b63054
...
...
@@ -105,7 +105,7 @@ static av_cold int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avcco
/* How many bytes are needed for a buffer of length 'l' */
static
int
xiph_len
(
int
l
)
{
return
(
1
+
l
/
255
+
l
)
;
return
1
+
l
/
255
+
l
;
}
static
av_cold
int
oggvorbis_encode_init
(
AVCodecContext
*
avccontext
)
...
...
libavcodec/ra144enc.c
View file @
d4b63054
...
...
@@ -214,7 +214,7 @@ static int adaptive_cb_search(const int16_t *adapt_cb, float *work,
ff_celp_lp_synthesis_filterf
(
work
,
coefs
,
exc
,
BLOCKSIZE
,
LPC_ORDER
);
for
(
i
=
0
;
i
<
BLOCKSIZE
;
i
++
)
data
[
i
]
-=
best_gain
*
work
[
i
];
return
(
best_vect
-
BLOCKSIZE
/
2
+
1
)
;
return
best_vect
-
BLOCKSIZE
/
2
+
1
;
}
...
...
libavcodec/vaapi_mpeg2.c
View file @
d4b63054
...
...
@@ -26,8 +26,8 @@
/** Reconstruct bitstream f_code */
static
inline
int
mpeg2_get_f_code
(
MpegEncContext
*
s
)
{
return
(
(
s
->
mpeg_f_code
[
0
][
0
]
<<
12
)
|
(
s
->
mpeg_f_code
[
0
][
1
]
<<
8
)
|
(
s
->
mpeg_f_code
[
1
][
0
]
<<
4
)
|
s
->
mpeg_f_code
[
1
][
1
])
;
return
(
s
->
mpeg_f_code
[
0
][
0
]
<<
12
)
|
(
s
->
mpeg_f_code
[
0
][
1
]
<<
8
)
|
(
s
->
mpeg_f_code
[
1
][
0
]
<<
4
)
|
s
->
mpeg_f_code
[
1
][
1
]
;
}
/** Determine frame start: first field for field picture or frame picture */
...
...
libavcodec/vaapi_vc1.c
View file @
d4b63054
...
...
@@ -42,10 +42,10 @@ static inline int vc1_has_MVTYPEMB_bitplane(VC1Context *v)
{
if
(
v
->
mv_type_is_raw
)
return
0
;
return
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_P
&&
(
v
->
mv_mode
==
MV_PMODE_MIXED_MV
||
(
v
->
mv_mode
==
MV_PMODE_INTENSITY_COMP
&&
v
->
mv_mode2
==
MV_PMODE_MIXED_MV
)
));
return
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_P
&&
(
v
->
mv_mode
==
MV_PMODE_MIXED_MV
||
(
v
->
mv_mode
==
MV_PMODE_INTENSITY_COMP
&&
v
->
mv_mode2
==
MV_PMODE_MIXED_MV
));
}
/** Check whether the SKIPMB bitplane is present */
...
...
@@ -53,8 +53,8 @@ static inline int vc1_has_SKIPMB_bitplane(VC1Context *v)
{
if
(
v
->
skip_is_raw
)
return
0
;
return
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_P
||
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_B
&&
!
v
->
bi_type
)
);
return
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_P
||
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_B
&&
!
v
->
bi_type
);
}
/** Check whether the DIRECTMB bitplane is present */
...
...
@@ -70,9 +70,9 @@ static inline int vc1_has_ACPRED_bitplane(VC1Context *v)
{
if
(
v
->
acpred_is_raw
)
return
0
;
return
(
v
->
profile
==
PROFILE_ADVANCED
&&
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_I
||
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_B
&&
v
->
bi_type
)
));
return
v
->
profile
==
PROFILE_ADVANCED
&&
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_I
||
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_B
&&
v
->
bi_type
));
}
/** Check whether the OVERFLAGS bitplane is present */
...
...
@@ -80,11 +80,11 @@ static inline int vc1_has_OVERFLAGS_bitplane(VC1Context *v)
{
if
(
v
->
overflg_is_raw
)
return
0
;
return
(
v
->
profile
==
PROFILE_ADVANCED
&&
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_I
||
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_B
&&
v
->
bi_type
))
&&
(
v
->
overlap
&&
v
->
pq
<=
8
)
&&
v
->
condover
==
CONDOVER_SELECT
)
;
return
v
->
profile
==
PROFILE_ADVANCED
&&
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_I
||
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_B
&&
v
->
bi_type
))
&&
(
v
->
overlap
&&
v
->
pq
<=
8
)
&&
v
->
condover
==
CONDOVER_SELECT
;
}
/** Reconstruct bitstream PTYPE (7.1.1.4, index into Table-35) */
...
...
libavfilter/vf_drawtext.c
View file @
d4b63054
...
...
@@ -429,7 +429,7 @@ static av_cold void uninit(AVFilterContext *ctx)
static
inline
int
is_newline
(
uint32_t
c
)
{
return
(
c
==
'\n'
||
c
==
'\r'
||
c
==
'\f'
||
c
==
'\v'
)
;
return
c
==
'\n'
||
c
==
'\r'
||
c
==
'\f'
||
c
==
'\v'
;
}
static
int
dtext_prepare_text
(
AVFilterContext
*
ctx
)
...
...
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