Mercurial > mplayer.hg
view osdep/swab.c @ 19930:5d0eaf70e1bc
Add missing conversion from IMGFMT_I420 to PIX_FMT_YUV420P.
This fixes recent bug with x264 and '-vf scale'.
Patch by Luca Abeni (lucabe72 at email dot it); applied at his request.
author | corey |
---|---|
date | Fri, 22 Sep 2006 18:18:56 +0000 |
parents | 08cac43f1e38 |
children | a9a7d6d85020 |
line wrap: on
line source
#include "config.h" #ifndef HAVE_SWAB /* system has no swab. emulate via bswap */ #include "bswap.h" #include <unistd.h> void swab(const void *from, void *to, ssize_t n) { const int16_t *in = (int16_t*)from; int16_t *out = (int16_t*)to; int i; n /= 2; for (i = 0 ; i < n; i++) { out[i] = bswap_16(in[i]); } } #endif