亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? coder_bpb.c

?? 用C++語(yǔ)言實(shí)現(xiàn)的基于小波分析的源代碼,實(shí)現(xiàn)了小波分析的諸多算法
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):

//#define ADD_CUR_WEIGHTS	// hurts !?
//#define LOCAL_LENS		// hurts
#define SCALEDOWN_LENS
#define SCALEDOWN_SHIFT	0	// makes len* the very previous!

//#define LOG

#define FIFTH_SHAPE		// helps a peetle
//#define XX_SHAPES		// hurts a tad
//#define NO_XX			// X3 and X4 help an awful lot
#define BIG_SHAPE_CNTX	// helps 0.006
// #define BIG_SIGN_CONTEXT // hurts a teeny

/*****

	these are the weights for combining the various
	moments to make an estimate	of the local activity

context = ((CA * VD + CB * P + CC * N + CD * W + CE * NW + CF * NE + CG * X1 + CH * X2 + CI * X3 + CJ * X4)>>8)

<>	these need to be trained on a test set	(not trivial)

	and very important ! little random changes make 0.01 bpp diff

******/

#define C1A 64
#define C1B 64
#define C1C 64
#define C1D 64
#define C1E 64
#define C1F 64
#define C1G 64
#define C1H 64
#define C1I 64
#define C1J 64

#define C2A 33
#define C2B 33
#define C2C 33
#define C2D 33
#define C2E 33
#define C2F 33
#define C2G 33
#define C2H 33
#define C2I 33
#define C2J 33

#define C3A 300
#define C3B 170
#define C3C 40
#define C3D 40
#define C3E 40
#define C3F 40
#define C3G 20
#define C3H 20
#define C3I 0
#define C3J 0

#define C4A 64
#define C4B 32
#define C4C 64
#define C4D 64
#define C4E 64
#define C4F 64
#define C4G 32
#define C4H 32
#define C4I 32
#define C4J 32

/*****

binary version : codes each bit-pel as a separate binary event

coding signs helps about 0.03 (better than the 0.02 observed
	in earlier more primitive sign coders)

our LOE :
	don't actually compare the four contexts' MPS's, but just the four coders'
	recent performance: choose the coder that had the lowest entropy on the
	last N pixels. (some decaying record).

instead of LOE, blend them based on confidence
		(this is unusually easy because of the fact that
		the alphabet is binary)
	something like P_tot = W_tot * Sum P[n] / w[n]

	where w is the weight = actual recent coded len
		(TMW uses 2^(-w) instead of 1/w )
		(that may actually be better cuz we can do it with shifts;
		you need some subtlety : find the smallest weight and factor it out first)

* we're very similar to ECECOW, but getting stomped. 
  he beats us by almost 1.0 PSNR at the same bitrate

---

e512 lossless, l6

	lena : 4.141	(ececow : 4.06)
	barb : 4.468	(ececow : 4.34)

*****/

#include <stdio.h>
#include <stdlib.h>
#include <crblib/inc.h>
#include <crblib/arithc.h>
#include <crblib/intmath.h>
#include "coder.h"
#include "subbands.h"

extern int tune_param;

#define	VAL_CONTEXTS		20
#define	VAL_CONTEXT_MAX		(VAL_CONTEXTS -1)
#define SHAPE_BASE			VAL_CONTEXTS
#define SHAPE(x)			(SHAPE_BASE<<(x))

#ifdef BIG_SHAPE_CNTX
#define NUM_SHAPES			5
#else
#define NUM_SHAPES			2
#endif

#define NUM_CONTEXTS		(VAL_CONTEXTS<<NUM_SHAPES)

#ifdef BIG_SIGN_CONTEXT
#define SIGN_CONTEXTS	729	// 3^6
#else
#define SIGN_CONTEXTS	81	// 3^4
#endif // BIG_SIGN_CONTEXT

#define TOTMAX			4000
#define INC				30

#define P0_INIT			8
#define P1_INIT			0

