Add prefilterWidth/Height
This commit is contained in:
parent
7548294333
commit
e4d5da97c0
|
@ -30,6 +30,8 @@ public:
|
||||||
|
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
|
int prefilterWidth;
|
||||||
|
int prefilterHeight;
|
||||||
|
|
||||||
int rotation;
|
int rotation;
|
||||||
int rotation_userset;
|
int rotation_userset;
|
||||||
|
@ -59,6 +61,8 @@ public:
|
||||||
|
|
||||||
this->prescaleHD = prescaleHD;
|
this->prescaleHD = prescaleHD;
|
||||||
this->prescalePost = prescalePost;
|
this->prescalePost = prescalePost;
|
||||||
|
prefilterWidth = 256 * prescaleHD;
|
||||||
|
prefilterHeight = 192 * 2 * prescaleHD;
|
||||||
|
|
||||||
prescaleTotal = prescaleHD;
|
prescaleTotal = prescaleHD;
|
||||||
|
|
||||||
|
@ -74,8 +78,8 @@ public:
|
||||||
const int kPadSize = 4;
|
const int kPadSize = 4;
|
||||||
|
|
||||||
// raw buffer
|
// raw buffer
|
||||||
size_t rawBufferWidth = 256 * prescaleHD + (kPadSize * 2);
|
size_t rawBufferWidth = prefilterWidth + (kPadSize * 2);
|
||||||
size_t rawBufferHeight = 192 * 2 * prescaleHD + (kPadSize * 2);
|
size_t rawBufferHeight = prefilterHeight + (kPadSize * 2);
|
||||||
rawBufferSize = rawBufferWidth * rawBufferHeight * 4;
|
rawBufferSize = rawBufferWidth * rawBufferHeight * 4;
|
||||||
buffer_raw = buffer = (u32*)malloc_alignedCacheLine(rawBufferSize);
|
buffer_raw = buffer = (u32*)malloc_alignedCacheLine(rawBufferSize);
|
||||||
|
|
||||||
|
@ -134,8 +138,6 @@ public:
|
||||||
|
|
||||||
void reset() {
|
void reset() {
|
||||||
SetPrescale(1, 1); //should i do this here?
|
SetPrescale(1, 1); //should i do this here?
|
||||||
width = 256;
|
|
||||||
height = 384;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setfilter(int filter) {
|
void setfilter(int filter) {
|
||||||
|
@ -148,42 +150,40 @@ public:
|
||||||
switch (filter) {
|
switch (filter) {
|
||||||
|
|
||||||
case NONE:
|
case NONE:
|
||||||
width = 256;
|
width = prefilterWidth;
|
||||||
height = 384;
|
height = prefilterHeight;
|
||||||
break;
|
break;
|
||||||
case EPX1POINT5:
|
case EPX1POINT5:
|
||||||
case EPXPLUS1POINT5:
|
case EPXPLUS1POINT5:
|
||||||
case NEAREST1POINT5:
|
case NEAREST1POINT5:
|
||||||
case NEARESTPLUS1POINT5:
|
case NEARESTPLUS1POINT5:
|
||||||
width = 256 * 3 / 2;
|
width = prefilterWidth * 3 / 2;
|
||||||
height = 384 * 3 / 2;
|
height = prefilterHeight * 3 / 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case _5XBRZ:
|
case _5XBRZ:
|
||||||
width = 256 * 5;
|
width = prefilterWidth * 5;
|
||||||
height = 384 * 5;
|
height = prefilterHeight * 5;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HQ4X:
|
case HQ4X:
|
||||||
case _4XBRZ:
|
case _4XBRZ:
|
||||||
width = 256 * 4;
|
width = prefilterWidth * 4;
|
||||||
height = 384 * 4;
|
height = prefilterHeight * 4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case _3XBRZ:
|
case _3XBRZ:
|
||||||
width = 256 * 3;
|
width = prefilterWidth * 3;
|
||||||
height = 384 * 3;
|
height = prefilterHeight * 3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case _2XBRZ:
|
case _2XBRZ:
|
||||||
default:
|
default:
|
||||||
width = 256 * 2;
|
width = prefilterWidth * 2;
|
||||||
height = 384 * 2;
|
height = prefilterHeight * 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
width *= prescaleHD;
|
|
||||||
height *= prescaleHD;
|
|
||||||
ResizeBuffers();
|
ResizeBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue