diff options
Diffstat (limited to 'glitcher')
| -rw-r--r-- | glitcher/src/audioGlitcher.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/glitcher/src/audioGlitcher.h b/glitcher/src/audioGlitcher.h index 8d70411..33f86d3 100644 --- a/glitcher/src/audioGlitcher.h +++ b/glitcher/src/audioGlitcher.h @@ -22,10 +22,10 @@ class audioGlitcher { samples=s; origin_x=origin_y=0.5f; trans_x=trans_y=0.0f; - scale=0.9f; + scale=1.0f; rotation=0.0f; interp_x=16; - interp_y=9; + interp_y=12; } void set_interp(int ix,int iy){ interp_x=ix; @@ -57,7 +57,6 @@ class audioGlitcher { cv::Mat srcX(interp_x,interp_y,CV_32FC1); cv::Mat srcY(interp_x,interp_y,CV_32FC1); -<<<<<<< HEAD //for a sanity check //512-1 / 16-1 = 34.066666667 //* 15= @@ -67,8 +66,6 @@ class audioGlitcher { float* dx = (float*)dstX.data; float* dy = (float*)dstY.data; -======= ->>>>>>> caa1426e767efdba526c1d2df0b61aafbd6fcca7 float xFactor=(renderFBO.getWidth()-1)/(srcX.cols-1); float yFactor=(renderFBO.getHeight()-1)/(srcX.rows-1); for (int i=0;i<srcX.cols;i++){ @@ -92,11 +89,7 @@ class audioGlitcher { //transform the low res matrix float tX=trans_x; //-.05; //fraction of image -<<<<<<< HEAD float tY=trans_y; //-.08; //fraction of image -======= - float tY=trans_y; //-.04; //fraction of image ->>>>>>> caa1426e767efdba526c1d2df0b61aafbd6fcca7 float oX=origin_x; //fraction of image float oY=origin_y; //fraction of image float s=scale; @@ -152,8 +145,8 @@ class audioGlitcher { for (int i=0;i<srcX.cols;i++){ for (int j=0;j<srcX.rows;j++){ - dx[i,j]=i*xFactor; - dy[i,j]=j*yFactor; + //dx[i,j]=i*xFactor; + //dy[i,j]=j*yFactor; } } @@ -169,13 +162,20 @@ class audioGlitcher { float* psx = (float*)scaledstX.data; float* psy = (float*)scaledstY.data; + //at the moment the midway between <7,5> and <8,6> + // is coming out at 255.5,191.5 in the source - + //think that should b2 255,192 + + cerr<<"src: <0,0> "<<sx[0]<<","<<sy[0]<<endl; cerr<<"src: <7,5> "<<sx[5*16+7]<<","<<sy[5*16+7]<<endl; cerr<<"src: <8,6> "<<sx[6*16+8]<<","<<sy[6*16+8]<<endl; cerr<<"src: <15,11> "<<sx[11*16+15]<<","<<sy[11*16+15]<<endl; cerr<<"dest: <7,5> "<<dx[5*16+7]<<","<<dy[5*16+7]<<endl; cerr<<"dest: <8,6> "<<dx[6*16+8]<<","<<dy[6*16+8]<<endl; + cerr<<"Map at <0,0> "<<psx[0]<<","<<psy[0]<<endl; cerr<<"Map at <256,192> "<<psx[192*512+256]<<","<<psy[192*512+256]<<endl; + cerr<<"Map at <511,383> "<<psx[383*512+511]<<","<<psy[383*512+511]<<endl; cv::Mat buf = buffer.getCvImage(); cv::Mat dstbuf; |
