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
d5ded429
Commit
d5ded429
authored
Jun 14, 2016
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/dpx: Support decoding 10 bit colourspace with transparency information.
Fixes one sample from ticket #5639.
parent
6bcc6fd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
dpx.c
libavcodec/dpx.c
+9
-6
No files found.
libavcodec/dpx.c
View file @
d5ded429
...
@@ -256,11 +256,13 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -256,11 +256,13 @@ static int decode_frame(AVCodecContext *avctx,
avctx
->
pix_fmt
=
AV_PIX_FMT_RGBA
;
avctx
->
pix_fmt
=
AV_PIX_FMT_RGBA
;
break
;
break
;
case
50100
:
case
50100
:
case
51100
:
case
50101
:
case
50101
:
case
51101
:
avctx
->
pix_fmt
=
AV_PIX_FMT_GBRP10
;
avctx
->
pix_fmt
=
AV_PIX_FMT_GBRP10
;
break
;
break
;
case
51100
:
case
51101
:
avctx
->
pix_fmt
=
AV_PIX_FMT_GBRAP10
;
break
;
case
50120
:
case
50120
:
case
51120
:
case
51120
:
case
50121
:
case
50121
:
...
@@ -313,9 +315,10 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -313,9 +315,10 @@ static int decode_frame(AVCodecContext *avctx,
switch
(
bits_per_color
)
{
switch
(
bits_per_color
)
{
case
10
:
case
10
:
for
(
x
=
0
;
x
<
avctx
->
height
;
x
++
)
{
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
[
1
],
(
uint16_t
*
)
ptr
[
2
]};
(
uint16_t
*
)
ptr
[
2
],
(
uint16_t
*
)
ptr
[
3
]};
for
(
y
=
0
;
y
<
avctx
->
width
;
y
++
)
{
for
(
y
=
0
;
y
<
avctx
->
width
;
y
++
)
{
*
dst
[
2
]
++
=
read10in32
(
&
buf
,
&
rgbBuffer
,
*
dst
[
2
]
++
=
read10in32
(
&
buf
,
&
rgbBuffer
,
&
n_datum
,
endian
);
&
n_datum
,
endian
);
...
@@ -323,13 +326,13 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -323,13 +326,13 @@ static int decode_frame(AVCodecContext *avctx,
&
n_datum
,
endian
);
&
n_datum
,
endian
);
*
dst
[
1
]
++
=
read10in32
(
&
buf
,
&
rgbBuffer
,
*
dst
[
1
]
++
=
read10in32
(
&
buf
,
&
rgbBuffer
,
&
n_datum
,
endian
);
&
n_datum
,
endian
);
// For 10 bit, ignore alpha
if
(
elements
==
4
)
if
(
elements
==
4
)
*
dst
[
3
]
++
=
read10in32
(
&
buf
,
&
rgbBuffer
,
read10in32
(
&
buf
,
&
rgbBuffer
,
&
n_datum
,
endian
);
&
n_datum
,
endian
);
}
}
n_datum
=
0
;
n_datum
=
0
;
for
(
i
=
0
;
i
<
3
;
i
++
)
for
(
i
=
0
;
i
<
elements
;
i
++
)
ptr
[
i
]
+=
p
->
linesize
[
i
];
ptr
[
i
]
+=
p
->
linesize
[
i
];
}
}
break
;
break
;
...
...
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