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
35b33f1a
Commit
35b33f1a
authored
Jul 22, 2015
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/mxfdec: Set codec_tag AVup for Avid 1:1 input.
parent
d373b508
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
mxf.c
libavformat/mxf.c
+5
-0
mxf.h
libavformat/mxf.h
+1
-0
mxfdec.c
libavformat/mxfdec.c
+4
-0
No files found.
libavformat/mxf.c
View file @
35b33f1a
...
@@ -69,6 +69,11 @@ const MXFCodecUL ff_mxf_pixel_format_uls[] = {
...
@@ -69,6 +69,11 @@ const MXFCodecUL ff_mxf_pixel_format_uls[] = {
{
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
0
,
AV_PIX_FMT_NONE
},
{
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
0
,
AV_PIX_FMT_NONE
},
};
};
const
MXFCodecUL
ff_mxf_codec_tag_uls
[]
=
{
{
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x01
,
0x0E
,
0x04
,
0x03
,
0x01
,
0x01
,
0x03
,
0x01
,
0x00
},
15
,
MKTAG
(
'A'
,
'V'
,
'u'
,
'p'
)
},
/* Avid 1:1 */
{
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
0
,
0
},
};
static
const
struct
{
static
const
struct
{
enum
AVPixelFormat
pix_fmt
;
enum
AVPixelFormat
pix_fmt
;
const
char
data
[
16
];
const
char
data
[
16
];
...
...
libavformat/mxf.h
View file @
35b33f1a
...
@@ -78,6 +78,7 @@ typedef struct {
...
@@ -78,6 +78,7 @@ typedef struct {
extern
const
MXFCodecUL
ff_mxf_data_definition_uls
[];
extern
const
MXFCodecUL
ff_mxf_data_definition_uls
[];
extern
const
MXFCodecUL
ff_mxf_codec_uls
[];
extern
const
MXFCodecUL
ff_mxf_codec_uls
[];
extern
const
MXFCodecUL
ff_mxf_pixel_format_uls
[];
extern
const
MXFCodecUL
ff_mxf_pixel_format_uls
[];
extern
const
MXFCodecUL
ff_mxf_codec_tag_uls
[];
int
ff_mxf_decode_pixel_layout
(
const
char
pixel_layout
[
16
],
enum
AVPixelFormat
*
pix_fmt
);
int
ff_mxf_decode_pixel_layout
(
const
char
pixel_layout
[
16
],
enum
AVPixelFormat
*
pix_fmt
);
const
MXFSamplesPerFrame
*
ff_mxf_get_samples_per_frame
(
AVFormatContext
*
s
,
AVRational
time_base
);
const
MXFSamplesPerFrame
*
ff_mxf_get_samples_per_frame
(
AVFormatContext
*
s
,
AVRational
time_base
);
...
...
libavformat/mxfdec.c
View file @
35b33f1a
...
@@ -2045,6 +2045,9 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
...
@@ -2045,6 +2045,9 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
&
descriptor
->
essence_codec_ul
);
&
descriptor
->
essence_codec_ul
);
st
->
codec
->
pix_fmt
=
(
enum
AVPixelFormat
)
pix_fmt_ul
->
id
;
st
->
codec
->
pix_fmt
=
(
enum
AVPixelFormat
)
pix_fmt_ul
->
id
;
if
(
st
->
codec
->
pix_fmt
==
AV_PIX_FMT_NONE
)
{
if
(
st
->
codec
->
pix_fmt
==
AV_PIX_FMT_NONE
)
{
st
->
codec
->
codec_tag
=
mxf_get_codec_ul
(
ff_mxf_codec_tag_uls
,
&
descriptor
->
essence_codec_ul
)
->
id
;
if
(
!
st
->
codec
->
codec_tag
)
{
/* support files created before RP224v10 by defaulting to UYVY422
/* support files created before RP224v10 by defaulting to UYVY422
if subsampling is 4:2:2 and component depth is 8-bit */
if subsampling is 4:2:2 and component depth is 8-bit */
if
(
descriptor
->
horiz_subsampling
==
2
&&
if
(
descriptor
->
horiz_subsampling
==
2
&&
...
@@ -2052,6 +2055,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
...
@@ -2052,6 +2055,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
descriptor
->
component_depth
==
8
)
{
descriptor
->
component_depth
==
8
)
{
st
->
codec
->
pix_fmt
=
AV_PIX_FMT_UYVY422
;
st
->
codec
->
pix_fmt
=
AV_PIX_FMT_UYVY422
;
}
}
}
}
}
}
}
}
}
...
...
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