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
74334ae1
Commit
74334ae1
authored
Jan 31, 2009
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
write best effort video line map
Originally committed as revision 16897 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
4118d68f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
mxfenc.c
libavformat/mxfenc.c
+25
-1
No files found.
libavformat/mxfenc.c
View file @
74334ae1
...
@@ -174,6 +174,7 @@ static const MXFLocalTagPair mxf_local_tag_batch[] = {
...
@@ -174,6 +174,7 @@ static const MXFLocalTagPair mxf_local_tag_batch[] = {
{
0x3004
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x02
,
0x06
,
0x01
,
0x01
,
0x04
,
0x01
,
0x02
,
0x00
,
0x00
}},
/* Essence Container */
{
0x3004
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x02
,
0x06
,
0x01
,
0x01
,
0x04
,
0x01
,
0x02
,
0x00
,
0x00
}},
/* Essence Container */
// Generic Picture Essence Descriptor
// Generic Picture Essence Descriptor
{
0x320C
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x03
,
0x01
,
0x04
,
0x00
,
0x00
,
0x00
}},
/* Frame Layout */
{
0x320C
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x03
,
0x01
,
0x04
,
0x00
,
0x00
,
0x00
}},
/* Frame Layout */
{
0x320D
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x03
,
0x02
,
0x05
,
0x00
,
0x00
,
0x00
}},
/* Video Line Map */
{
0x3203
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x05
,
0x02
,
0x02
,
0x00
,
0x00
,
0x00
}},
/* Stored Width */
{
0x3203
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x05
,
0x02
,
0x02
,
0x00
,
0x00
,
0x00
}},
/* Stored Width */
{
0x3202
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x05
,
0x02
,
0x01
,
0x00
,
0x00
,
0x00
}},
/* Stored Height */
{
0x3202
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x05
,
0x02
,
0x01
,
0x00
,
0x00
,
0x00
}},
/* Stored Height */
{
0x320E
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x01
,
0x01
,
0x01
,
0x00
,
0x00
,
0x00
}},
/* Aspect Ratio */
{
0x320E
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x01
,
0x01
,
0x01
,
0x00
,
0x00
,
0x00
}},
/* Aspect Ratio */
...
@@ -589,8 +590,9 @@ static void mxf_write_mpegvideo_desc(AVFormatContext *s, AVStream *st)
...
@@ -589,8 +590,9 @@ static void mxf_write_mpegvideo_desc(AVFormatContext *s, AVStream *st)
ByteIOContext
*
pb
=
s
->
pb
;
ByteIOContext
*
pb
=
s
->
pb
;
int
stored_height
=
(
st
->
codec
->
height
+
15
)
/
16
*
16
;
int
stored_height
=
(
st
->
codec
->
height
+
15
)
/
16
*
16
;
AVRational
dar
;
AVRational
dar
;
int
f1
,
f2
;
mxf_write_generic_desc
(
pb
,
st
,
mxf_mpegvideo_descriptor_key
,
1
1
3
);
mxf_write_generic_desc
(
pb
,
st
,
mxf_mpegvideo_descriptor_key
,
1
3
3
);
mxf_write_local_tag
(
pb
,
4
,
0x3203
);
mxf_write_local_tag
(
pb
,
4
,
0x3203
);
put_be32
(
pb
,
st
->
codec
->
width
);
put_be32
(
pb
,
st
->
codec
->
width
);
...
@@ -602,6 +604,28 @@ static void mxf_write_mpegvideo_desc(AVFormatContext *s, AVStream *st)
...
@@ -602,6 +604,28 @@ static void mxf_write_mpegvideo_desc(AVFormatContext *s, AVStream *st)
mxf_write_local_tag
(
pb
,
1
,
0x320C
);
mxf_write_local_tag
(
pb
,
1
,
0x320C
);
put_byte
(
pb
,
sc
->
interlaced
);
put_byte
(
pb
,
sc
->
interlaced
);
// video line map
mxf_write_local_tag
(
pb
,
16
,
0x320D
);
put_be32
(
pb
,
2
);
put_be32
(
pb
,
4
);
switch
(
st
->
codec
->
height
)
{
case
576
:
f1
=
23
;
f2
=
336
;
break
;
case
608
:
f1
=
7
;
f2
=
320
;
break
;
case
480
:
f1
=
20
;
f2
=
283
;
break
;
case
512
:
f1
=
7
;
f2
=
270
;
break
;
case
720
:
f1
=
26
;
f2
=
0
;
break
;
// progressive
case
1080
:
f1
=
21
;
f2
=
584
;
break
;
default:
f1
=
0
;
f2
=
0
;
break
;
}
if
(
!
sc
->
interlaced
)
{
f2
=
0
;
f1
*=
2
;
}
put_be32
(
pb
,
f1
);
put_be32
(
pb
,
f2
);
av_reduce
(
&
dar
.
num
,
&
dar
.
den
,
av_reduce
(
&
dar
.
num
,
&
dar
.
den
,
st
->
codec
->
width
*
st
->
codec
->
sample_aspect_ratio
.
num
,
st
->
codec
->
width
*
st
->
codec
->
sample_aspect_ratio
.
num
,
st
->
codec
->
height
*
st
->
codec
->
sample_aspect_ratio
.
den
,
st
->
codec
->
height
*
st
->
codec
->
sample_aspect_ratio
.
den
,
...
...
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