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
f5cca47f
Commit
f5cca47f
authored
Apr 28, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sws: extend packed_16bpc_bswap code to handle planar formats
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
51494077
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
13 deletions
+33
-13
swscale_unscaled.c
libswscale/swscale_unscaled.c
+33
-13
No files found.
libswscale/swscale_unscaled.c
View file @
f5cca47f
...
...
@@ -321,19 +321,23 @@ static int packed_16bpc_bswap(SwsContext *c, const uint8_t *src[],
int
srcStride
[],
int
srcSliceY
,
int
srcSliceH
,
uint8_t
*
dst
[],
int
dstStride
[])
{
int
i
,
j
;
int
srcstr
=
srcStride
[
0
]
>>
1
;
int
dststr
=
dstStride
[
0
]
>>
1
;
uint16_t
*
dstPtr
=
(
uint16_t
*
)
dst
[
0
];
const
uint16_t
*
srcPtr
=
(
const
uint16_t
*
)
src
[
0
];
int
min_stride
=
FFMIN
(
srcstr
,
dststr
);
for
(
i
=
0
;
i
<
srcSliceH
;
i
++
)
{
for
(
j
=
0
;
j
<
min_stride
;
j
++
)
{
dstPtr
[
j
]
=
av_bswap16
(
srcPtr
[
j
]);
int
i
,
j
,
p
;
for
(
p
=
0
;
p
<
4
;
p
++
)
{
int
srcstr
=
srcStride
[
p
]
>>
1
;
int
dststr
=
dstStride
[
p
]
>>
1
;
uint16_t
*
dstPtr
=
(
uint16_t
*
)
dst
[
p
];
const
uint16_t
*
srcPtr
=
(
const
uint16_t
*
)
src
[
p
];
int
min_stride
=
FFMIN
(
srcstr
,
dststr
);
if
(
!
dstPtr
||
!
srcPtr
)
continue
;
for
(
i
=
0
;
i
<
(
srcSliceH
>>
c
->
chrDstVSubSample
);
i
++
)
{
for
(
j
=
0
;
j
<
min_stride
;
j
++
)
{
dstPtr
[
j
]
=
av_bswap16
(
srcPtr
[
j
]);
}
srcPtr
+=
srcstr
;
dstPtr
+=
dststr
;
}
srcPtr
+=
srcstr
;
dstPtr
+=
dststr
;
}
return
srcSliceH
;
...
...
@@ -1061,7 +1065,23 @@ void ff_get_unscaled_swscale(SwsContext *c)
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_RGB48
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_RGBA64
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_RGB555
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_RGB565
))
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_RGB565
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_XYZ12
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YUV420P9
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YUV420P10
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YUV420P12
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YUV420P14
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YUV420P16
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YUV422P9
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YUV422P10
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YUV422P12
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YUV422P14
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YUV422P16
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YUV444P9
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YUV444P10
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YUV444P12
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YUV444P14
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_YUV444P16
))
c
->
swScale
=
packed_16bpc_bswap
;
if
(
usePal
(
srcFormat
)
&&
isByteRGB
(
dstFormat
))
...
...
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