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
ff9d11f9
Commit
ff9d11f9
authored
Oct 21, 2013
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lsws: use av_pix_fmt_get_chroma_sub_sample()
Remove duplicated getSubSampleFactors() function. Simplify.
parent
2f31b73a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
utils.c
libswscale/utils.c
+2
-9
No files found.
libswscale/utils.c
View file @
ff9d11f9
...
...
@@ -821,13 +821,6 @@ static av_cold int init_hscaler_mmxext(int dstW, int xInc, uint8_t *filterCode,
}
#endif
/* HAVE_MMXEXT_INLINE */
static
void
getSubSampleFactors
(
int
*
h
,
int
*
v
,
enum
AVPixelFormat
format
)
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
format
);
*
h
=
desc
->
log2_chroma_w
;
*
v
=
desc
->
log2_chroma_h
;
}
static
void
fill_rgb2yuv_table
(
SwsContext
*
c
,
const
int
table
[
4
],
int
dstRange
)
{
int64_t
W
,
V
,
Z
,
Cy
,
Cu
,
Cv
;
...
...
@@ -1199,8 +1192,8 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
(
dstFilter
->
lumH
&&
dstFilter
->
lumH
->
length
>
1
)
||
(
dstFilter
->
chrH
&&
dstFilter
->
chrH
->
length
>
1
);
getSubSampleFactors
(
&
c
->
chrSrcHSubSample
,
&
c
->
chrSrcVSubSample
,
srcFormat
);
getSubSampleFactors
(
&
c
->
chrDstHSubSample
,
&
c
->
chrDstVSubSample
,
dstFormat
);
av_pix_fmt_get_chroma_sub_sample
(
srcFormat
,
&
c
->
chrSrcHSubSample
,
&
c
->
chrSrcVSubSample
);
av_pix_fmt_get_chroma_sub_sample
(
dstFormat
,
&
c
->
chrDstHSubSample
,
&
c
->
chrDstVSubSample
);
if
(
isAnyRGB
(
dstFormat
)
&&
!
(
flags
&
SWS_FULL_CHR_H_INT
))
{
if
(
dstW
&
1
)
{
...
...
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