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
234369d0
Commit
234369d0
authored
Oct 13, 2015
by
Christophe Gisquet
Committed by
James Almer
Oct 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnxhdenc: fix access outside of image
This is the same test as for the 8bit case.
parent
74c41420
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
dnxhdenc.c
libavcodec/dnxhdenc.c
+4
-2
No files found.
libavcodec/dnxhdenc.c
View file @
234369d0
...
...
@@ -776,11 +776,13 @@ static int dnxhd_mb_var_thread(AVCodecContext *avctx, void *arg,
unsigned
mb
=
mb_y
*
ctx
->
m
.
mb_width
+
mb_x
;
int
sum
=
0
;
int
sqsum
=
0
;
int
bw
=
FFMIN
(
avctx
->
width
-
16
*
mb_x
,
16
);
int
bh
=
FFMIN
((
avctx
->
height
>>
ctx
->
interlaced
)
-
16
*
mb_y
,
16
);
int
mean
,
sqmean
;
int
i
,
j
;
// Macroblocks are 16x16 pixels, unlike DCT blocks which are 8x8.
for
(
i
=
0
;
i
<
16
;
++
i
)
{
for
(
j
=
0
;
j
<
16
;
++
j
)
{
for
(
i
=
0
;
i
<
bh
;
++
i
)
{
for
(
j
=
0
;
j
<
bw
;
++
j
)
{
// Turn 16-bit pixels into 10-bit ones.
int
const
sample
=
(
unsigned
)
pix
[
j
]
>>
6
;
sum
+=
sample
;
...
...
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