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
1d0ae92a
Commit
1d0ae92a
authored
Dec 19, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eamad: pass & check errors
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
03a9c993
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
eamad.c
libavcodec/eamad.c
+9
-5
No files found.
libavcodec/eamad.c
View file @
1d0ae92a
...
...
@@ -119,7 +119,7 @@ static inline void idct_put(MadContext *t, DCTELEM *block, int mb_x, int mb_y, i
}
}
static
inline
void
decode_block_intra
(
MadContext
*
t
,
DCTELEM
*
block
)
static
inline
int
decode_block_intra
(
MadContext
*
t
,
DCTELEM
*
block
)
{
MpegEncContext
*
s
=
&
t
->
s
;
int
level
,
i
,
j
,
run
;
...
...
@@ -170,13 +170,14 @@ static inline void decode_block_intra(MadContext * t, DCTELEM * block)
}
if
(
i
>
63
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"ac-tex damaged at %d %d
\n
"
,
s
->
mb_x
,
s
->
mb_y
);
return
;
return
-
1
;
}
block
[
j
]
=
level
;
}
CLOSE_READER
(
re
,
&
s
->
gb
);
}
return
0
;
}
static
int
decode_motion
(
GetBitContext
*
gb
)
...
...
@@ -190,7 +191,7 @@ static int decode_motion(GetBitContext *gb)
return
value
;
}
static
void
decode_mb
(
MadContext
*
t
,
int
inter
)
static
int
decode_mb
(
MadContext
*
t
,
int
inter
)
{
MpegEncContext
*
s
=
&
t
->
s
;
int
mv_map
=
0
;
...
...
@@ -215,10 +216,12 @@ static void decode_mb(MadContext *t, int inter)
comp_block
(
t
,
s
->
mb_x
,
s
->
mb_y
,
j
,
mv_x
,
mv_y
,
add
);
}
else
{
s
->
dsp
.
clear_block
(
t
->
block
);
decode_block_intra
(
t
,
t
->
block
);
if
(
decode_block_intra
(
t
,
t
->
block
)
<
0
)
return
-
1
;
idct_put
(
t
,
t
->
block
,
s
->
mb_x
,
s
->
mb_y
,
j
);
}
}
return
0
;
}
static
void
calc_intra_matrix
(
MadContext
*
t
,
int
qscale
)
...
...
@@ -296,7 +299,8 @@ static int decode_frame(AVCodecContext *avctx,
for
(
s
->
mb_y
=
0
;
s
->
mb_y
<
(
avctx
->
height
+
15
)
/
16
;
s
->
mb_y
++
)
for
(
s
->
mb_x
=
0
;
s
->
mb_x
<
(
avctx
->
width
+
15
)
/
16
;
s
->
mb_x
++
)
decode_mb
(
t
,
inter
);
if
(
decode_mb
(
t
,
inter
)
<
0
)
return
-
1
;
*
data_size
=
sizeof
(
AVFrame
);
*
(
AVFrame
*
)
data
=
t
->
frame
;
...
...
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