diff options
author | gpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-07-23 13:38:20 +0000 |
---|---|---|
committer | gpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-07-23 13:38:20 +0000 |
commit | e746e16d88ac561fdeb3ff0110a2e6a314d42412 (patch) | |
tree | 26ca995181c621a89a416ccfc431c88ab3417a7a /libmpcodecs/vf_pp7.c | |
parent | f5b338b852ed80c7631aed7a6e48d92ff9dcb33b (diff) | |
download | mpv-e746e16d88ac561fdeb3ff0110a2e6a314d42412.tar.bz2 mpv-e746e16d88ac561fdeb3ff0110a2e6a314d42412.tar.xz |
-vf pp7 overblurs still parts of the image, which
have qp=1, and qp becomes zero after the >> 1. Modifying the threshold
table for qp=0 so it copies the qp=1 case seems to fix the problem.
Patch by Jindrich Makovicka % makovick AH gmail P com %
Original thread:
Date: Jul 22, 2006 2:55 PM
Subject: [MPlayer-dev-eng] [PATCH] -vf pp7 artifacting in still MPEG2 images
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19170 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vf_pp7.c')
-rw-r--r-- | libmpcodecs/vf_pp7.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libmpcodecs/vf_pp7.c b/libmpcodecs/vf_pp7.c index 4b3e039fff..cecb4c4423 100644 --- a/libmpcodecs/vf_pp7.c +++ b/libmpcodecs/vf_pp7.c @@ -38,6 +38,7 @@ #include "libvo/fastmemcpy.h" #define XMIN(a,b) ((a) < (b) ? (a) : (b)) +#define XMAX(a,b) ((a) > (b) ? (a) : (b)) typedef short DCTELEM; @@ -218,7 +219,7 @@ static void init_thres2(void){ for(qp=0; qp<99; qp++){ for(i=0; i<16; i++){ - thres2[qp][i]= ((i&1)?SN2:SN0) * ((i&4)?SN2:SN0) * qp * (1<<2) - 1 - bias; + thres2[qp][i]= ((i&1)?SN2:SN0) * ((i&4)?SN2:SN0) * XMAX(1,qp) * (1<<2) - 1 - bias; } } } |