[FFmpeg-cvslog] ptx: correct decoding

Paul B Mahol git at videolan.org
Tue Jul 17 19:06:59 CEST 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Jul 16 21:53:44 2012 +0000| [0b74b8f649db87859d5b7ef5c4e5f6dbc0c0615a] | committer: Paul B Mahol

ptx: correct decoding

The image data is in BGR and not in RGB.

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b74b8f649db87859d5b7ef5c4e5f6dbc0c0615a
---

 libavcodec/ptx.c   |    2 +-
 tests/ref/fate/ptx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ptx.c b/libavcodec/ptx.c
index 3f6c746..6b8dbd3 100644
--- a/libavcodec/ptx.c
+++ b/libavcodec/ptx.c
@@ -58,7 +58,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         return -1;
     }
 
-    avctx->pix_fmt = PIX_FMT_RGB555LE;
+    avctx->pix_fmt = PIX_FMT_BGR555LE;
 
     if (buf_end - buf < offset)
         return AVERROR_INVALIDDATA;
diff --git a/tests/ref/fate/ptx b/tests/ref/fate/ptx
index 8d59468..7edbbdd 100644
--- a/tests/ref/fate/ptx
+++ b/tests/ref/fate/ptx
@@ -1,2 +1,2 @@
 #tb 0: 1/25
-0,          0,          0,        1,   393216, 0x019d9950
+0,          0,          0,        1,   393216, 0x30479950



More information about the ffmpeg-cvslog mailing list