Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
2efaaf94
Commit
2efaaf94
authored
10 years ago
by
Carl Eugen Hoyos
Browse files
Options
Downloads
Patches
Plain Diff
Support decoding yuv dpx images.
parent
ea329b60
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/dpx.c
+31
-0
31 additions, 0 deletions
libavcodec/dpx.c
with
31 additions
and
0 deletions
libavcodec/dpx.c
+
31
−
0
View file @
2efaaf94
...
...
@@ -173,11 +173,16 @@ static int decode_frame(AVCodecContext *avctx,
break
;
case
52
:
// ABGR
case
51
:
// RGBA
case
103
:
// UYVA4444
elements
=
4
;
break
;
case
50
:
// RGB
case
102
:
// UYV444
elements
=
3
;
break
;
case
100
:
// UYVY422
elements
=
2
;
break
;
default:
avpriv_report_missing_feature
(
avctx
,
"Descriptor %d"
,
descriptor
);
return
AVERROR_PATCHWELCOME
;
...
...
@@ -280,6 +285,15 @@ static int decode_frame(AVCodecContext *avctx,
case
51160
:
avctx
->
pix_fmt
=
AV_PIX_FMT_RGBA64LE
;
break
;
case
100081
:
avctx
->
pix_fmt
=
AV_PIX_FMT_UYVY422
;
break
;
case
102081
:
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV444P
;
break
;
case
103081
:
avctx
->
pix_fmt
=
AV_PIX_FMT_YUVA444P
;
break
;
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unsupported format
\n
"
);
return
AVERROR_PATCHWELCOME
;
...
...
@@ -344,9 +358,26 @@ static int decode_frame(AVCodecContext *avctx,
case
16
:
elements
*=
2
;
case
8
:
if
(
avctx
->
pix_fmt
==
AV_PIX_FMT_YUVA444P
||
avctx
->
pix_fmt
==
AV_PIX_FMT_YUV444P
)
{
for
(
x
=
0
;
x
<
avctx
->
height
;
x
++
)
{
ptr
[
0
]
=
p
->
data
[
0
]
+
x
*
p
->
linesize
[
0
];
ptr
[
1
]
=
p
->
data
[
1
]
+
x
*
p
->
linesize
[
1
];
ptr
[
2
]
=
p
->
data
[
2
]
+
x
*
p
->
linesize
[
2
];
ptr
[
3
]
=
p
->
data
[
3
]
+
x
*
p
->
linesize
[
3
];
for
(
y
=
0
;
y
<
avctx
->
width
;
y
++
)
{
*
ptr
[
1
]
++
=
*
buf
++
;
*
ptr
[
0
]
++
=
*
buf
++
;
*
ptr
[
2
]
++
=
*
buf
++
;
if
(
avctx
->
pix_fmt
==
AV_PIX_FMT_YUVA444P
)
*
ptr
[
3
]
++
=
*
buf
++
;
}
}
}
else
{
av_image_copy_plane
(
ptr
[
0
],
p
->
linesize
[
0
],
buf
,
stride
,
elements
*
avctx
->
width
,
avctx
->
height
);
}
break
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment