diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-01 04:09:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-01 04:13:53 +0200 |
commit | 4ebfcd62af117ed7f343a0e52709a6409e0913f4 (patch) | |
tree | 183b748b2cd55a24651a0741b5e18ea7768e5c60 /libavcodec/sgienc.c | |
parent | 23290c86bfe6797da2865bfbd238588fe5398ca2 (diff) | |
parent | 6c1df1f2287401b6022773e382ebc3a3bfed0b38 (diff) | |
download | ffmpeg-4ebfcd62af117ed7f343a0e52709a6409e0913f4.tar.gz |
Merge commit '6c1df1f2287401b6022773e382ebc3a3bfed0b38'
* commit '6c1df1f2287401b6022773e382ebc3a3bfed0b38':
sgi: encode images with 4 channels at 8 and 16 bits
Conflicts:
Changelog
libavcodec/sgienc.c
See: 21a100610977a163fe6480b5cf4c25f34f64b86b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/sgienc.c')
-rw-r--r-- | libavcodec/sgienc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c index a809d5c0b2..21026afccc 100644 --- a/libavcodec/sgienc.c +++ b/libavcodec/sgienc.c @@ -50,7 +50,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame * const p = frame; uint8_t *offsettab, *lengthtab, *in_buf, *encode_buf, *buf; int x, y, z, length, tablesize, ret; - unsigned int width, height, depth, dimension, bytes_per_channel, pixmax, put_be; + unsigned int width, height, depth, dimension; + unsigned int bytes_per_channel, pixmax, put_be; unsigned char *end_buf; avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; @@ -183,7 +184,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, for (y = 0; y < height; y++) { for (x = 0; x < width * depth; x += depth) if (bytes_per_channel == 1) { - bytestream_put_byte(&buf, in_buf[x]); + bytestream_put_byte(&buf, in_buf[x]); } else { if (put_be) { bytestream_put_be16(&buf, ((uint16_t *)in_buf)[x]); @@ -223,7 +224,7 @@ AVCodec ff_sgi_encoder = { AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, AV_PIX_FMT_RGB48LE, AV_PIX_FMT_RGB48BE, AV_PIX_FMT_RGBA64LE, AV_PIX_FMT_RGBA64BE, - AV_PIX_FMT_GRAY16LE, AV_PIX_FMT_GRAY16BE, - AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE + AV_PIX_FMT_GRAY16LE, AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_GRAY8, + AV_PIX_FMT_NONE }, }; |