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
af1e70dd
Commit
af1e70dd
authored
Jun 16, 2018
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/dpx: Support 12-bit packing method b (msbpad).
parent
a2613647
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
dpx.c
libavcodec/dpx.c
+9
-13
No files found.
libavcodec/dpx.c
View file @
af1e70dd
...
...
@@ -170,10 +170,6 @@ static int decode_frame(AVCodecContext *avctx,
packing
=
read16
(
&
buf
,
endian
);
encoding
=
read16
(
&
buf
,
endian
);
if
(
packing
>
1
)
{
avpriv_report_missing_feature
(
avctx
,
"Packing %d"
,
packing
);
return
AVERROR_PATCHWELCOME
;
}
if
(
encoding
)
{
avpriv_report_missing_feature
(
avctx
,
"Encoding %d"
,
encoding
);
return
AVERROR_PATCHWELCOME
;
...
...
@@ -225,7 +221,7 @@ static int decode_frame(AVCodecContext *avctx,
stride
=
avctx
->
width
*
elements
;
break
;
case
10
:
if
(
!
packing
)
{
if
(
!
packing
||
packing
>
1
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Packing to 32bit required
\n
"
);
return
-
1
;
}
...
...
@@ -387,16 +383,16 @@ static int decode_frame(AVCodecContext *avctx,
(
uint16_t
*
)
ptr
[
1
],
(
uint16_t
*
)
ptr
[
2
],
(
uint16_t
*
)
ptr
[
3
]};
int
shift
=
packing
==
1
?
4
:
0
;
for
(
y
=
0
;
y
<
avctx
->
width
;
y
++
)
{
if
(
packing
)
{
if
(
elements
>=
3
)
*
dst
[
2
]
++
=
read16
(
&
buf
,
endian
)
>>
4
;
*
dst
[
0
]
=
read16
(
&
buf
,
endian
)
>>
4
;
dst
[
0
]
++
;
*
dst
[
2
]
++
=
read16
(
&
buf
,
endian
)
>>
shift
&
0xFFF
;
*
dst
[
0
]
++
=
read16
(
&
buf
,
endian
)
>>
shift
&
0xFFF
;
if
(
elements
>=
2
)
*
dst
[
1
]
++
=
read16
(
&
buf
,
endian
)
>>
4
;
*
dst
[
1
]
++
=
read16
(
&
buf
,
endian
)
>>
shift
&
0xFFF
;
if
(
elements
==
4
)
*
dst
[
3
]
++
=
read16
(
&
buf
,
endian
)
>>
4
;
*
dst
[
3
]
++
=
read16
(
&
buf
,
endian
)
>>
shift
&
0xFFF
;
}
else
{
*
dst
[
2
]
++
=
read12in32
(
&
buf
,
&
rgbBuffer
,
&
n_datum
,
endian
);
...
...
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