diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-03-03 10:19:56 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-03-03 10:19:56 +0000 |
commit | fd9fe9e04d56535ccbee56a7f0c5876009e56c9f (patch) | |
tree | 925f95455381bb4098ee0c0a6ad4ab2b2716dd62 /libmpcodecs | |
parent | 3d4f1ec4833a4fcb9ce3894f033984174f788b8f (diff) | |
download | mpv-fd9fe9e04d56535ccbee56a7f0c5876009e56c9f.tar.bz2 mpv-fd9fe9e04d56535ccbee56a7f0c5876009e56c9f.tar.xz |
Make nuv files work on bigendian (but old nuv files created with mencoder
wont play anymore - before they would have worked with mplayer on be)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14897 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/native/RTjpegN.c | 9 | ||||
-rw-r--r-- | libmpcodecs/native/nuppelvideo.c | 2 | ||||
-rw-r--r-- | libmpcodecs/ve_nuv.c | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/libmpcodecs/native/RTjpegN.c b/libmpcodecs/native/RTjpegN.c index 54fc3d0026..523612d1f9 100644 --- a/libmpcodecs/native/RTjpegN.c +++ b/libmpcodecs/native/RTjpegN.c @@ -31,6 +31,7 @@ #define MMX #endif +#include "bswap.h" #include "RTjpegN.h" #ifdef MMX @@ -2820,9 +2821,9 @@ void RTjpeg_init_compress(__u32 *buf, int width, int height, __u8 Q) RTjpeg_quant_init(); for(i=0; i<64; i++) - buf[i]=RTjpeg_liqt[i]; + buf[i]=le2me_32(RTjpeg_liqt[i]); for(i=0; i<64; i++) - buf[64+i]=RTjpeg_ciqt[i]; + buf[64+i]=le2me_32(RTjpeg_ciqt[i]); } void RTjpeg_init_decompress(__u32 *buf, int width, int height) @@ -2840,8 +2841,8 @@ void RTjpeg_init_decompress(__u32 *buf, int width, int height) for(i=0; i<64; i++) { - RTjpeg_liqt[i]=buf[i]; - RTjpeg_ciqt[i]=buf[i+64]; + RTjpeg_liqt[i]=le2me_32(buf[i]); + RTjpeg_ciqt[i]=le2me_32(buf[i+64]); } RTjpeg_lb8=0; diff --git a/libmpcodecs/native/nuppelvideo.c b/libmpcodecs/native/nuppelvideo.c index 8b82d8a4e3..566d707426 100644 --- a/libmpcodecs/native/nuppelvideo.c +++ b/libmpcodecs/native/nuppelvideo.c @@ -13,6 +13,7 @@ #include "config.h" #include "mp_msg.h" +#include "bswap.h" #include "../../libvo/fastmemcpy.h" @@ -37,6 +38,7 @@ void decode_nuv( unsigned char *encoded, int encoded_size, // printf("frametype: %c, comtype: %c, encoded_size: %d, width: %d, height: %d\n", // encodedh->frametype, encodedh->comptype, encoded_size, width, height); + le2me_rtframeheader(encodedh); switch(encodedh->frametype) { case 'D': /* additional data for compressors */ diff --git a/libmpcodecs/ve_nuv.c b/libmpcodecs/ve_nuv.c index f1a9f92b4b..bee798617d 100644 --- a/libmpcodecs/ve_nuv.c +++ b/libmpcodecs/ve_nuv.c @@ -116,6 +116,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){ ench->comptype = 'R'; // compressor data for RTjpeg ench->packetlength = 128*sizeof(long int); + le2me_rtframeheader(ench); mux_v->buffer=vf->priv->buffer; muxer_write_chunk(mux_v,FRAMEHEADERSIZE + 128*sizeof(long int), 0x10); vf->priv->tbl_wrote = 1; @@ -172,6 +173,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){ ench->frametype = 'V'; // video frame ench->packetlength = len; + le2me_rtframeheader(ench); mux_v->buffer=(void*)ench; muxer_write_chunk(mux_v, len + FRAMEHEADERSIZE, 0x10); return 1; |