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
6eb25058
Commit
6eb25058
authored
Apr 22, 2016
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dds: Drop gray-alpha swapping
The original sample was generated with invalid software.
parent
39cdbb12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
13 deletions
+1
-13
dds.c
libavcodec/dds.c
+0
-12
dds-ya
tests/ref/fate/dds-ya
+1
-1
No files found.
libavcodec/dds.c
View file @
6eb25058
...
...
@@ -45,7 +45,6 @@ enum DDSPostProc {
DDS_ALPHA_EXP
,
DDS_NORMAL_MAP
,
DDS_RAW_YCOCG
,
DDS_SWAP_ALPHA
,
DDS_SWIZZLE_A2XY
,
DDS_SWIZZLE_RBXG
,
DDS_SWIZZLE_RGXB
,
...
...
@@ -392,8 +391,6 @@ static int parse_pixel_format(AVCodecContext *avctx)
ctx
->
postproc
=
DDS_NORMAL_MAP
;
else
if
(
ycocg_classic
&&
!
ctx
->
compressed
)
ctx
->
postproc
=
DDS_RAW_YCOCG
;
else
if
(
avctx
->
pix_fmt
==
AV_PIX_FMT_YA8
)
ctx
->
postproc
=
DDS_SWAP_ALPHA
;
/* ATI/NVidia variants sometimes add swizzling in bpp. */
switch
(
bpp
)
{
...
...
@@ -540,15 +537,6 @@ static void run_postproc(AVCodecContext *avctx, AVFrame *frame)
src
[
3
]
=
a
;
}
break
;
case
DDS_SWAP_ALPHA
:
/* Alpha and Luma are stored swapped. */
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Post-processing swapped Luma/Alpha.
\n
"
);
for
(
i
=
0
;
i
<
frame
->
linesize
[
0
]
*
frame
->
height
;
i
+=
2
)
{
uint8_t
*
src
=
frame
->
data
[
0
]
+
i
;
FFSWAP
(
uint8_t
,
src
[
0
],
src
[
1
]);
}
break
;
case
DDS_SWIZZLE_A2XY
:
/* Swap R and G, often used to restore a standard RGTC2. */
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Post-processing A2XY swizzle.
\n
"
);
...
...
tests/ref/fate/dds-ya
View file @
6eb25058
#tb 0: 1/25
0, 0, 0, 1, 28160, 0x
d398
1fcb
0, 0, 0, 1, 28160, 0x
5aa4
1fcb
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