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
456a70ae
Commit
456a70ae
authored
Dec 26, 2010
by
Peter Ross
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ff_get_bmp_header
Originally committed as revision 26091 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
52654005
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
11 deletions
+25
-11
avidec.c
libavformat/avidec.c
+1
-11
riff.c
libavformat/riff.c
+17
-0
riff.h
libavformat/riff.h
+7
-0
No files found.
libavformat/avidec.c
View file @
456a70ae
...
@@ -570,17 +570,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
...
@@ -570,17 +570,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
url_fskip
(
pb
,
size
);
url_fskip
(
pb
,
size
);
break
;
break
;
}
}
get_le32
(
pb
);
/* size */
tag1
=
ff_get_bmp_header
(
pb
,
st
);
st
->
codec
->
width
=
get_le32
(
pb
);
st
->
codec
->
height
=
(
int32_t
)
get_le32
(
pb
);
get_le16
(
pb
);
/* panes */
st
->
codec
->
bits_per_coded_sample
=
get_le16
(
pb
);
/* depth */
tag1
=
get_le32
(
pb
);
get_le32
(
pb
);
/* ImageSize */
get_le32
(
pb
);
/* XPelsPerMeter */
get_le32
(
pb
);
/* YPelsPerMeter */
get_le32
(
pb
);
/* ClrUsed */
get_le32
(
pb
);
/* ClrImportant */
if
(
tag1
==
MKTAG
(
'D'
,
'X'
,
'S'
,
'B'
)
||
tag1
==
MKTAG
(
'D'
,
'X'
,
'S'
,
'A'
))
{
if
(
tag1
==
MKTAG
(
'D'
,
'X'
,
'S'
,
'B'
)
||
tag1
==
MKTAG
(
'D'
,
'X'
,
'S'
,
'A'
))
{
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_SUBTITLE
;
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_SUBTITLE
;
...
...
libavformat/riff.c
View file @
456a70ae
...
@@ -440,6 +440,23 @@ int ff_put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
...
@@ -440,6 +440,23 @@ int ff_put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
return
hdrsize
;
return
hdrsize
;
}
}
int
ff_get_bmp_header
(
ByteIOContext
*
pb
,
AVStream
*
st
)
{
int
tag1
;
get_le32
(
pb
);
/* size */
st
->
codec
->
width
=
get_le32
(
pb
);
st
->
codec
->
height
=
(
int32_t
)
get_le32
(
pb
);
get_le16
(
pb
);
/* planes */
st
->
codec
->
bits_per_coded_sample
=
get_le16
(
pb
);
/* depth */
tag1
=
get_le32
(
pb
);
get_le32
(
pb
);
/* ImageSize */
get_le32
(
pb
);
/* XPelsPerMeter */
get_le32
(
pb
);
/* YPelsPerMeter */
get_le32
(
pb
);
/* ClrUsed */
get_le32
(
pb
);
/* ClrImportant */
return
tag1
;
}
/* BITMAPINFOHEADER header */
/* BITMAPINFOHEADER header */
void
ff_put_bmp_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
enc
,
const
AVCodecTag
*
tags
,
int
for_asf
)
void
ff_put_bmp_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
enc
,
const
AVCodecTag
*
tags
,
int
for_asf
)
{
{
...
...
libavformat/riff.h
View file @
456a70ae
...
@@ -35,6 +35,13 @@
...
@@ -35,6 +35,13 @@
int64_t
ff_start_tag
(
ByteIOContext
*
pb
,
const
char
*
tag
);
int64_t
ff_start_tag
(
ByteIOContext
*
pb
,
const
char
*
tag
);
void
ff_end_tag
(
ByteIOContext
*
pb
,
int64_t
start
);
void
ff_end_tag
(
ByteIOContext
*
pb
,
int64_t
start
);
/**
* Read BITMAPINFOHEADER structure and set AVStream codec width, height and
* bits_per_encoded_sample fields. Does not read extradata.
* @return codec tag
*/
int
ff_get_bmp_header
(
ByteIOContext
*
pb
,
AVStream
*
st
);
void
ff_put_bmp_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
enc
,
const
AVCodecTag
*
tags
,
int
for_asf
);
void
ff_put_bmp_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
enc
,
const
AVCodecTag
*
tags
,
int
for_asf
);
int
ff_put_wav_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
enc
);
int
ff_put_wav_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
enc
);
enum
CodecID
ff_wav_codec_get_id
(
unsigned
int
tag
,
int
bps
);
enum
CodecID
ff_wav_codec_get_id
(
unsigned
int
tag
,
int
bps
);
...
...
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