diff options
author | Mans Rullgard <mans@mansr.com> | 2012-05-14 16:47:59 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-05-14 20:26:39 +0100 |
commit | 7c6d2406655ae44dd97e95253a2f2d5b27a1c449 (patch) | |
tree | 7a0db607a873231815d620eadc338b3f74402592 /libavformat/mtv.c | |
parent | 31f2c0231f2294145fcc24717c0127c040dc0c48 (diff) | |
download | ffmpeg-7c6d2406655ae44dd97e95253a2f2d5b27a1c449.tar.gz |
mtv: do not byteswap raw video in demuxer
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavformat/mtv.c')
-rw-r--r-- | libavformat/mtv.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/libavformat/mtv.c b/libavformat/mtv.c index 2af9c2dd56..0d4a05c5f5 100644 --- a/libavformat/mtv.c +++ b/libavformat/mtv.c @@ -130,7 +130,7 @@ static int mtv_read_header(AVFormatContext *s) avpriv_set_pts_info(st, 64, 1, mtv->video_fps); st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_RAWVIDEO; - st->codec->pix_fmt = PIX_FMT_RGB565; + st->codec->pix_fmt = PIX_FMT_RGB565BE; st->codec->width = mtv->img_width; st->codec->height = mtv->img_height; st->codec->sample_rate = mtv->video_fps; @@ -163,9 +163,6 @@ static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt) MTVDemuxContext *mtv = s->priv_data; AVIOContext *pb = s->pb; int ret; -#if !HAVE_BIGENDIAN - int i; -#endif if((avio_tell(pb) - s->data_offset + mtv->img_segment_size) % mtv->full_segment_size) { @@ -184,17 +181,6 @@ static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt) if(ret < 0) return ret; -#if !HAVE_BIGENDIAN - - /* pkt->data is GGGRRRR BBBBBGGG - * and we need RRRRRGGG GGGBBBBB - * for PIX_FMT_RGB565 so here we - * just swap bytes as they come - */ - - for(i=0;i<mtv->img_segment_size/2;i++) - *((uint16_t *)pkt->data+i) = av_bswap16(*((uint16_t *)pkt->data+i)); -#endif pkt->stream_index = 0; } |