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
59b56738
Commit
59b56738
authored
18 years ago
by
Baptiste Coudurier
Browse files
Options
Downloads
Patches
Plain Diff
add uncompressed picture support
Originally committed as revision 5853 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
8ce2215b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavformat/mxf.c
+28
-0
28 additions, 0 deletions
libavformat/mxf.c
with
28 additions
and
0 deletions
libavformat/mxf.c
+
28
−
0
View file @
59b56738
...
@@ -583,6 +583,29 @@ static int mxf_read_metadata_multiple_descriptor(MXFContext *mxf, KLVPacket *klv
...
@@ -583,6 +583,29 @@ static int mxf_read_metadata_multiple_descriptor(MXFContext *mxf, KLVPacket *klv
return
-
1
;
return
-
1
;
}
}
static
void
mxf_read_metadata_pixel_layout
(
ByteIOContext
*
pb
,
MXFDescriptor
*
descriptor
)
{
int
code
;
do
{
code
=
get_byte
(
pb
);
dprintf
(
"pixel layout: code 0x%x
\n
"
,
code
);
switch
(
code
)
{
case
0x52
:
/* R */
descriptor
->
bits_per_sample
+=
get_byte
(
pb
);
break
;
case
0x47
:
/* G */
descriptor
->
bits_per_sample
+=
get_byte
(
pb
);
break
;
case
0x42
:
/* B */
descriptor
->
bits_per_sample
+=
get_byte
(
pb
);
break
;
default:
get_byte
(
pb
);
}
}
while
(
code
!=
0
);
/* SMPTE 377M E.2.46 */
}
static
int
mxf_read_metadata_generic_descriptor
(
MXFContext
*
mxf
,
KLVPacket
*
klv
)
static
int
mxf_read_metadata_generic_descriptor
(
MXFContext
*
mxf
,
KLVPacket
*
klv
)
{
{
ByteIOContext
*
pb
=
&
mxf
->
fc
->
pb
;
ByteIOContext
*
pb
=
&
mxf
->
fc
->
pb
;
...
@@ -631,6 +654,9 @@ static int mxf_read_metadata_generic_descriptor(MXFContext *mxf, KLVPacket *klv)
...
@@ -631,6 +654,9 @@ static int mxf_read_metadata_generic_descriptor(MXFContext *mxf, KLVPacket *klv)
case
0x3D01
:
case
0x3D01
:
descriptor
->
bits_per_sample
=
get_be32
(
pb
);
descriptor
->
bits_per_sample
=
get_be32
(
pb
);
break
;
break
;
case
0x3401
:
mxf_read_metadata_pixel_layout
(
pb
,
descriptor
);
break
;
default:
default:
url_fskip
(
pb
,
size
);
url_fskip
(
pb
,
size
);
}
}
...
@@ -669,6 +695,7 @@ static const MXFCodecUL mxf_codec_uls[] = {
...
@@ -669,6 +695,7 @@ static const MXFCodecUL mxf_codec_uls[] = {
{
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x00
},
CODEC_ID_DVVIDEO
},
/* DVCPRO25 PAL */
{
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x00
},
CODEC_ID_DVVIDEO
},
/* DVCPRO25 PAL */
{
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x02
,
0x02
,
0x02
,
0x01
,
0x02
,
0x00
},
CODEC_ID_DVVIDEO
},
/* DV25 IEC PAL */
{
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x02
,
0x02
,
0x02
,
0x01
,
0x02
,
0x00
},
CODEC_ID_DVVIDEO
},
/* DV25 IEC PAL */
//{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, CODEC_ID_JPEG2K }, /* JPEG2000 Codestream */
//{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, CODEC_ID_JPEG2K }, /* JPEG2000 Codestream */
{
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x02
,
0x01
,
0x7F
,
0x00
,
0x00
,
0x00
},
CODEC_ID_RAWVIDEO
},
/* Uncompressed */
/* SoundEssenceCompression */
/* SoundEssenceCompression */
{
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x01
,
0x04
,
0x02
,
0x02
,
0x01
,
0x7F
,
0x00
,
0x00
,
0x00
},
CODEC_ID_PCM_S16LE
},
{
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x01
,
0x04
,
0x02
,
0x02
,
0x01
,
0x7F
,
0x00
,
0x00
,
0x00
},
CODEC_ID_PCM_S16LE
},
{
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x07
,
0x04
,
0x02
,
0x02
,
0x01
,
0x7E
,
0x00
,
0x00
,
0x00
},
CODEC_ID_PCM_S16BE
},
/* From Omneon MXF file */
{
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x07
,
0x04
,
0x02
,
0x02
,
0x01
,
0x7E
,
0x00
,
0x00
,
0x00
},
CODEC_ID_PCM_S16BE
},
/* From Omneon MXF file */
...
@@ -786,6 +813,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
...
@@ -786,6 +813,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
if
(
st
->
codec
->
codec_type
==
CODEC_TYPE_VIDEO
)
{
if
(
st
->
codec
->
codec_type
==
CODEC_TYPE_VIDEO
)
{
st
->
codec
->
width
=
descriptor
->
width
;
st
->
codec
->
width
=
descriptor
->
width
;
st
->
codec
->
height
=
descriptor
->
height
;
st
->
codec
->
height
=
descriptor
->
height
;
st
->
codec
->
bits_per_sample
=
descriptor
->
bits_per_sample
;
/* Uncompressed */
}
else
if
(
st
->
codec
->
codec_type
==
CODEC_TYPE_AUDIO
)
{
}
else
if
(
st
->
codec
->
codec_type
==
CODEC_TYPE_AUDIO
)
{
st
->
codec
->
channels
=
descriptor
->
channels
;
st
->
codec
->
channels
=
descriptor
->
channels
;
st
->
codec
->
bits_per_sample
=
descriptor
->
bits_per_sample
;
st
->
codec
->
bits_per_sample
=
descriptor
->
bits_per_sample
;
...
...
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