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
Support gray8a pam decoding.
tags/n0.10
Carl Eugen Hoyos
14 years ago
parent
dc2f652ae4
commit
328e79329a
2 changed files
with
8 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-0
libavcodec/pnm.c
+5
-0
libavcodec/pnmdec.c
+ 3
- 0
libavcodec/pnm.c
View File
@@ -118,6 +118,9 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
} else {
avctx->pix_fmt = PIX_FMT_GRAY16BE;
}
} else if (depth == 2) {
if (maxval == 255)
avctx->pix_fmt = PIX_FMT_GRAY8A;
} else if (depth == 3) {
if (maxval < 256) {
avctx->pix_fmt = PIX_FMT_RGB24;
+ 5
- 0
libavcodec/pnmdec.c
View File
@@ -75,6 +75,11 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
if (s->maxval < 255)
upgrade = 1;
goto do_read;
case PIX_FMT_GRAY8A:
n = avctx->width * 2;
components=2;
sample_len=8;
goto do_read;
case PIX_FMT_GRAY16BE:
case PIX_FMT_GRAY16LE:
n = avctx->width * 2;
Write
Preview
Loading…
Cancel
Save