This website works better with JavaScript.
Home
Help
Sign In
falkTX
/
FFmpeg
mirror of
https://github.com/falkTX/FFmpeg.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
338
Wiki
Activity
Browse Source
raw rgb support
Originally committed as revision 3330 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer
21 years ago
parent
f1dc14a9fa
commit
627c50b7fc
2 changed files
with
9 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+8
-0
libavcodec/raw.c
+1
-0
libavformat/avienc.c
+ 8
- 0
libavcodec/raw.c
View File
@@ -83,6 +83,14 @@ static int raw_init_decoder(AVCodecContext *avctx)
if (avctx->codec_tag)
avctx->pix_fmt = findPixelFormat(avctx->codec_tag);
else if (avctx->bits_per_sample){
switch(avctx->bits_per_sample){
case 15: avctx->pix_fmt= PIX_FMT_RGB555; break;
case 16: avctx->pix_fmt= PIX_FMT_RGB565; break;
case 24: avctx->pix_fmt= PIX_FMT_BGR24 ; break;
case 32: avctx->pix_fmt= PIX_FMT_RGBA32; break;
}
}
context->length = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
context->buffer = av_malloc(context->length);
+ 1
- 0
libavformat/avienc.c
View File
@@ -164,6 +164,7 @@ const CodecTag codec_bmp_tags[] = {
{ CODEC_ID_4XM, MKTAG('4', 'X', 'M', 'V') },
{ CODEC_ID_FLV1, MKTAG('F', 'L', 'V', '1') },
{ CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', '1') },
{ CODEC_ID_RAWVIDEO, 0 },
{ 0, 0 },
};
Write
Preview
Loading…
Cancel
Save