Mercurial > mplayer.hg
annotate osdep/swab.c @ 15070:bde4030f9134
Better defaults encoding settings for XviD, intended to be a good tradeoff CPU/PSNR.
author | gpoirier |
---|---|
date | Fri, 08 Apr 2005 19:14:04 +0000 |
parents | c0bde085511c |
children | 08cac43f1e38 |
rev | line source |
---|---|
13612 | 1 #include "../config.h" |
2 | |
3 #ifndef HAVE_SWAB | |
4 /* system has no swab. emulate via bswap */ | |
5 #include "../bswap.h" | |
6 #include <unistd.h> | |
7 | |
8 void swab(const void *from, void *to, ssize_t n) { | |
9 const int16_t *in = (int16_t*)from; | |
10 int16_t *out = (int16_t*)to; | |
11 int i; | |
12 n /= 2; | |
13 for (i = 0 ; i < n; i++) { | |
14 out[i] = bswap_16(in[i]); | |
15 } | |
16 } | |
17 #endif |