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
a390aa0e
Commit
a390aa0e
authored
May 05, 2012
by
Kostya Shishkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eatgv: check motion vectors
parent
30b1961c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
eatgv.c
libavcodec/eatgv.c
+8
-6
No files found.
libavcodec/eatgv.c
View file @
a390aa0e
...
...
@@ -136,7 +136,6 @@ static int unpack(const uint8_t *src, const uint8_t *src_end, unsigned char *dst
* @return 0 on success, -1 on critical buffer underflow
*/
static
int
tgv_decode_inter
(
TgvContext
*
s
,
const
uint8_t
*
buf
,
const
uint8_t
*
buf_end
){
unsigned
char
*
frame0_end
=
s
->
last_frame
.
data
[
0
]
+
s
->
avctx
->
width
*
s
->
last_frame
.
linesize
[
0
];
int
num_mvs
;
int
num_blocks_raw
;
int
num_blocks_packed
;
...
...
@@ -205,12 +204,15 @@ static int tgv_decode_inter(TgvContext * s, const uint8_t *buf, const uint8_t *b
int
src_stride
;
if
(
vector
<
num_mvs
)
{
src
=
s
->
last_frame
.
data
[
0
]
+
(
y
*
4
+
s
->
mv_codebook
[
vector
][
1
])
*
s
->
last_frame
.
linesize
[
0
]
+
x
*
4
+
s
->
mv_codebook
[
vector
][
0
];
src_stride
=
s
->
last_frame
.
linesize
[
0
];
if
(
src
+
3
*
src_stride
+
3
>=
frame0_end
)
int
mx
=
x
*
4
+
s
->
mv_codebook
[
vector
][
0
];
int
my
=
y
*
4
+
s
->
mv_codebook
[
vector
][
1
];
if
(
mx
<
0
||
mx
+
4
>
s
->
avctx
->
width
||
my
<
0
||
my
+
4
>
s
->
avctx
->
height
)
continue
;
src
=
s
->
last_frame
.
data
[
0
]
+
mx
+
my
*
s
->
last_frame
.
linesize
[
0
];
src_stride
=
s
->
last_frame
.
linesize
[
0
];
}
else
{
int
offset
=
vector
-
num_mvs
;
if
(
offset
<
num_blocks_raw
)
...
...
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