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
052f64ec
Commit
052f64ec
authored
Jul 03, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: ayuv64le input support
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
f0489a35
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
0 deletions
+40
-0
input.c
libswscale/input.c
+36
-0
swscale_internal.h
libswscale/swscale_internal.h
+2
-0
swscale_unscaled.c
libswscale/swscale_unscaled.c
+1
-0
utils.c
libswscale/utils.c
+1
-0
No files found.
libswscale/input.c
View file @
052f64ec
...
@@ -607,6 +607,33 @@ static void read_ya16be_alpha_c(uint8_t *dst, const uint8_t *src, const uint8_t
...
@@ -607,6 +607,33 @@ static void read_ya16be_alpha_c(uint8_t *dst, const uint8_t *src, const uint8_t
AV_WN16
(
dst
+
i
*
2
,
AV_RB16
(
src
+
i
*
4
+
2
));
AV_WN16
(
dst
+
i
*
2
,
AV_RB16
(
src
+
i
*
4
+
2
));
}
}
static
void
read_ayuv64le_Y_c
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused0
,
const
uint8_t
*
unused1
,
int
width
,
uint32_t
*
unused2
)
{
int
i
;
for
(
i
=
0
;
i
<
width
;
i
++
)
AV_WN16
(
dst
+
i
*
2
,
AV_RL16
(
src
+
i
*
8
+
2
));
}
static
void
read_ayuv64le_UV_c
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
unused0
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
int
width
,
uint32_t
*
unused2
)
{
int
i
;
for
(
i
=
0
;
i
<
width
;
i
++
)
{
AV_WN16
(
dstU
+
i
*
2
,
AV_RL16
(
src
+
i
*
8
+
4
));
AV_WN16
(
dstV
+
i
*
2
,
AV_RL16
(
src
+
i
*
8
+
6
));
}
}
static
void
read_ayuv64le_A_c
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused0
,
const
uint8_t
*
unused1
,
int
width
,
uint32_t
*
unused2
)
{
int
i
;
for
(
i
=
0
;
i
<
width
;
i
++
)
AV_WN16
(
dst
+
i
*
2
,
AV_RL16
(
src
+
i
*
8
));
}
/* This is almost identical to the previous, end exists only because
/* This is almost identical to the previous, end exists only because
* yuy2ToY/UV)(dst, src + 1, ...) would have 100% unaligned accesses. */
* yuy2ToY/UV)(dst, src + 1, ...) would have 100% unaligned accesses. */
static
void
uyvyToY_c
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
static
void
uyvyToY_c
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
...
@@ -987,6 +1014,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
...
@@ -987,6 +1014,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
c
->
chrToYV12
=
bswap16UV_c
;
c
->
chrToYV12
=
bswap16UV_c
;
break
;
break
;
#endif
#endif
case
AV_PIX_FMT_AYUV64LE
:
c
->
chrToYV12
=
read_ayuv64le_UV_c
;
break
;
}
}
if
(
c
->
chrSrcHSubSample
)
{
if
(
c
->
chrSrcHSubSample
)
{
switch
(
srcFormat
)
{
switch
(
srcFormat
)
{
...
@@ -1271,6 +1301,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
...
@@ -1271,6 +1301,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
case
AV_PIX_FMT_YA16BE
:
case
AV_PIX_FMT_YA16BE
:
c
->
lumToYV12
=
read_ya16be_gray_c
;
c
->
lumToYV12
=
read_ya16be_gray_c
;
break
;
break
;
case
AV_PIX_FMT_AYUV64LE
:
c
->
lumToYV12
=
read_ayuv64le_Y_c
;
break
;
case
AV_PIX_FMT_YUYV422
:
case
AV_PIX_FMT_YUYV422
:
case
AV_PIX_FMT_YVYU422
:
case
AV_PIX_FMT_YVYU422
:
case
AV_PIX_FMT_YA8
:
case
AV_PIX_FMT_YA8
:
...
@@ -1397,6 +1430,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
...
@@ -1397,6 +1430,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
case
AV_PIX_FMT_YA16BE
:
case
AV_PIX_FMT_YA16BE
:
c
->
alpToYV12
=
read_ya16be_alpha_c
;
c
->
alpToYV12
=
read_ya16be_alpha_c
;
break
;
break
;
case
AV_PIX_FMT_AYUV64LE
:
c
->
alpToYV12
=
read_ayuv64le_A_c
;
break
;
case
AV_PIX_FMT_PAL8
:
case
AV_PIX_FMT_PAL8
:
c
->
alpToYV12
=
palToA_c
;
c
->
alpToYV12
=
palToA_c
;
break
;
break
;
...
...
libswscale/swscale_internal.h
View file @
052f64ec
...
@@ -790,6 +790,8 @@ static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt)
...
@@ -790,6 +790,8 @@ static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt)
|| (x)==AV_PIX_FMT_YA8 \
|| (x)==AV_PIX_FMT_YA8 \
|| (x)==AV_PIX_FMT_YA16LE \
|| (x)==AV_PIX_FMT_YA16LE \
|| (x)==AV_PIX_FMT_YA16BE \
|| (x)==AV_PIX_FMT_YA16BE \
|| (x)==AV_PIX_FMT_AYUV64LE \
|| (x)==AV_PIX_FMT_AYUV64BE \
|| isRGBinInt(x) \
|| isRGBinInt(x) \
|| isBGRinInt(x) \
|| isBGRinInt(x) \
)
)
...
...
libswscale/swscale_unscaled.c
View file @
052f64ec
...
@@ -1676,6 +1676,7 @@ void ff_get_unscaled_swscale(SwsContext *c)
...
@@ -1676,6 +1676,7 @@ void ff_get_unscaled_swscale(SwsContext *c)
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_BGRA64
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_BGRA64
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_GRAY16
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_GRAY16
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YA16
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YA16
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_AYUV64
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_GBRP9
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_GBRP9
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_GBRP10
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_GBRP10
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_GBRP12
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_GBRP12
)
||
...
...
libswscale/utils.c
View file @
052f64ec
...
@@ -225,6 +225,7 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = {
...
@@ -225,6 +225,7 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = {
[
AV_PIX_FMT_BAYER_GRBG16BE
]
=
{
1
,
0
},
[
AV_PIX_FMT_BAYER_GRBG16BE
]
=
{
1
,
0
},
[
AV_PIX_FMT_XYZ12BE
]
=
{
1
,
1
,
1
},
[
AV_PIX_FMT_XYZ12BE
]
=
{
1
,
1
,
1
},
[
AV_PIX_FMT_XYZ12LE
]
=
{
1
,
1
,
1
},
[
AV_PIX_FMT_XYZ12LE
]
=
{
1
,
1
,
1
},
[
AV_PIX_FMT_AYUV64LE
]
=
{
1
,
0
},
};
};
int
sws_isSupportedInput
(
enum
AVPixelFormat
pix_fmt
)
int
sws_isSupportedInput
(
enum
AVPixelFormat
pix_fmt
)
...
...
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