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
c828c709
Commit
c828c709
authored
Mar 01, 2007
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quicktime 'raw ' support
Originally committed as revision 8168 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
6b936ec6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
14 deletions
+27
-14
raw.c
libavcodec/raw.c
+26
-13
mov.c
libavformat/mov.c
+1
-1
No files found.
libavcodec/raw.c
View file @
c828c709
...
...
@@ -63,9 +63,27 @@ static const PixelFormatTag pixelFormatTags[] = {
{
-
1
,
0
},
};
static
int
findPixelFormat
(
unsigned
int
fourcc
)
static
const
PixelFormatTag
pixelFormatBpsAVI
[]
=
{
{
PIX_FMT_PAL8
,
8
},
{
PIX_FMT_RGB555
,
15
},
{
PIX_FMT_RGB555
,
16
},
{
PIX_FMT_BGR24
,
24
},
{
PIX_FMT_RGB32
,
32
},
{
-
1
,
0
},
};
static
const
PixelFormatTag
pixelFormatBpsMOV
[]
=
{
/* FIXME fix swscaler to support those */
/* http://developer.apple.com/documentation/QuickTime/QTFF/QTFFChap3/chapter_4_section_2.html */
{
PIX_FMT_PAL8
,
8
},
{
PIX_FMT_BGR555
,
16
},
{
PIX_FMT_RGB24
,
24
},
{
PIX_FMT_BGR32_1
,
32
},
{
-
1
,
0
},
};
static
int
findPixelFormat
(
const
PixelFormatTag
*
tags
,
unsigned
int
fourcc
)
{
const
PixelFormatTag
*
tags
=
pixelFormatTags
;
while
(
tags
->
pix_fmt
>=
0
)
{
if
(
tags
->
fourcc
==
fourcc
)
return
tags
->
pix_fmt
;
...
...
@@ -91,17 +109,12 @@ static int raw_init_decoder(AVCodecContext *avctx)
{
RawVideoContext
*
context
=
avctx
->
priv_data
;
if
(
avctx
->
codec_tag
)
avctx
->
pix_fmt
=
findPixelFormat
(
avctx
->
codec_tag
);
else
if
(
avctx
->
bits_per_sample
){
switch
(
avctx
->
bits_per_sample
){
case
8
:
avctx
->
pix_fmt
=
PIX_FMT_PAL8
;
break
;
case
15
:
avctx
->
pix_fmt
=
PIX_FMT_RGB555
;
break
;
case
16
:
avctx
->
pix_fmt
=
PIX_FMT_RGB555
;
break
;
case
24
:
avctx
->
pix_fmt
=
PIX_FMT_BGR24
;
break
;
case
32
:
avctx
->
pix_fmt
=
PIX_FMT_RGB32
;
break
;
}
}
if
(
avctx
->
codec_tag
==
MKTAG
(
'r'
,
'a'
,
'w'
,
' '
))
avctx
->
pix_fmt
=
findPixelFormat
(
pixelFormatBpsMOV
,
avctx
->
bits_per_sample
);
else
if
(
avctx
->
codec_tag
)
avctx
->
pix_fmt
=
findPixelFormat
(
pixelFormatTags
,
avctx
->
codec_tag
);
else
if
(
avctx
->
bits_per_sample
)
avctx
->
pix_fmt
=
findPixelFormat
(
pixelFormatBpsAVI
,
avctx
->
bits_per_sample
);
context
->
length
=
avpicture_get_size
(
avctx
->
pix_fmt
,
avctx
->
width
,
avctx
->
height
);
context
->
buffer
=
av_malloc
(
context
->
length
);
...
...
libavformat/mov.c
View file @
c828c709
...
...
@@ -68,7 +68,7 @@
static
const
AVCodecTag
mov_video_tags
[]
=
{
/* { CODEC_ID_, MKTAG('c', 'v', 'i', 'd') }, *//* Cinepak */
/* { CODEC_ID_H263, MKTAG('r', 'a', 'w', ' ') }, */
/* Uncompressed RGB */
{
CODEC_ID_RAWVIDEO
,
MKTAG
(
'r'
,
'a'
,
'w'
,
' '
)
},
/* Uncompressed RGB */
/* { CODEC_ID_H263, MKTAG('Y', 'u', 'v', '2') }, *//* Uncompressed YUV422 */
/* { CODEC_ID_RAWVIDEO, MKTAG('A', 'V', 'U', 'I') }, *//* YUV with alpha-channel (AVID Uncompressed) */
/* Graphics */
...
...
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