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
f0708b75
Commit
f0708b75
authored
Aug 09, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vsrc_testsrc: correct colors for smptebars
parent
92a4bda9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
21 deletions
+30
-21
vsrc_testsrc.c
libavfilter/vsrc_testsrc.c
+30
-21
No files found.
libavfilter/vsrc_testsrc.c
View file @
f0708b75
...
@@ -801,35 +801,44 @@ AVFilter ff_vsrc_rgbtestsrc = {
...
@@ -801,35 +801,44 @@ AVFilter ff_vsrc_rgbtestsrc = {
#if CONFIG_SMPTEBARS_FILTER || CONFIG_SMPTEHDBARS_FILTER
#if CONFIG_SMPTEBARS_FILTER || CONFIG_SMPTEHDBARS_FILTER
static
const
uint8_t
rainbow
[
7
][
4
]
=
{
static
const
uint8_t
rainbow
[
7
][
4
]
=
{
{
180
,
128
,
128
,
255
},
/* gray */
{
180
,
128
,
128
,
255
},
/* 75% white */
{
168
,
44
,
136
,
255
},
/* yellow */
{
161
,
44
,
141
,
255
},
/* 75% yellow */
{
145
,
147
,
44
,
255
},
/* cyan */
{
131
,
156
,
44
,
255
},
/* 75% cyan */
{
133
,
63
,
52
,
255
},
/* green */
{
112
,
72
,
57
,
255
},
/* 75% green */
{
63
,
193
,
204
,
255
},
/* magenta */
{
83
,
183
,
198
,
255
},
/* 75% magenta */
{
51
,
109
,
212
,
255
},
/* red */
{
65
,
99
,
212
,
255
},
/* 75% red */
{
28
,
212
,
120
,
255
},
/* blue */
{
34
,
212
,
114
,
255
},
/* 75% blue */
};
static
const
uint8_t
rainbowhd
[
7
][
4
]
=
{
{
180
,
128
,
128
,
255
},
/* 75% white */
{
168
,
44
,
136
,
255
},
/* 75% yellow */
{
145
,
147
,
44
,
255
},
/* 75% cyan */
{
133
,
63
,
52
,
255
},
/* 75% green */
{
63
,
193
,
204
,
255
},
/* 75% magenta */
{
51
,
109
,
212
,
255
},
/* 75% red */
{
28
,
212
,
120
,
255
},
/* 75% blue */
};
};
static
const
uint8_t
wobnair
[
7
][
4
]
=
{
static
const
uint8_t
wobnair
[
7
][
4
]
=
{
{
3
2
,
240
,
118
,
255
},
/*
blue */
{
3
4
,
212
,
114
,
255
},
/* 75%
blue */
{
19
,
128
,
128
,
255
},
/* 7.5% intensity black */
{
19
,
128
,
128
,
255
},
/* 7.5% intensity black */
{
54
,
184
,
198
,
255
},
/*
magenta */
{
83
,
183
,
198
,
255
},
/* 75%
magenta */
{
19
,
128
,
128
,
255
},
/* 7.5% intensity black */
{
19
,
128
,
128
,
255
},
/* 7.5% intensity black */
{
1
88
,
154
,
16
,
255
},
/*
cyan */
{
1
31
,
156
,
44
,
255
},
/* 75%
cyan */
{
19
,
128
,
128
,
255
},
/* 7.5% intensity black */
{
19
,
128
,
128
,
255
},
/* 7.5% intensity black */
{
1
91
,
128
,
128
,
255
},
/* gray
*/
{
1
80
,
128
,
128
,
255
},
/* 75% white
*/
};
};
static
const
uint8_t
white
[
4
]
=
{
235
,
128
,
128
,
255
};
static
const
uint8_t
white
[
4
]
=
{
235
,
128
,
128
,
255
};
static
const
uint8_t
black
[
4
]
=
{
19
,
128
,
128
,
255
};
/* 7.5% intensity black */
/* pluge pulses */
/* pluge pulses */
static
const
uint8_t
neg4ire
[
4
]
=
{
9
,
128
,
128
,
255
};
/* 3.5% intensity black */
static
const
uint8_t
neg4ire
[
4
]
=
{
7
,
128
,
128
,
255
};
static
const
uint8_t
pos4ire
[
4
]
=
{
2
9
,
128
,
128
,
255
};
/* 11.5% intensity black */
static
const
uint8_t
pos4ire
[
4
]
=
{
2
4
,
128
,
128
,
255
};
/* fudged Q/-I */
/* fudged Q/-I */
static
const
uint8_t
i_pixel
[
4
]
=
{
61
,
153
,
99
,
255
};
static
const
uint8_t
i_pixel
[
4
]
=
{
57
,
156
,
97
,
255
};
static
const
uint8_t
q_pixel
[
4
]
=
{
35
,
174
,
152
,
255
};
static
const
uint8_t
q_pixel
[
4
]
=
{
44
,
171
,
147
,
255
};
static
const
uint8_t
gray40
[
4
]
=
{
104
,
128
,
128
,
255
};
static
const
uint8_t
gray40
[
4
]
=
{
104
,
128
,
128
,
255
};
static
const
uint8_t
gray15
[
4
]
=
{
49
,
128
,
128
,
255
};
static
const
uint8_t
gray15
[
4
]
=
{
49
,
128
,
128
,
255
};
...
@@ -940,16 +949,16 @@ static void smptebars_fill_picture(AVFilterContext *ctx, AVFrame *picref)
...
@@ -940,16 +949,16 @@ static void smptebars_fill_picture(AVFilterContext *ctx, AVFrame *picref)
draw_bar
(
test
,
q_pixel
,
x
,
r_h
+
w_h
,
p_w
,
p_h
,
picref
);
draw_bar
(
test
,
q_pixel
,
x
,
r_h
+
w_h
,
p_w
,
p_h
,
picref
);
x
+=
p_w
;
x
+=
p_w
;
tmp
=
FFALIGN
(
5
*
r_w
-
x
,
1
<<
pixdesc
->
log2_chroma_w
);
tmp
=
FFALIGN
(
5
*
r_w
-
x
,
1
<<
pixdesc
->
log2_chroma_w
);
draw_bar
(
test
,
black
,
x
,
r_h
+
w_h
,
tmp
,
p_h
,
picref
);
draw_bar
(
test
,
black
0
,
x
,
r_h
+
w_h
,
tmp
,
p_h
,
picref
);
x
+=
tmp
;
x
+=
tmp
;
tmp
=
FFALIGN
(
r_w
/
3
,
1
<<
pixdesc
->
log2_chroma_w
);
tmp
=
FFALIGN
(
r_w
/
3
,
1
<<
pixdesc
->
log2_chroma_w
);
draw_bar
(
test
,
neg4ire
,
x
,
r_h
+
w_h
,
tmp
,
p_h
,
picref
);
draw_bar
(
test
,
neg4ire
,
x
,
r_h
+
w_h
,
tmp
,
p_h
,
picref
);
x
+=
tmp
;
x
+=
tmp
;
draw_bar
(
test
,
black
,
x
,
r_h
+
w_h
,
tmp
,
p_h
,
picref
);
draw_bar
(
test
,
black
0
,
x
,
r_h
+
w_h
,
tmp
,
p_h
,
picref
);
x
+=
tmp
;
x
+=
tmp
;
draw_bar
(
test
,
pos4ire
,
x
,
r_h
+
w_h
,
tmp
,
p_h
,
picref
);
draw_bar
(
test
,
pos4ire
,
x
,
r_h
+
w_h
,
tmp
,
p_h
,
picref
);
x
+=
tmp
;
x
+=
tmp
;
draw_bar
(
test
,
black
,
x
,
r_h
+
w_h
,
test
->
w
-
x
,
p_h
,
picref
);
draw_bar
(
test
,
black
0
,
x
,
r_h
+
w_h
,
test
->
w
-
x
,
p_h
,
picref
);
}
}
static
av_cold
int
smptebars_init
(
AVFilterContext
*
ctx
)
static
av_cold
int
smptebars_init
(
AVFilterContext
*
ctx
)
...
@@ -995,7 +1004,7 @@ static void smptehdbars_fill_picture(AVFilterContext *ctx, AVFrame *picref)
...
@@ -995,7 +1004,7 @@ static void smptehdbars_fill_picture(AVFilterContext *ctx, AVFrame *picref)
r_w
=
FFALIGN
((((
test
->
w
+
3
)
/
4
)
*
3
)
/
7
,
1
<<
pixdesc
->
log2_chroma_w
);
r_w
=
FFALIGN
((((
test
->
w
+
3
)
/
4
)
*
3
)
/
7
,
1
<<
pixdesc
->
log2_chroma_w
);
for
(
i
=
0
;
i
<
7
;
i
++
)
{
for
(
i
=
0
;
i
<
7
;
i
++
)
{
draw_bar
(
test
,
rainbow
[
i
],
x
,
0
,
r_w
,
r_h
,
picref
);
draw_bar
(
test
,
rainbow
hd
[
i
],
x
,
0
,
r_w
,
r_h
,
picref
);
x
+=
r_w
;
x
+=
r_w
;
}
}
draw_bar
(
test
,
gray40
,
x
,
0
,
test
->
w
-
x
,
r_h
,
picref
);
draw_bar
(
test
,
gray40
,
x
,
0
,
test
->
w
-
x
,
r_h
,
picref
);
...
@@ -1006,7 +1015,7 @@ static void smptehdbars_fill_picture(AVFilterContext *ctx, AVFrame *picref)
...
@@ -1006,7 +1015,7 @@ static void smptehdbars_fill_picture(AVFilterContext *ctx, AVFrame *picref)
draw_bar
(
test
,
i_pixel
,
x
,
y
,
r_w
,
r_h
,
picref
);
draw_bar
(
test
,
i_pixel
,
x
,
y
,
r_w
,
r_h
,
picref
);
x
+=
r_w
;
x
+=
r_w
;
tmp
=
r_w
*
6
;
tmp
=
r_w
*
6
;
draw_bar
(
test
,
rainbow
[
0
],
x
,
y
,
tmp
,
r_h
,
picref
);
draw_bar
(
test
,
rainbow
hd
[
0
],
x
,
y
,
tmp
,
r_h
,
picref
);
x
+=
tmp
;
x
+=
tmp
;
l_w
=
x
;
l_w
=
x
;
draw_bar
(
test
,
blue
,
x
,
y
,
test
->
w
-
x
,
r_h
,
picref
);
draw_bar
(
test
,
blue
,
x
,
y
,
test
->
w
-
x
,
r_h
,
picref
);
...
...
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