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
ed46a3d8
Commit
ed46a3d8
authored
Dec 16, 2011
by
Janne Grunau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: add rgb565 endianess conversion
parent
adb28c49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
swscale_unscaled.c
libswscale/swscale_unscaled.c
+13
-9
No files found.
libswscale/swscale_unscaled.c
View file @
ed46a3d8
...
@@ -718,15 +718,6 @@ void ff_get_unscaled_swscale(SwsContext *c)
...
@@ -718,15 +718,6 @@ void ff_get_unscaled_swscale(SwsContext *c)
if
(
srcFormat
==
PIX_FMT_BGR24
&&
(
dstFormat
==
PIX_FMT_YUV420P
||
dstFormat
==
PIX_FMT_YUVA420P
)
&&
!
(
flags
&
SWS_ACCURATE_RND
))
if
(
srcFormat
==
PIX_FMT_BGR24
&&
(
dstFormat
==
PIX_FMT_YUV420P
||
dstFormat
==
PIX_FMT_YUVA420P
)
&&
!
(
flags
&
SWS_ACCURATE_RND
))
c
->
swScale
=
bgr24ToYv12Wrapper
;
c
->
swScale
=
bgr24ToYv12Wrapper
;
/* bswap 16 bits per component packed formats */
if
((
srcFormat
==
PIX_FMT_RGB48LE
&&
dstFormat
==
PIX_FMT_RGB48BE
)
||
(
srcFormat
==
PIX_FMT_RGB48BE
&&
dstFormat
==
PIX_FMT_RGB48LE
)
||
(
srcFormat
==
PIX_FMT_BGR48LE
&&
dstFormat
==
PIX_FMT_BGR48BE
)
||
(
srcFormat
==
PIX_FMT_BGR48BE
&&
dstFormat
==
PIX_FMT_BGR48LE
)
||
(
srcFormat
==
PIX_FMT_GRAY16LE
&&
dstFormat
==
PIX_FMT_GRAY16BE
)
||
(
srcFormat
==
PIX_FMT_GRAY16BE
&&
dstFormat
==
PIX_FMT_GRAY16LE
))
c
->
swScale
=
packed_16bpc_bswap
;
/* RGB/BGR -> RGB/BGR (no dither needed forms) */
/* RGB/BGR -> RGB/BGR (no dither needed forms) */
if
(
isAnyRGB
(
srcFormat
)
if
(
isAnyRGB
(
srcFormat
)
&&
isAnyRGB
(
dstFormat
)
&&
isAnyRGB
(
dstFormat
)
...
@@ -745,6 +736,19 @@ void ff_get_unscaled_swscale(SwsContext *c)
...
@@ -745,6 +736,19 @@ void ff_get_unscaled_swscale(SwsContext *c)
&&
(
!
needsDither
||
(
c
->
flags
&
(
SWS_FAST_BILINEAR
|
SWS_POINT
))))
&&
(
!
needsDither
||
(
c
->
flags
&
(
SWS_FAST_BILINEAR
|
SWS_POINT
))))
c
->
swScale
=
rgbToRgbWrapper
;
c
->
swScale
=
rgbToRgbWrapper
;
/* bswap 16 bits per pixel/component packed formats */
if
((
srcFormat
==
PIX_FMT_RGB48LE
&&
dstFormat
==
PIX_FMT_RGB48BE
)
||
(
srcFormat
==
PIX_FMT_RGB48BE
&&
dstFormat
==
PIX_FMT_RGB48LE
)
||
(
srcFormat
==
PIX_FMT_BGR48LE
&&
dstFormat
==
PIX_FMT_BGR48BE
)
||
(
srcFormat
==
PIX_FMT_BGR48BE
&&
dstFormat
==
PIX_FMT_BGR48LE
)
||
(
srcFormat
==
PIX_FMT_GRAY16LE
&&
dstFormat
==
PIX_FMT_GRAY16BE
)
||
(
srcFormat
==
PIX_FMT_GRAY16BE
&&
dstFormat
==
PIX_FMT_GRAY16LE
)
||
(
srcFormat
==
PIX_FMT_RGB565LE
&&
dstFormat
==
PIX_FMT_RGB565BE
)
||
(
srcFormat
==
PIX_FMT_RGB565BE
&&
dstFormat
==
PIX_FMT_RGB565LE
)
||
(
srcFormat
==
PIX_FMT_BGR565BE
&&
dstFormat
==
PIX_FMT_BGR565LE
)
||
(
srcFormat
==
PIX_FMT_BGR565LE
&&
dstFormat
==
PIX_FMT_BGR565BE
))
c
->
swScale
=
packed_16bpc_bswap
;
if
((
usePal
(
srcFormat
)
&&
(
if
((
usePal
(
srcFormat
)
&&
(
dstFormat
==
PIX_FMT_RGB32
||
dstFormat
==
PIX_FMT_RGB32
||
dstFormat
==
PIX_FMT_RGB32_1
||
dstFormat
==
PIX_FMT_RGB32_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