]> git.sesse.net Git - ffmpeg/commitdiff
Use named constants defined in targa.h.
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Wed, 13 Oct 2010 10:39:47 +0000 (10:39 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Wed, 13 Oct 2010 10:39:47 +0000 (10:39 +0000)
Originally committed as revision 25465 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/targaenc.c

index 1d50326573757511df5f0586cd1875f4c2b83590..a179baad3c6c84e449bedc11c48a2e1d7456cf40 100644 (file)
@@ -102,15 +102,15 @@ static int targa_encode_frame(AVCodecContext *avctx,
     /* TODO: support alpha channel */
     switch(avctx->pix_fmt) {
     case PIX_FMT_GRAY8:
-        outbuf[2] = 3;           /* uncompressed grayscale image */
+        outbuf[2] = TGA_BW;      /* uncompressed grayscale image */
         outbuf[16] = 8;          /* bpp */
         break;
     case PIX_FMT_RGB555LE:
-        outbuf[2] = 2;           /* uncompresses true-color image */
+        outbuf[2] = TGA_RGB;     /* uncompresses true-color image */
         outbuf[16] = 16;         /* bpp */
         break;
     case PIX_FMT_BGR24:
-        outbuf[2] = 2;           /* uncompressed true-color image */
+        outbuf[2] = TGA_RGB;     /* uncompressed true-color image */
         outbuf[16] = 24;         /* bpp */
         break;
     default: