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
612abe27
Commit
612abe27
authored
May 19, 2012
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a variable instead of a repeated calculation when decoding AVUI.
parent
f1892348
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
avuidec.c
libavcodec/avuidec.c
+5
-7
No files found.
libavcodec/avuidec.c
View file @
612abe27
...
...
@@ -43,7 +43,7 @@ static int avui_decode_frame(AVCodecContext *avctx, void *data,
const
uint8_t
*
src
=
avpkt
->
data
;
const
uint8_t
*
srca
;
uint8_t
*
y
,
*
u
,
*
v
,
*
a
;
int
transparent
,
interlaced
=
1
,
skip
,
i
,
j
,
k
;
int
transparent
,
interlaced
=
1
,
skip
,
opaque_length
,
i
,
j
,
k
;
if
(
pic
->
data
[
0
])
avctx
->
release_buffer
(
avctx
,
pic
);
...
...
@@ -56,16 +56,14 @@ static int avui_decode_frame(AVCodecContext *avctx, void *data,
}
else
{
skip
=
16
;
}
if
(
avpkt
->
size
<
2
*
avctx
->
width
*
(
avctx
->
height
+
skip
)
+
4
*
interlaced
)
{
opaque_length
=
2
*
avctx
->
width
*
(
avctx
->
height
+
skip
)
+
4
*
interlaced
;
if
(
avpkt
->
size
<
opaque_length
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Insufficient input data.
\n
"
);
return
AVERROR
(
EINVAL
);
}
transparent
=
avctx
->
bits_per_coded_sample
==
32
&&
avpkt
->
size
>=
2
*
(
avctx
->
height
+
skip
)
*
2
*
avctx
->
width
+
4
+
8
*
interlaced
;
srca
=
src
+
2
*
(
avctx
->
height
+
skip
)
*
avctx
->
width
+
5
+
interlaced
*
4
;
avpkt
->
size
>=
opaque_length
*
2
+
4
;
srca
=
src
+
opaque_length
+
5
;
pic
->
reference
=
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