Commit 00186816 authored by benoit's avatar benoit

targeenc: fix rgb555 encoding on big endian systems.

Patch by Alexis Ballier gmail_address(name, surname)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22320 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4dfd5e1a
...@@ -104,7 +104,7 @@ static int targa_encode_frame(AVCodecContext *avctx, ...@@ -104,7 +104,7 @@ static int targa_encode_frame(AVCodecContext *avctx,
outbuf[2] = 3; /* uncompressed grayscale image */ outbuf[2] = 3; /* uncompressed grayscale image */
outbuf[16] = 8; /* bpp */ outbuf[16] = 8; /* bpp */
break; break;
case PIX_FMT_RGB555: case PIX_FMT_RGB555LE:
outbuf[2] = 2; /* uncompresses true-color image */ outbuf[2] = 2; /* uncompresses true-color image */
outbuf[16] = 16; /* bpp */ outbuf[16] = 16; /* bpp */
break; break;
...@@ -158,6 +158,6 @@ AVCodec targa_encoder = { ...@@ -158,6 +158,6 @@ AVCodec targa_encoder = {
.priv_data_size = sizeof(TargaContext), .priv_data_size = sizeof(TargaContext),
.init = targa_encode_init, .init = targa_encode_init,
.encode = targa_encode_frame, .encode = targa_encode_frame,
.pix_fmts= (const enum PixelFormat[]){PIX_FMT_BGR24, PIX_FMT_RGB555, PIX_FMT_GRAY8, PIX_FMT_NONE}, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_BGR24, PIX_FMT_RGB555LE, PIX_FMT_GRAY8, PIX_FMT_NONE},
.long_name= NULL_IF_CONFIG_SMALL("Truevision Targa image"), .long_name= NULL_IF_CONFIG_SMALL("Truevision Targa image"),
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment