mirror of https://github.com/mpv-player/mpv
higher quality mode
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6449 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
73510c3d0b
commit
6a5f0f0c19
|
@ -49,6 +49,7 @@ typedef struct FilterParam{
|
|||
int strength;
|
||||
int uniform;
|
||||
int temporal;
|
||||
int quality;
|
||||
int8_t *noise;
|
||||
}FilterParam;
|
||||
|
||||
|
@ -105,7 +106,6 @@ static int8_t *initNoise(FilterParam *fp){
|
|||
#ifdef HAVE_MMX
|
||||
static inline void lineNoise_MMX(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift){
|
||||
int mmx_len= len&(~7);
|
||||
shift&= ~7;
|
||||
noise+=shift;
|
||||
|
||||
asm volatile(
|
||||
|
@ -135,7 +135,6 @@ static inline void lineNoise_MMX(uint8_t *dst, uint8_t *src, int8_t *noise, int
|
|||
#ifdef HAVE_MMX2
|
||||
static inline void lineNoise_MMX2(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift){
|
||||
int mmx_len= len&(~7);
|
||||
shift&= ~7;
|
||||
noise+=shift;
|
||||
|
||||
asm volatile(
|
||||
|
@ -200,6 +199,7 @@ static void noise(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int
|
|||
if(fp->temporal) shift= rand()&(MAX_SHIFT -1);
|
||||
else shift= nonTempRandShift[y];
|
||||
|
||||
if(fp->quality==0) shift&= ~7;
|
||||
lineNoise(dst, src, noise, width, shift);
|
||||
dst+= dstStride;
|
||||
src+= srcStride;
|
||||
|
@ -299,6 +299,8 @@ static void parse(FilterParam *fp, char* args){
|
|||
if(pos && pos<max) fp->uniform=1;
|
||||
pos= strchr(args, 't');
|
||||
if(pos && pos<max) fp->temporal=1;
|
||||
pos= strchr(args, 'h');
|
||||
if(pos && pos<max) fp->quality=1;
|
||||
|
||||
if(fp->strength) initNoise(fp);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue