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
7ba04b3c
Commit
7ba04b3c
authored
May 16, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/pixdesctest: fix chroma subsampling with odd sizes.
parent
35cf069a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
vf_pixdesctest.c
libavfilter/vf_pixdesctest.c
+7
-6
No files found.
libavfilter/vf_pixdesctest.c
View file @
7ba04b3c
...
...
@@ -59,6 +59,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFilterLink
*
outlink
=
inlink
->
dst
->
outputs
[
0
];
AVFrame
*
out
;
int
i
,
c
,
w
=
inlink
->
w
,
h
=
inlink
->
h
;
const
int
cw
=
FF_CEIL_RSHIFT
(
w
,
priv
->
pix_desc
->
log2_chroma_w
);
const
int
ch
=
FF_CEIL_RSHIFT
(
h
,
priv
->
pix_desc
->
log2_chroma_h
);
out
=
ff_get_video_buffer
(
outlink
,
outlink
->
w
,
outlink
->
h
);
if
(
!
out
)
{
...
...
@@ -69,12 +71,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
av_frame_copy_props
(
out
,
in
);
for
(
i
=
0
;
i
<
4
;
i
++
)
{
int
h
=
outlink
->
h
;
h
=
i
==
1
||
i
==
2
?
h
>>
priv
->
pix_desc
->
log2_chroma_h
:
h
;
const
int
h1
=
i
==
1
||
i
==
2
?
ch
:
h
;
if
(
out
->
data
[
i
])
{
uint8_t
*
data
=
out
->
data
[
i
]
+
(
out
->
linesize
[
i
]
>
0
?
0
:
out
->
linesize
[
i
]
*
(
h
-
1
));
memset
(
data
,
0
,
FFABS
(
out
->
linesize
[
i
])
*
h
);
(
out
->
linesize
[
i
]
>
0
?
0
:
out
->
linesize
[
i
]
*
(
h
1
-
1
));
memset
(
data
,
0
,
FFABS
(
out
->
linesize
[
i
])
*
h
1
);
}
}
...
...
@@ -84,8 +85,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
memcpy
(
out
->
data
[
1
],
in
->
data
[
1
],
AVPALETTE_SIZE
);
for
(
c
=
0
;
c
<
priv
->
pix_desc
->
nb_components
;
c
++
)
{
int
w1
=
c
==
1
||
c
==
2
?
w
>>
priv
->
pix_desc
->
log2_chroma_
w
:
w
;
int
h1
=
c
==
1
||
c
==
2
?
h
>>
priv
->
pix_desc
->
log2_chroma_
h
:
h
;
const
int
w1
=
c
==
1
||
c
==
2
?
c
w
:
w
;
const
int
h1
=
c
==
1
||
c
==
2
?
c
h
:
h
;
for
(
i
=
0
;
i
<
h1
;
i
++
)
{
av_read_image_line
(
priv
->
line
,
...
...
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