#define bitModel(bit,P0,PT)	do { PT += INC; if (!(bit)) P0 += INC;  if ( PT > TOTMAX ) { PT >>= 1; P0 >>= 1; P0++; PT += 2; } } while(0)
#define bitEnc(bit,ari,P0,PT)	do { arithEncBit(ari,P0,PT,bit);	bitModel(bit,P0,PT); } while(0)
#define bitDec(bit,ari,P0,PT)	do { bit = arithDecBit(ari,P0,PT);	bitModel(bit,P0,PT); } while(0)

#define AddSignContext(context,val,mask) do { context *= 3; if( abs(val)&(mask) ) { if ( (val) > 0 ) context ++; else context += 2; } } while(0)

#ifdef LOG
int nbest1=0,nbest2=0,nbest3=0,nbest4=0;
#endif

typedef struct {
	int p0,pt;
} binContext;

void coderBPbin_encodeSubbandBP(coder *me,subband_leaf *sb,int);
void coderBPbin_decodeSubbandBP(coder *me,subband_leaf *sb,int);

typedef struct {
	binContext signs[SIGN_CONTEXTS];
	binContext	stats1[NUM_CONTEXTS],
				stats2[NUM_CONTEXTS],
				stats3[NUM_CONTEXTS],
				stats4[NUM_CONTEXTS];
} myInfo;

void coderBPbin_init(coder *c)
{
myInfo *d;
int i;

	if ( (d = new(myInfo)) == NULL )
		errexit("ozero init failed");

	c->data = d;

	for(i=0;i<NUM_CONTEXTS;i++) {
		d->stats1[i].p0 = P0_INIT+1; d->stats1[i].pt = 2+P0_INIT+P1_INIT;
		d->stats2[i].p0 = P0_INIT+1; d->stats2[i].pt = 2+P0_INIT+P1_INIT;
		d->stats3[i].p0 = P0_INIT+1; d->stats3[i].pt = 2+P0_INIT+P1_INIT;
		d->stats4[i].p0 = P0_INIT+1; d->stats4[i].pt = 2+P0_INIT+P1_INIT;
	}

	for(i=0;i<SIGN_CONTEXTS;i++) {
		d->signs[i].p0 = 1;
		d->signs[i].pt = 2;
	}

}

void coderBPbin_free(coder *c)
{
	if ( c->data ) {
		myInfo *d;
		d = c->data;
		free(d);
		c->data = NULL;
	}
}

coder coderBPbin = {
		"BitPlane Binary",
		coderBPbin_init,
		coderBPbin_free,
		NULL,NULL,NULL,NULL,NULL,NULL,
		coderBPbin_encodeSubbandBP,
		coderBPbin_decodeSubbandBP
	};

/**********

lazy way to pass the state from getStats to fixStats
	and also interacts with the codeBand()

these are re-initialized at each codeBand() call, so this is
	quite re-entrant as long as we aren't multi-threaded
	(that is, no more than one call to codeBand() at a time)

*********/

static int VD;
static binContext *stats1,*stats2,*stats3,*stats4;
static binContext *s1,*s2,*s3,*s4;
static int len1,len2,len3,len4;
static int *sister_x,*sister_y,sister_trans,*parent,parent_step,parent_mask,parent_shift;
static int p0,pt,donemask,nextmask;

int intentropy(int p0,int pt)
{
return ((p0*(log2x16(pt) - log2x16(p0)) + (pt-p0)*(log2x16(pt) - log2x16(pt-p0)))<<3)/pt;
}
int LOEweight(int p0,int pt)
{
if ( (pt - p0) < p0 ) p0 = (pt - p0);
return log2x16(pt) - log2x16(p0);
}

