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
baba2eed
Commit
baba2eed
authored
Jul 14, 2011
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: extend mmx padding.
Fixes a crash when forcing libc to strictly adhere to malloc sizes.
parent
55eda370
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
utils.c
libswscale/utils.c
+7
-6
No files found.
libswscale/utils.c
View file @
baba2eed
...
@@ -1049,19 +1049,20 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
...
@@ -1049,19 +1049,20 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
//Note we need at least one pixel more at the end because of the MMX code (just in case someone wanna replace the 4000/8000)
//Note we need at least one pixel more at the end because of the MMX code (just in case someone wanna replace the 4000/8000)
/* align at 16 bytes for AltiVec */
/* align at 16 bytes for AltiVec */
for
(
i
=
0
;
i
<
c
->
vLumBufSize
;
i
++
)
{
for
(
i
=
0
;
i
<
c
->
vLumBufSize
;
i
++
)
{
FF_ALLOCZ_OR_GOTO
(
c
,
c
->
lumPixBuf
[
i
+
c
->
vLumBufSize
],
dst_stride
+
1
,
fail
);
FF_ALLOCZ_OR_GOTO
(
c
,
c
->
lumPixBuf
[
i
+
c
->
vLumBufSize
],
dst_stride
+
1
6
,
fail
);
c
->
lumPixBuf
[
i
]
=
c
->
lumPixBuf
[
i
+
c
->
vLumBufSize
];
c
->
lumPixBuf
[
i
]
=
c
->
lumPixBuf
[
i
+
c
->
vLumBufSize
];
}
}
c
->
uv_off_px
=
dst_stride_px
;
// 64 / c->scalingBpp is the same as 16 / sizeof(scaling_intermediate)
c
->
uv_off_byte
=
dst_stride
;
c
->
uv_off_px
=
dst_stride_px
+
64
/
c
->
scalingBpp
;
c
->
uv_off_byte
=
dst_stride
+
16
;
for
(
i
=
0
;
i
<
c
->
vChrBufSize
;
i
++
)
{
for
(
i
=
0
;
i
<
c
->
vChrBufSize
;
i
++
)
{
FF_ALLOC_OR_GOTO
(
c
,
c
->
chrUPixBuf
[
i
+
c
->
vChrBufSize
],
dst_stride
*
2
+
1
,
fail
);
FF_ALLOC_OR_GOTO
(
c
,
c
->
chrUPixBuf
[
i
+
c
->
vChrBufSize
],
dst_stride
*
2
+
32
,
fail
);
c
->
chrUPixBuf
[
i
]
=
c
->
chrUPixBuf
[
i
+
c
->
vChrBufSize
];
c
->
chrUPixBuf
[
i
]
=
c
->
chrUPixBuf
[
i
+
c
->
vChrBufSize
];
c
->
chrVPixBuf
[
i
]
=
c
->
chrVPixBuf
[
i
+
c
->
vChrBufSize
]
=
c
->
chrUPixBuf
[
i
]
+
(
dst_stride
>>
1
);
c
->
chrVPixBuf
[
i
]
=
c
->
chrVPixBuf
[
i
+
c
->
vChrBufSize
]
=
c
->
chrUPixBuf
[
i
]
+
(
dst_stride
>>
1
)
+
8
;
}
}
if
(
CONFIG_SWSCALE_ALPHA
&&
c
->
alpPixBuf
)
if
(
CONFIG_SWSCALE_ALPHA
&&
c
->
alpPixBuf
)
for
(
i
=
0
;
i
<
c
->
vLumBufSize
;
i
++
)
{
for
(
i
=
0
;
i
<
c
->
vLumBufSize
;
i
++
)
{
FF_ALLOCZ_OR_GOTO
(
c
,
c
->
alpPixBuf
[
i
+
c
->
vLumBufSize
],
dst_stride
+
1
,
fail
);
FF_ALLOCZ_OR_GOTO
(
c
,
c
->
alpPixBuf
[
i
+
c
->
vLumBufSize
],
dst_stride
+
1
6
,
fail
);
c
->
alpPixBuf
[
i
]
=
c
->
alpPixBuf
[
i
+
c
->
vLumBufSize
];
c
->
alpPixBuf
[
i
]
=
c
->
alpPixBuf
[
i
+
c
->
vLumBufSize
];
}
}
...
...
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