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
0f4eb8b0
Commit
0f4eb8b0
authored
May 26, 2011
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: remove VOF/VOFW.
parent
b4a224c5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
16 deletions
+7
-16
swscale_internal.h
libswscale/swscale_internal.h
+0
-8
utils.c
libswscale/utils.c
+7
-8
No files found.
libswscale/swscale_internal.h
View file @
0f4eb8b0
...
@@ -35,14 +35,6 @@
...
@@ -35,14 +35,6 @@
#define MAX_FILTER_SIZE 256
#define MAX_FILTER_SIZE 256
#if ARCH_X86
#define VOFW 5120
#else
#define VOFW 2048 // faster on PPC and not tested on others
#endif
#define VOF (VOFW*2)
#if HAVE_BIGENDIAN
#if HAVE_BIGENDIAN
#define ALT32_CORR (-1)
#define ALT32_CORR (-1)
#else
#else
...
...
libswscale/utils.c
View file @
0f4eb8b0
...
@@ -749,6 +749,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
...
@@ -749,6 +749,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
int
srcH
=
c
->
srcH
;
int
srcH
=
c
->
srcH
;
int
dstW
=
c
->
dstW
;
int
dstW
=
c
->
dstW
;
int
dstH
=
c
->
dstH
;
int
dstH
=
c
->
dstH
;
int
dst_stride
=
FFALIGN
(
dstW
*
sizeof
(
int16_t
),
16
),
dst_stride_px
=
dst_stride
>>
1
;
int
flags
,
cpu_flags
;
int
flags
,
cpu_flags
;
enum
PixelFormat
srcFormat
=
c
->
srcFormat
;
enum
PixelFormat
srcFormat
=
c
->
srcFormat
;
enum
PixelFormat
dstFormat
=
c
->
dstFormat
;
enum
PixelFormat
dstFormat
=
c
->
dstFormat
;
...
@@ -996,26 +997,24 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
...
@@ -996,26 +997,24 @@ 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
],
VOF
+
1
,
fail
);
FF_ALLOCZ_OR_GOTO
(
c
,
c
->
lumPixBuf
[
i
+
c
->
vLumBufSize
],
dst_stride
+
1
,
fail
);
c
->
lumPixBuf
[
i
]
=
c
->
lumPixBuf
[
i
+
c
->
vLumBufSize
];
c
->
lumPixBuf
[
i
]
=
c
->
lumPixBuf
[
i
+
c
->
vLumBufSize
];
}
}
c
->
uv_off
=
VOFW
;
c
->
uv_off
=
dst_stride_px
;
for
(
i
=
0
;
i
<
c
->
vChrBufSize
;
i
++
)
{
for
(
i
=
0
;
i
<
c
->
vChrBufSize
;
i
++
)
{
FF_ALLOC_OR_GOTO
(
c
,
c
->
chrUPixBuf
[
i
+
c
->
vChrBufSize
],
VOF
*
2
+
1
,
fail
);
FF_ALLOC_OR_GOTO
(
c
,
c
->
chrUPixBuf
[
i
+
c
->
vChrBufSize
],
dst_stride
*
2
+
1
,
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
]
+
VOFW
;
c
->
chrVPixBuf
[
i
]
=
c
->
chrVPixBuf
[
i
+
c
->
vChrBufSize
]
=
c
->
chrUPixBuf
[
i
]
+
dst_stride_px
;
}
}
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
],
VOF
+
1
,
fail
);
FF_ALLOCZ_OR_GOTO
(
c
,
c
->
alpPixBuf
[
i
+
c
->
vLumBufSize
],
dst_stride
+
1
,
fail
);
c
->
alpPixBuf
[
i
]
=
c
->
alpPixBuf
[
i
+
c
->
vLumBufSize
];
c
->
alpPixBuf
[
i
]
=
c
->
alpPixBuf
[
i
+
c
->
vLumBufSize
];
}
}
//try to avoid drawing green stuff between the right end and the stride end
//try to avoid drawing green stuff between the right end and the stride end
for
(
i
=
0
;
i
<
c
->
vChrBufSize
;
i
++
)
for
(
i
=
0
;
i
<
c
->
vChrBufSize
;
i
++
)
memset
(
c
->
chrUPixBuf
[
i
],
64
,
VOF
*
2
+
1
);
memset
(
c
->
chrUPixBuf
[
i
],
64
,
dst_stride
*
2
+
1
);
assert
(
2
*
VOFW
==
VOF
);
assert
(
c
->
chrDstH
<=
dstH
);
assert
(
c
->
chrDstH
<=
dstH
);
...
...
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