aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis Ballier <alexis.ballier@gmail.com>2010-03-08 08:43:20 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2010-03-08 08:43:20 +0000
commitda5bcafe3b728f255ad068fc406622515b435082 (patch)
tree43da9fc3d36e4c883d8a90fe7f520b6b3355cc72
parentb5852e8a4d5c7f1069f1f113d384aab2a7950d04 (diff)
downloadffmpeg-da5bcafe3b728f255ad068fc406622515b435082.tar.gz
targeenc: fix rgb555 encoding on big endian systems.
Patch by Alexis Ballier gmail_address(name, surname) Originally committed as revision 22320 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/targaenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/targaenc.c b/libavcodec/targaenc.c
index 82d7fe3599..fa886755c1 100644
--- a/libavcodec/targaenc.c
+++ b/libavcodec/targaenc.c
@@ -104,7 +104,7 @@ static int targa_encode_frame(AVCodecContext *avctx,
outbuf[2] = 3; /* uncompressed grayscale image */
outbuf[16] = 8; /* bpp */
break;
- case PIX_FMT_RGB555:
+ case PIX_FMT_RGB555LE:
outbuf[2] = 2; /* uncompresses true-color image */
outbuf[16] = 16; /* bpp */
break;
@@ -158,6 +158,6 @@ AVCodec targa_encoder = {
.priv_data_size = sizeof(TargaContext),
.init = targa_encode_init,
.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"),
};