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
f69154b2
Commit
f69154b2
authored
Feb 28, 2020
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mxfenc: move content package rates and timebase combinations to a separate struct
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
27a81469
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
16 deletions
+21
-16
mxf.c
libavformat/mxf.c
+16
-16
mxf.h
libavformat/mxf.h
+5
-0
No files found.
libavformat/mxf.c
View file @
f69154b2
...
@@ -131,25 +131,25 @@ int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum AVPixelFormat *
...
@@ -131,25 +131,25 @@ int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum AVPixelFormat *
return
-
1
;
return
-
1
;
}
}
static
const
AVRational
mxf_time_base
[]
=
{
/**
{
1001
,
24000
},
* See SMPTE 326M-2000 Section 7.2 Content package rate
{
1
,
24
},
* MXFContentPackageRate->rate is bits b5..b0.
{
1001
,
30000
},
*/
{
1001
,
60000
},
static
const
MXFContentPackageRate
mxf_content_package_rates
[]
=
{
{
1
,
25
},
{
2
,
{
1
,
24
}
},
{
1
,
50
},
{
3
,
{
1001
,
24000
}
},
{
1
,
60
},
{
4
,
{
1
,
25
}
},
{
0
,
0
}
{
7
,
{
1001
,
30000
}
},
};
{
10
,
{
1
,
50
}
},
{
12
,
{
1
,
60
}
},
static
const
int
mxf_content_package_rates
[]
=
{
{
13
,
{
1001
,
60000
}
},
3
,
2
,
7
,
13
,
4
,
10
,
12
,
{
0
}
};
};
int
ff_mxf_get_content_package_rate
(
AVRational
time_base
)
int
ff_mxf_get_content_package_rate
(
AVRational
time_base
)
{
{
for
(
int
i
=
0
;
mxf_
time_base
[
i
].
num
;
i
++
)
for
(
int
i
=
0
;
mxf_
content_package_rates
[
i
].
rate
;
i
++
)
if
(
!
av_cmp_q
(
time_base
,
mxf_
time_base
[
i
]
))
if
(
!
av_cmp_q
(
time_base
,
mxf_
content_package_rates
[
i
].
tb
))
return
mxf_content_package_rates
[
i
];
return
mxf_content_package_rates
[
i
]
.
rate
;
return
0
;
return
0
;
}
}
libavformat/mxf.h
View file @
f69154b2
...
@@ -59,6 +59,11 @@ enum MXFFrameLayout {
...
@@ -59,6 +59,11 @@ enum MXFFrameLayout {
SegmentedFrame
,
SegmentedFrame
,
};
};
typedef
struct
MXFContentPackageRate
{
int
rate
;
AVRational
tb
;
}
MXFContentPackageRate
;
typedef
struct
KLVPacket
{
typedef
struct
KLVPacket
{
UID
key
;
UID
key
;
int64_t
offset
;
int64_t
offset
;
...
...
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