Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
139cbeb7
Commit
139cbeb7
authored
Apr 15, 2016
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/dds: Fix GRAY8A decoding.
Fixes ticket #4667.
parent
f0792325
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
dds.c
libavcodec/dds.c
+4
-2
version.h
libavcodec/version.h
+1
-1
dds-ya
tests/ref/fate/dds-ya
+1
-1
No files found.
libavcodec/dds.c
View file @
139cbeb7
...
@@ -356,6 +356,10 @@ static int parse_pixel_format(AVCodecContext *avctx)
...
@@ -356,6 +356,10 @@ static int parse_pixel_format(AVCodecContext *avctx)
/* 16 bpp */
/* 16 bpp */
else
if
(
bpp
==
16
&&
r
==
0xff
&&
g
==
0
&&
b
==
0
&&
a
==
0xff00
)
else
if
(
bpp
==
16
&&
r
==
0xff
&&
g
==
0
&&
b
==
0
&&
a
==
0xff00
)
avctx
->
pix_fmt
=
AV_PIX_FMT_YA8
;
avctx
->
pix_fmt
=
AV_PIX_FMT_YA8
;
else
if
(
bpp
==
16
&&
r
==
0xff00
&&
g
==
0
&&
b
==
0
&&
a
==
0xff
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YA8
;
ctx
->
postproc
=
DDS_SWAP_ALPHA
;
}
else
if
(
bpp
==
16
&&
r
==
0xffff
&&
g
==
0
&&
b
==
0
&&
a
==
0
)
else
if
(
bpp
==
16
&&
r
==
0xffff
&&
g
==
0
&&
b
==
0
&&
a
==
0
)
avctx
->
pix_fmt
=
AV_PIX_FMT_GRAY16LE
;
avctx
->
pix_fmt
=
AV_PIX_FMT_GRAY16LE
;
else
if
(
bpp
==
16
&&
r
==
0xf800
&&
g
==
0x7e0
&&
b
==
0x1f
&&
a
==
0
)
else
if
(
bpp
==
16
&&
r
==
0xf800
&&
g
==
0x7e0
&&
b
==
0x1f
&&
a
==
0
)
...
@@ -387,8 +391,6 @@ static int parse_pixel_format(AVCodecContext *avctx)
...
@@ -387,8 +391,6 @@ static int parse_pixel_format(AVCodecContext *avctx)
ctx
->
postproc
=
DDS_NORMAL_MAP
;
ctx
->
postproc
=
DDS_NORMAL_MAP
;
else
if
(
ycocg_classic
&&
!
ctx
->
compressed
)
else
if
(
ycocg_classic
&&
!
ctx
->
compressed
)
ctx
->
postproc
=
DDS_RAW_YCOCG
;
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. */
/* ATI/NVidia variants sometimes add swizzling in bpp. */
switch
(
bpp
)
{
switch
(
bpp
)
{
...
...
libavcodec/version.h
View file @
139cbeb7
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 34
#define LIBAVCODEC_VERSION_MINOR 34
#define LIBAVCODEC_VERSION_MICRO 10
1
#define LIBAVCODEC_VERSION_MICRO 10
2
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
LIBAVCODEC_VERSION_MINOR, \
...
...
tests/ref/fate/dds-ya
View file @
139cbeb7
...
@@ -3,4 +3,4 @@
...
@@ -3,4 +3,4 @@
#codec_id 0: rawvideo
#codec_id 0: rawvideo
#dimensions 0: 220x64
#dimensions 0: 220x64
#sar 0: 0/1
#sar 0: 0/1
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