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
aec96e23
Commit
aec96e23
authored
Jun 15, 2016
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/dpx: Support decoding 12 bit colourspace with transparency information.
parent
346b3c5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
dpx.c
libavcodec/dpx.c
+9
-7
No files found.
libavcodec/dpx.c
View file @
aec96e23
...
...
@@ -264,11 +264,13 @@ static int decode_frame(AVCodecContext *avctx,
avctx
->
pix_fmt
=
AV_PIX_FMT_GBRAP10
;
break
;
case
50120
:
case
51120
:
case
50121
:
case
51121
:
avctx
->
pix_fmt
=
AV_PIX_FMT_GBRP12
;
break
;
case
51120
:
case
51121
:
avctx
->
pix_fmt
=
AV_PIX_FMT_GBRAP12
;
break
;
case
6161
:
avctx
->
pix_fmt
=
AV_PIX_FMT_GRAY16BE
;
break
;
...
...
@@ -338,9 +340,10 @@ static int decode_frame(AVCodecContext *avctx,
break
;
case
12
:
for
(
x
=
0
;
x
<
avctx
->
height
;
x
++
)
{
uint16_t
*
dst
[
3
]
=
{(
uint16_t
*
)
ptr
[
0
],
uint16_t
*
dst
[
4
]
=
{(
uint16_t
*
)
ptr
[
0
],
(
uint16_t
*
)
ptr
[
1
],
(
uint16_t
*
)
ptr
[
2
]};
(
uint16_t
*
)
ptr
[
2
],
(
uint16_t
*
)
ptr
[
3
]};
for
(
y
=
0
;
y
<
avctx
->
width
;
y
++
)
{
*
dst
[
2
]
=
read16
(
&
buf
,
endian
)
>>
4
;
dst
[
2
]
++
;
...
...
@@ -348,11 +351,10 @@ static int decode_frame(AVCodecContext *avctx,
dst
[
0
]
++
;
*
dst
[
1
]
=
read16
(
&
buf
,
endian
)
>>
4
;
dst
[
1
]
++
;
// For 12 bit, ignore alpha
if
(
elements
==
4
)
buf
+=
2
;
*
dst
[
3
]
++
=
read16
(
&
buf
,
endian
)
>>
4
;
}
for
(
i
=
0
;
i
<
3
;
i
++
)
for
(
i
=
0
;
i
<
elements
;
i
++
)
ptr
[
i
]
+=
p
->
linesize
[
i
];
// Jump to next aligned position
buf
+=
need_align
;
...
...
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