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
6a08ccd6
Commit
6a08ccd6
authored
Apr 04, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/smptebars: fix output for subsampled yuv
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
3b93bea9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
+16
-13
vsrc_testsrc.c
libavfilter/vsrc_testsrc.c
+16
-13
No files found.
libavfilter/vsrc_testsrc.c
View file @
6a08ccd6
...
@@ -704,12 +704,13 @@ static void smptebars_fill_picture(AVFilterContext *ctx, AVFrame *picref)
...
@@ -704,12 +704,13 @@ static void smptebars_fill_picture(AVFilterContext *ctx, AVFrame *picref)
{
{
TestSourceContext
*
test
=
ctx
->
priv
;
TestSourceContext
*
test
=
ctx
->
priv
;
FFDrawColor
color
;
FFDrawColor
color
;
int
r_w
,
r_h
,
w_h
,
p_w
,
p_h
,
i
,
x
=
0
;
int
r_w
,
r_h
,
w_h
,
p_w
,
p_h
,
i
,
tmp
,
x
=
0
;
const
AVPixFmtDescriptor
*
pixdesc
=
av_pix_fmt_desc_get
(
picref
->
format
);
r_w
=
(
test
->
w
+
6
)
/
7
;
r_w
=
FFALIGN
((
test
->
w
+
6
)
/
7
,
1
<<
pixdesc
->
log2_chroma_w
)
;
r_h
=
test
->
h
*
2
/
3
;
r_h
=
FFALIGN
(
test
->
h
*
2
/
3
,
1
<<
pixdesc
->
log2_chroma_h
)
;
w_h
=
test
->
h
*
3
/
4
-
r_h
;
w_h
=
FFALIGN
(
test
->
h
*
3
/
4
-
r_h
,
1
<<
pixdesc
->
log2_chroma_h
)
;
p_w
=
r_w
*
5
/
4
;
p_w
=
FFALIGN
(
r_w
*
5
/
4
,
1
<<
pixdesc
->
log2_chroma_w
)
;
p_h
=
test
->
h
-
w_h
-
r_h
;
p_h
=
test
->
h
-
w_h
-
r_h
;
#define DRAW_COLOR(rgba, x, y, w, h) \
#define DRAW_COLOR(rgba, x, y, w, h) \
...
@@ -729,14 +730,16 @@ static void smptebars_fill_picture(AVFilterContext *ctx, AVFrame *picref)
...
@@ -729,14 +730,16 @@ static void smptebars_fill_picture(AVFilterContext *ctx, AVFrame *picref)
x
+=
p_w
;
x
+=
p_w
;
DRAW_COLOR
(
q_pixel
,
x
,
r_h
+
w_h
,
p_w
,
p_h
);
DRAW_COLOR
(
q_pixel
,
x
,
r_h
+
w_h
,
p_w
,
p_h
);
x
+=
p_w
;
x
+=
p_w
;
DRAW_COLOR
(
black
,
x
,
r_h
+
w_h
,
5
*
r_w
-
x
,
p_h
);
tmp
=
FFALIGN
(
5
*
r_w
-
x
,
1
<<
pixdesc
->
log2_chroma_w
);
x
+=
5
*
r_w
-
x
;
DRAW_COLOR
(
black
,
x
,
r_h
+
w_h
,
tmp
,
p_h
);
DRAW_COLOR
(
neg4ire
,
x
,
r_h
+
w_h
,
r_w
/
3
,
p_h
);
x
+=
tmp
;
x
+=
r_w
/
3
;
tmp
=
FFALIGN
(
r_w
/
3
,
1
<<
pixdesc
->
log2_chroma_w
);
DRAW_COLOR
(
black
,
x
,
r_h
+
w_h
,
r_w
/
3
,
p_h
);
DRAW_COLOR
(
neg4ire
,
x
,
r_h
+
w_h
,
tmp
,
p_h
);
x
+=
r_w
/
3
;
x
+=
tmp
;
DRAW_COLOR
(
pos4ire
,
x
,
r_h
+
w_h
,
r_w
/
3
,
p_h
);
DRAW_COLOR
(
black
,
x
,
r_h
+
w_h
,
tmp
,
p_h
);
x
+=
r_w
/
3
;
x
+=
tmp
;
DRAW_COLOR
(
pos4ire
,
x
,
r_h
+
w_h
,
tmp
,
p_h
);
x
+=
tmp
;
DRAW_COLOR
(
black
,
x
,
r_h
+
w_h
,
test
->
w
-
x
,
p_h
);
DRAW_COLOR
(
black
,
x
,
r_h
+
w_h
,
test
->
w
-
x
,
p_h
);
}
}
...
...
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