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
9206ac80
Commit
9206ac80
authored
Apr 06, 2012
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: handle last pixel if lines have an odd width.
Fixes bug 270.
parent
f5be7958
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
output.c
libswscale/output.c
+12
-12
No files found.
libswscale/output.c
View file @
9206ac80
...
...
@@ -466,7 +466,7 @@ yuv2422_X_c_template(SwsContext *c, const int16_t *lumFilter,
{
int
i
;
for
(
i
=
0
;
i
<
(
dstW
>>
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
(
dstW
+
1
)
>>
1
);
i
++
)
{
int
j
;
int
Y1
=
1
<<
18
;
int
Y2
=
1
<<
18
;
...
...
@@ -509,7 +509,7 @@ yuv2422_2_c_template(SwsContext *c, const int16_t *buf[2],
int
uvalpha1
=
4095
-
uvalpha
;
int
i
;
for
(
i
=
0
;
i
<
(
dstW
>>
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
(
dstW
+
1
)
>>
1
);
i
++
)
{
int
Y1
=
(
buf0
[
i
*
2
]
*
yalpha1
+
buf1
[
i
*
2
]
*
yalpha
)
>>
19
;
int
Y2
=
(
buf0
[
i
*
2
+
1
]
*
yalpha1
+
buf1
[
i
*
2
+
1
]
*
yalpha
)
>>
19
;
int
U
=
(
ubuf0
[
i
]
*
uvalpha1
+
ubuf1
[
i
]
*
uvalpha
)
>>
19
;
...
...
@@ -534,7 +534,7 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0,
int
i
;
if
(
uvalpha
<
2048
)
{
for
(
i
=
0
;
i
<
(
dstW
>>
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
(
dstW
+
1
)
>>
1
);
i
++
)
{
int
Y1
=
buf0
[
i
*
2
]
>>
7
;
int
Y2
=
buf0
[
i
*
2
+
1
]
>>
7
;
int
U
=
ubuf0
[
i
]
>>
7
;
...
...
@@ -549,7 +549,7 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0,
}
}
else
{
const
int16_t
*
ubuf1
=
ubuf
[
1
],
*
vbuf1
=
vbuf
[
1
];
for
(
i
=
0
;
i
<
(
dstW
>>
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
(
dstW
+
1
)
>>
1
);
i
++
)
{
int
Y1
=
buf0
[
i
*
2
]
>>
7
;
int
Y2
=
buf0
[
i
*
2
+
1
]
>>
7
;
int
U
=
(
ubuf0
[
i
]
+
ubuf1
[
i
])
>>
8
;
...
...
@@ -589,7 +589,7 @@ yuv2rgb48_X_c_template(SwsContext *c, const int16_t *lumFilter,
{
int
i
;
for
(
i
=
0
;
i
<
(
dstW
>>
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
(
dstW
+
1
)
>>
1
);
i
++
)
{
int
j
;
int
Y1
=
-
0x40000000
;
int
Y2
=
-
0x40000000
;
...
...
@@ -652,7 +652,7 @@ yuv2rgb48_2_c_template(SwsContext *c, const int32_t *buf[2],
int
uvalpha1
=
4095
-
uvalpha
;
int
i
;
for
(
i
=
0
;
i
<
(
dstW
>>
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
(
dstW
+
1
)
>>
1
);
i
++
)
{
int
Y1
=
(
buf0
[
i
*
2
]
*
yalpha1
+
buf1
[
i
*
2
]
*
yalpha
)
>>
14
;
int
Y2
=
(
buf0
[
i
*
2
+
1
]
*
yalpha1
+
buf1
[
i
*
2
+
1
]
*
yalpha
)
>>
14
;
int
U
=
(
ubuf0
[
i
]
*
uvalpha1
+
ubuf1
[
i
]
*
uvalpha
+
(
-
128
<<
23
))
>>
14
;
...
...
@@ -690,7 +690,7 @@ yuv2rgb48_1_c_template(SwsContext *c, const int32_t *buf0,
int
i
;
if
(
uvalpha
<
2048
)
{
for
(
i
=
0
;
i
<
(
dstW
>>
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
(
dstW
+
1
)
>>
1
);
i
++
)
{
int
Y1
=
(
buf0
[
i
*
2
]
)
>>
2
;
int
Y2
=
(
buf0
[
i
*
2
+
1
])
>>
2
;
int
U
=
(
ubuf0
[
i
]
+
(
-
128
<<
11
))
>>
2
;
...
...
@@ -718,7 +718,7 @@ yuv2rgb48_1_c_template(SwsContext *c, const int32_t *buf0,
}
}
else
{
const
int32_t
*
ubuf1
=
ubuf
[
1
],
*
vbuf1
=
vbuf
[
1
];
for
(
i
=
0
;
i
<
(
dstW
>>
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
(
dstW
+
1
)
>>
1
);
i
++
)
{
int
Y1
=
(
buf0
[
i
*
2
]
)
>>
2
;
int
Y2
=
(
buf0
[
i
*
2
+
1
])
>>
2
;
int
U
=
(
ubuf0
[
i
]
+
ubuf1
[
i
]
+
(
-
128
<<
12
))
>>
3
;
...
...
@@ -932,7 +932,7 @@ yuv2rgb_X_c_template(SwsContext *c, const int16_t *lumFilter,
{
int
i
;
for
(
i
=
0
;
i
<
(
dstW
>>
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
(
dstW
+
1
)
>>
1
);
i
++
)
{
int
j
,
A1
,
A2
;
int
Y1
=
1
<<
18
;
int
Y2
=
1
<<
18
;
...
...
@@ -999,7 +999,7 @@ yuv2rgb_2_c_template(SwsContext *c, const int16_t *buf[2],
int
uvalpha1
=
4095
-
uvalpha
;
int
i
;
for
(
i
=
0
;
i
<
(
dstW
>>
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
(
dstW
+
1
)
>>
1
);
i
++
)
{
int
Y1
=
(
buf0
[
i
*
2
]
*
yalpha1
+
buf1
[
i
*
2
]
*
yalpha
)
>>
19
;
int
Y2
=
(
buf0
[
i
*
2
+
1
]
*
yalpha1
+
buf1
[
i
*
2
+
1
]
*
yalpha
)
>>
19
;
int
U
=
(
ubuf0
[
i
]
*
uvalpha1
+
ubuf1
[
i
]
*
uvalpha
)
>>
19
;
...
...
@@ -1037,7 +1037,7 @@ yuv2rgb_1_c_template(SwsContext *c, const int16_t *buf0,
int
i
;
if
(
uvalpha
<
2048
)
{
for
(
i
=
0
;
i
<
(
dstW
>>
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
(
dstW
+
1
)
>>
1
);
i
++
)
{
int
Y1
=
buf0
[
i
*
2
]
>>
7
;
int
Y2
=
buf0
[
i
*
2
+
1
]
>>
7
;
int
U
=
ubuf0
[
i
]
>>
7
;
...
...
@@ -1064,7 +1064,7 @@ yuv2rgb_1_c_template(SwsContext *c, const int16_t *buf0,
}
}
else
{
const
int16_t
*
ubuf1
=
ubuf
[
1
],
*
vbuf1
=
vbuf
[
1
];
for
(
i
=
0
;
i
<
(
dstW
>>
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
(
dstW
+
1
)
>>
1
);
i
++
)
{
int
Y1
=
buf0
[
i
*
2
]
>>
7
;
int
Y2
=
buf0
[
i
*
2
+
1
]
>>
7
;
int
U
=
(
ubuf0
[
i
]
+
ubuf1
[
i
])
>>
8
;
...
...
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