static void getStats(int *dp,int *pp,int x,int y,int width,int height,int fullw)
{
int shapes;
int P,N,S,E,W,NE,NW,X1,X2,X3,X4;
int diff,lena,lenb;
binContext *sa,*sb;

	/*** elaborate context-making ***/

	VD	= abs(*dp)&donemask;	// current val already done

	P	= abs(*pp)&nextmask;

	if ( y == 0 ) {
		N = NW = NE = VD;
		if ( x == 0 ) W = VD; else W = abs(dp[-1]) & nextmask;
	} else if ( x == 0 ) {
		W = NW = 0;
		N  = abs(dp[-fullw])	& nextmask;
		NE = abs(dp[1-fullw])	& nextmask;
	} else {
		N = abs(dp[-fullw])		& nextmask;
		W = abs(dp[-1])			& nextmask;
		NW = abs(dp[-1-fullw])	& nextmask;
		if ( x == (width-1) ) NE = VD;
		else NE = abs(dp[1-fullw]) & nextmask;
	}

	if ( y < (height-1) ) S = abs(dp[fullw]) & donemask; else S = VD;
	if ( x < (width-1) ) E = abs(dp[1])	& donemask;	else E = VD;

	if ( sister_x ) {
			X1 = S; X2 = E;
		switch(sister_trans) {
			case 0:
				X3 = abs( sister_x[ x + fullw*y ] ) & nextmask;
				X4 = abs( sister_y[ x + fullw*y ] ) & nextmask;
				break;
			case 1:
				X3 = abs( sister_x[ y + fullw*x ] ) & nextmask;
				X4 = abs( sister_y[ x + fullw*y ] ) & nextmask;
				break;
			case 2:

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆精品一区二区三区| 91香蕉视频污在线| 亚洲综合色网站| 精品国产伦理网| 不卡视频在线看| 久久精品久久精品| 一区二区国产盗摄色噜噜| 日韩欧美国产一二三区| 91美女视频网站| 国产精品123| 麻豆精品在线视频| 亚洲综合激情另类小说区| 国产欧美一区二区三区在线老狼| 欧美绝品在线观看成人午夜影视| 不卡一区中文字幕| 国产美女娇喘av呻吟久久| 亚洲图片欧美一区| 亚洲人成网站在线| 国产欧美日韩另类一区| 日韩精品中文字幕一区二区三区| 在线观看亚洲专区| 91亚洲大成网污www| 国产91精品一区二区| 韩国成人精品a∨在线观看| 天天综合天天做天天综合| 亚洲精品视频在线| 亚洲人吸女人奶水| 国产精品视频一二三区| 久久久久久久久久电影| 日韩欧美在线影院| 91精品国产色综合久久| 在线观看视频一区二区欧美日韩| 99久久免费精品高清特色大片| 国产精品羞羞答答xxdd| 精品亚洲国内自在自线福利| 麻豆久久一区二区| 麻豆成人久久精品二区三区红| 日韩有码一区二区三区| 亚洲国产日日夜夜| 午夜精品123| 午夜不卡av免费| 日日骚欧美日韩| 日日骚欧美日韩| 美女一区二区在线观看| 麻豆久久久久久| 国产一区二区网址| 国产高清精品在线| www.久久精品| 色域天天综合网| 欧美体内she精高潮| 欧美色图12p| 欧美一区二区三区公司| 日韩视频免费观看高清完整版| 日韩女优av电影| 久久综合久色欧美综合狠狠| 久久久久久久久蜜桃| 国产欧美日本一区视频| 中文字幕在线一区| 亚洲在线中文字幕| 日本91福利区| 国产一区在线精品| jlzzjlzz国产精品久久| 在线观看日韩高清av| 欧美日韩成人一区二区| 日韩欧美一二区| 国产亚洲人成网站| 亚洲老妇xxxxxx| 手机精品视频在线观看| 国内精品久久久久影院薰衣草 | 美女一区二区视频| 国内精品久久久久影院色| 岛国精品在线播放| 91国内精品野花午夜精品| 欧美男同性恋视频网站| 欧美大片在线观看| 国产精品久久久99| 天天综合天天做天天综合| 一本大道久久a久久综合| 在线电影院国产精品| 26uuu国产电影一区二区| 中文字幕在线不卡视频| 视频在线观看一区二区三区| 国产精品一区二区在线播放| 91久色porny | 波多野结衣亚洲| 欧美影片第一页| 久久亚洲综合av| 亚洲三级免费观看| 久久国产三级精品| 色一情一伦一子一伦一区| 日韩欧美不卡一区| 亚洲你懂的在线视频| 久久97超碰色| 欧美在线观看一区二区| 久久精品亚洲麻豆av一区二区| 亚洲激情中文1区| 国产精品一区不卡| 欧美精品一卡两卡| 18欧美亚洲精品| 精品一区二区日韩| 欧美日韩视频第一区| 国产精品久久久久久妇女6080 | 奇米四色…亚洲| www.亚洲色图.com| 久久―日本道色综合久久| 亚洲综合一区二区三区| 懂色av一区二区三区免费看| 欧美日韩一级二级三级| 综合激情成人伊人| 国产乱码精品一区二区三区五月婷 | 不卡一二三区首页| 久久亚洲综合色一区二区三区| 五月婷婷激情综合网| 99视频一区二区三区| 久久综合狠狠综合久久综合88| 午夜久久久久久电影| 色呦呦一区二区三区| 中文字幕巨乱亚洲| 国产在线精品国自产拍免费| 91精品黄色片免费大全| 亚洲一区在线视频| 97久久久精品综合88久久| 欧美国产97人人爽人人喊| 久久99久久久久久久久久久| 在线不卡免费欧美| 亚洲高清在线视频| 欧美日韩一区二区电影| 亚洲精品视频一区二区| 97精品视频在线观看自产线路二| 久久男人中文字幕资源站| 免费观看91视频大全| 在线播放中文一区| 婷婷国产在线综合| 欧美精品一二三| 日韩电影免费一区| 91精品国产综合久久蜜臀| 亚洲777理论| 欧美久久久久久久久久| 亚洲成av人片在线观看无码| 精品视频一区二区三区免费| 亚洲国产综合人成综合网站| 在线亚洲精品福利网址导航| 一区二区三区四区不卡视频| 在线精品视频免费观看| 亚洲成a人片在线不卡一二三区| 欧美亚日韩国产aⅴ精品中极品| 亚洲一区二区精品视频| 欧美日韩成人一区| 蜜桃免费网站一区二区三区| 欧美成人精品福利| 国产高清精品在线| 中文字幕一区二区三区在线播放 | 亚洲欧洲国产专区| 色系网站成人免费| 午夜欧美2019年伦理| 日韩视频在线一区二区| 国产精品一区在线观看你懂的| 国产欧美日韩视频一区二区| 色综合一个色综合亚洲| 亚洲福利一二三区| 日韩欧美国产精品一区| 国产成人午夜电影网| 国产精品久久久久精k8| 欧美日韩一区久久| 麻豆精品视频在线观看| 国产日韩欧美麻豆| 91久久香蕉国产日韩欧美9色| 亚洲成人自拍偷拍| 久久影院电视剧免费观看| 不卡的av中国片| 爽好久久久欧美精品| 久久久精品国产免大香伊| 91免费国产视频网站| 日日摸夜夜添夜夜添国产精品| 久久精品视频在线看| 色哟哟国产精品| 久久99国产精品麻豆| 亚洲人成在线播放网站岛国| 91麻豆精品国产无毒不卡在线观看| 国产尤物一区二区| 一区二区欧美国产| 亚洲精品一区二区三区影院| 色婷婷av一区| 激情综合色播激情啊| 一区二区在线观看av| 久久一区二区三区四区| 在线亚洲人成电影网站色www| 精品一区二区免费看| 一区二区三区精品视频在线| 久久综合999| 在线播放视频一区| 99re热视频精品| 国内久久婷婷综合| 亚洲国产精品久久不卡毛片| 欧美成人性战久久| 欧美日本国产视频| 99国内精品久久| 国产又粗又猛又爽又黄91精品| 亚洲va韩国va欧美va| 亚洲欧洲日韩在线|