Mercurial > mplayer.hg
changeset 21372:1767c271d710
Remove bswap.h, use libavutil/bswap.h instead.
line wrap: on
line diff
--- a/bswap.h Wed Nov 29 14:53:32 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -#ifndef __MP_BSWAP_H__ -#define __MP_BSWAP_H__ - -#include "libavutil/common.h" -#include "libavutil/bswap.h" - -static inline float bswap_flt(float x) { - union {uint32_t i; float f;} u; - u.f = x; - u.i = bswap_32(u.i); - return u.f; -} - -static inline double bswap_dbl(double x) { - union {uint64_t i; double d;} u; - u.d = x; - u.i = bswap_64(u.i); - return u.d; -} - -static inline long double bswap_ldbl(long double x) { - union {char d[10]; long double ld;} uin; - union {char d[10]; long double ld;} uout; - uin.ld = x; - uout.d[0] = uin.d[9]; - uout.d[1] = uin.d[8]; - uout.d[2] = uin.d[7]; - uout.d[3] = uin.d[6]; - uout.d[4] = uin.d[5]; - uout.d[5] = uin.d[4]; - uout.d[6] = uin.d[3]; - uout.d[7] = uin.d[2]; - uout.d[8] = uin.d[1]; - uout.d[9] = uin.d[0]; - return uout.ld; -} - -// be2me ... BigEndian to MachineEndian -// le2me ... LittleEndian to MachineEndian - -#ifdef WORDS_BIGENDIAN -#define be2me_flt(x) (x) -#define be2me_dbl(x) (x) -#define be2me_ldbl(x) (x) -#define le2me_flt(x) bswap_flt(x) -#define le2me_dbl(x) bswap_dbl(x) -#define le2me_ldbl(x) bswap_ldbl(x) -#else -#define be2me_flt(x) bswap_flt(x) -#define be2me_dbl(x) bswap_dbl(x) -#define be2me_ldbl(x) bswap_ldbl(x) -#define le2me_flt(x) (x) -#define le2me_dbl(x) (x) -#define le2me_ldbl(x) (x) -#endif - -#endif /* __MP_BSWAP_H__ */
--- a/libaf/af_format.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libaf/af_format.c Wed Nov 29 15:02:45 2006 +0000 @@ -22,7 +22,8 @@ #endif #include "af.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "libvo/fastmemcpy.h" /* Functions used by play to convert the input audio to the correct
--- a/libao2/ao_dxr2.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libao2/ao_dxr2.c Wed Nov 29 15:02:45 2006 +0000 @@ -7,7 +7,8 @@ #include "config.h" #include "mp_msg.h" #include "help_mp.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "audio_out.h" #include "audio_out_internal.h"
--- a/libao2/ao_pcm.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libao2/ao_pcm.c Wed Nov 29 15:02:45 2006 +0000 @@ -4,7 +4,8 @@ #include <stdlib.h> #include <string.h> -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "subopt-helper.h" #include "libaf/af_format.h" #include "audio_out.h"
--- a/libdha/sysdep/pci_linux.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libdha/sysdep/pci_linux.c Wed Nov 29 15:02:45 2006 +0000 @@ -132,7 +132,8 @@ #include <fcntl.h> //#include <sys/io.h> #include <linux/pci.h> -#include "../../bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" static int pci_get_vendor( unsigned char bus,
--- a/libmpcodecs/ad_dk3adpcm.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpcodecs/ad_dk3adpcm.c Wed Nov 29 15:02:45 2006 +0000 @@ -16,7 +16,8 @@ #include <unistd.h> #include "config.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "ad_internal.h" static ad_info_t info =
--- a/libmpcodecs/ad_ffmpeg.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpcodecs/ad_ffmpeg.c Wed Nov 29 15:02:45 2006 +0000 @@ -8,7 +8,7 @@ #include "ad_internal.h" -#include "bswap.h" +#include "libavutil/bswap.h" static ad_info_t info = {
--- a/libmpcodecs/ad_imaadpcm.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpcodecs/ad_imaadpcm.c Wed Nov 29 15:02:45 2006 +0000 @@ -21,7 +21,8 @@ #include <unistd.h> #include "config.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "ad_internal.h" #define MS_IMA_ADPCM_PREAMBLE_SIZE 4
--- a/libmpcodecs/ad_liba52.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpcodecs/ad_liba52.c Wed Nov 29 15:02:45 2006 +0000 @@ -37,7 +37,7 @@ float a52_drc_level = 1.0; static int a52_drc_action = DRC_NO_ACTION; -#include "bswap.h" +#include "libavutil/bswap.h" static ad_info_t info = {
--- a/libmpcodecs/ad_msadpcm.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpcodecs/ad_msadpcm.c Wed Nov 29 15:02:45 2006 +0000 @@ -12,7 +12,8 @@ #include <unistd.h> #include "config.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "ad_internal.h" static ad_info_t info =
--- a/libmpcodecs/native/RTjpegN.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpcodecs/native/RTjpegN.c Wed Nov 29 15:02:45 2006 +0000 @@ -31,7 +31,8 @@ #define MMX #endif -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "RTjpegN.h" #ifdef MMX
--- a/libmpcodecs/native/nuppelvideo.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpcodecs/native/nuppelvideo.c Wed Nov 29 15:02:45 2006 +0000 @@ -13,7 +13,8 @@ #include "config.h" #include "mp_msg.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "../libvo/fastmemcpy.h"
--- a/libmpcodecs/vd_ffmpeg.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Wed Nov 29 15:02:45 2006 +0000 @@ -7,7 +7,8 @@ #include "mp_msg.h" #include "help_mp.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "vd_internal.h"
--- a/libmpcodecs/vd_ijpg.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpcodecs/vd_ijpg.c Wed Nov 29 15:02:45 2006 +0000 @@ -11,7 +11,8 @@ #include <setjmp.h> -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "libvo/fastmemcpy.h" #include "vd_internal.h"
--- a/libmpcodecs/vd_mpng.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpcodecs/vd_mpng.c Wed Nov 29 15:02:45 2006 +0000 @@ -6,7 +6,8 @@ #include <png.h> -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "libvo/fastmemcpy.h" #include "vd_internal.h"
--- a/libmpcodecs/vd_mtga.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpcodecs/vd_mtga.c Wed Nov 29 15:02:45 2006 +0000 @@ -10,7 +10,8 @@ #include "config.h" #include "mp_msg.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "libvo/fastmemcpy.h" #include "vd_internal.h"
--- a/libmpcodecs/vd_sgi.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpcodecs/vd_sgi.c Wed Nov 29 15:02:45 2006 +0000 @@ -7,7 +7,8 @@ #include "config.h" #include "mp_msg.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "vd_internal.h" #define SGI_HEADER_LEN 512
--- a/libmpcodecs/ve_qtvideo.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpcodecs/ve_qtvideo.c Wed Nov 29 15:02:45 2006 +0000 @@ -10,7 +10,8 @@ #include "config.h" #include "mp_msg.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #ifdef WIN32_LOADER #include "ldt_keeper.h"
--- a/libmpcodecs/vf_divtc.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpcodecs/vf_divtc.c Wed Nov 29 15:02:45 2006 +0000 @@ -7,7 +7,8 @@ #include "config.h" #include "mp_msg.h" #include "cpudetect.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "img_format.h" #include "mp_image.h"
--- a/libmpdemux/asf.h Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpdemux/asf.h Wed Nov 29 15:02:45 2006 +0000 @@ -3,7 +3,8 @@ //#include "config.h" /* for WORDS_BIGENDIAN */ #include <inttypes.h> -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #ifndef MIN #define MIN(a,b) (((a)<(b))?(a):(b))
--- a/libmpdemux/aviheader.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpdemux/aviheader.c Wed Nov 29 15:02:45 2006 +0000 @@ -12,7 +12,6 @@ #include "demuxer.h" #include "stheader.h" -#include "bswap.h" #include "aviheader.h" #define MIN(a,b) (((a)<(b))?(a):(b))
--- a/libmpdemux/aviheader.h Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpdemux/aviheader.h Wed Nov 29 15:02:45 2006 +0000 @@ -2,7 +2,8 @@ #define _aviheader_h //#include "config.h" /* get correct definition WORDS_BIGENDIAN */ -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #ifndef MIN #define MIN(a,b) (((a)<(b))?(a):(b))
--- a/libmpdemux/demux_mpc.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpdemux/demux_mpc.c Wed Nov 29 15:02:45 2006 +0000 @@ -11,7 +11,8 @@ #include <stdio.h> #include <string.h> #include "mp_msg.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "stream.h" #include "demuxer.h" #include "stheader.h"
--- a/libmpdemux/demux_vqf.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpdemux/demux_vqf.c Wed Nov 29 15:02:45 2006 +0000 @@ -2,7 +2,8 @@ #include <stdlib.h> #include <stdio.h> -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "stream.h" #include "demuxer.h"
--- a/libmpdemux/ebml.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpdemux/ebml.c Wed Nov 29 15:02:45 2006 +0000 @@ -11,7 +11,8 @@ #include "stream.h" #include "ebml.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #ifndef SIZE_MAX
--- a/libmpdemux/muxer_lavf.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpdemux/muxer_lavf.c Wed Nov 29 15:02:45 2006 +0000 @@ -9,7 +9,6 @@ #include "mp_msg.h" #include "help_mp.h" -#include "bswap.h" #include "aviheader.h" #include "ms_hdr.h"
--- a/libmpdemux/muxer_mpeg.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libmpdemux/muxer_mpeg.c Wed Nov 29 15:02:45 2006 +0000 @@ -9,8 +9,6 @@ #include "mp_msg.h" #include "help_mp.h" -#include "bswap.h" - #include "aviheader.h" #include "ms_hdr.h"
--- a/libvo/font_load_ft.c Wed Nov 29 14:53:32 2006 +0000 +++ b/libvo/font_load_ft.c Wed Nov 29 15:02:45 2006 +0000 @@ -28,7 +28,8 @@ #include <fontconfig/fontconfig.h> #endif -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "font_load.h" #include "mp_msg.h" #include "mplayer.h"
--- a/mp3lib/sr1.c Wed Nov 29 14:53:32 2006 +0000 +++ b/mp3lib/sr1.c Wed Nov 29 15:02:45 2006 +0000 @@ -24,7 +24,8 @@ #include "mpg123.h" #include "huffman.h" #include "mp3.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "cpudetect.h" //#include "liba52/mm_accel.h" #include "mp_msg.h"
--- a/stream/realrtsp/real.c Wed Nov 29 14:53:32 2006 +0000 +++ b/stream/realrtsp/real.c Wed Nov 29 15:02:45 2006 +0000 @@ -31,7 +31,8 @@ #include <string.h> #include "../config.h" -#include "../bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "real.h" #include "asmrp.h" #include "sdpplin.h"
--- a/stream/stream_cdda.c Wed Nov 29 14:53:32 2006 +0000 +++ b/stream/stream_cdda.c Wed Nov 29 15:02:45 2006 +0000 @@ -3,7 +3,8 @@ #include "stream.h" #include "m_option.h" #include "m_struct.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include <stdio.h> #include <stdlib.h>
--- a/stream/stream_netstream.c Wed Nov 29 14:53:32 2006 +0000 +++ b/stream/stream_netstream.c Wed Nov 29 15:02:45 2006 +0000 @@ -60,7 +60,8 @@ #include "help_mp.h" #include "m_option.h" #include "m_struct.h" -#include "bswap.h" +#include "libavutil/common.h" +#include "libavutil/bswap.h" #include "netstream.h" #include "tcp.h"
--- a/vidix/drivers/mach64_vid.c Wed Nov 29 14:53:32 2006 +0000 +++ b/vidix/drivers/mach64_vid.c Wed Nov 29 15:02:45 2006 +0000 @@ -14,7 +14,8 @@ #include <fcntl.h> #include "../../config.h" -#include "../../bswap.h" +#include "../../libavutil/common.h" +#include "../../libavutil/bswap.h" #include "../vidix.h" #include "../fourcc.h" #include "../../libdha/libdha.h"
--- a/vidix/drivers/nvidia_vid.c Wed Nov 29 14:53:32 2006 +0000 +++ b/vidix/drivers/nvidia_vid.c Wed Nov 29 15:02:45 2006 +0000 @@ -24,7 +24,8 @@ #include "../../libdha/pci_ids.h" #include "../../libdha/pci_names.h" #include "../../config.h" -#include "../../bswap.h" +#include "../../libavutil/common.h" +#include "../../libavutil/bswap.h" pciinfo_t pci_info;
--- a/vidix/drivers/radeon_vid.c Wed Nov 29 14:53:32 2006 +0000 +++ b/vidix/drivers/radeon_vid.c Wed Nov 29 15:02:45 2006 +0000 @@ -17,7 +17,8 @@ #include <inttypes.h> #include "../../config.h" -#include "../../bswap.h" +#include "../../libavutil/common.h" +#include "../../libavutil/bswap.h" #include "../../libdha/pci_ids.h" #include "../../libdha/pci_names.h" #include "../vidix.h"
--- a/vidix/vidixlib.c Wed Nov 29 14:53:32 2006 +0000 +++ b/vidix/vidixlib.c Wed Nov 29 15:02:45 2006 +0000 @@ -43,8 +43,9 @@ #endif #include "vidixlib.h" -#include "../config.h" -#include "../bswap.h" +#include "../config.h" +#include "../libavutil/common.h" +#include "../libavutil/bswap.h" static char drv_name[FILENAME_MAX];