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
ccac8438
Commit
ccac8438
authored
Jan 31, 2008
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support rawvideo in mov
Originally committed as revision 11691 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
b2aba2e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
movenc.c
libavformat/movenc.c
+18
-2
No files found.
libavformat/movenc.c
View file @
ccac8438
...
...
@@ -483,6 +483,14 @@ static const AVCodecTag codec_3gp_tags[] = {
{
CODEC_ID_AMR_WB
,
MKTAG
(
's'
,
'a'
,
'w'
,
'b'
)
},
};
static
const
AVCodecTag
mov_pix_fmt_tags
[]
=
{
{
PIX_FMT_YUYV422
,
MKTAG
(
'y'
,
'u'
,
'v'
,
's'
)
},
{
PIX_FMT_YUYV422
,
MKTAG
(
'2'
,
'v'
,
'u'
,
'y'
)
},
{
PIX_FMT_BGR555
,
MKTAG
(
'r'
,
'a'
,
'w'
,
' '
)
},
{
PIX_FMT_RGB24
,
MKTAG
(
'r'
,
'a'
,
'w'
,
' '
)
},
{
PIX_FMT_BGR32_1
,
MKTAG
(
'r'
,
'a'
,
'w'
,
' '
)
},
};
static
int
mov_find_codec_tag
(
AVFormatContext
*
s
,
MOVTrack
*
track
)
{
int
tag
=
track
->
enc
->
codec_tag
;
...
...
@@ -495,7 +503,8 @@ static int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track)
}
else
if
(
track
->
mode
==
MODE_3GP
||
track
->
mode
==
MODE_3G2
)
{
tag
=
codec_get_tag
(
codec_3gp_tags
,
track
->
enc
->
codec_id
);
}
else
if
(
!
tag
||
(
track
->
enc
->
strict_std_compliance
>=
FF_COMPLIANCE_NORMAL
&&
tag
==
MKTAG
(
'd'
,
'v'
,
'c'
,
'p'
)))
{
(
tag
==
MKTAG
(
'd'
,
'v'
,
'c'
,
'p'
)
||
track
->
enc
->
codec_id
==
CODEC_ID_RAWVIDEO
)))
{
if
(
track
->
enc
->
codec_id
==
CODEC_ID_DVVIDEO
)
{
if
(
track
->
enc
->
height
==
480
)
/* NTSC */
if
(
track
->
enc
->
pix_fmt
==
PIX_FMT_YUV422P
)
tag
=
MKTAG
(
'd'
,
'v'
,
'5'
,
'n'
);
...
...
@@ -503,6 +512,10 @@ static int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track)
else
if
(
track
->
enc
->
pix_fmt
==
PIX_FMT_YUV422P
)
tag
=
MKTAG
(
'd'
,
'v'
,
'5'
,
'p'
);
else
if
(
track
->
enc
->
pix_fmt
==
PIX_FMT_YUV420P
)
tag
=
MKTAG
(
'd'
,
'v'
,
'c'
,
'p'
);
else
tag
=
MKTAG
(
'd'
,
'v'
,
'p'
,
'p'
);
}
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_RAWVIDEO
)
{
tag
=
codec_get_tag
(
mov_pix_fmt_tags
,
track
->
enc
->
pix_fmt
);
if
(
!
tag
)
// restore tag
tag
=
track
->
enc
->
codec_tag
;
}
else
{
if
(
track
->
enc
->
codec_type
==
CODEC_TYPE_VIDEO
)
{
tag
=
codec_get_tag
(
codec_movvideo_tags
,
track
->
enc
->
codec_id
);
...
...
@@ -569,7 +582,10 @@ static int mov_write_video_tag(ByteIOContext *pb, MOVTrack* track)
put_byte
(
pb
,
strlen
(
compressor_name
));
put_buffer
(
pb
,
compressor_name
,
31
);
put_be16
(
pb
,
0x18
);
/* Reserved */
if
(
track
->
mode
==
MODE_MOV
&&
track
->
enc
->
bits_per_sample
)
put_be16
(
pb
,
track
->
enc
->
bits_per_sample
);
else
put_be16
(
pb
,
0x18
);
/* Reserved */
put_be16
(
pb
,
0xffff
);
/* Reserved */
if
(
track
->
tag
==
MKTAG
(
'm'
,
'p'
,
'4'
,
'v'
))
mov_write_esds_tag
(
pb
,
track
);
...
...
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