Sascha Haeberling | 8bddf8c | 2013-08-14 11:20:34 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | #include <semaphore.h> |
| 3 | |
| 4 | // The Preview FBO dimensions are determined from the high-res |
| 5 | // frame dimensions (gPreviewImageWidth, gPreviewImageHeight) |
| 6 | // using the scale factors below. |
Angus Kong | b998a49 | 2013-09-25 11:34:08 -0700 | [diff] [blame] | 7 | const int PREVIEW_FBO_WIDTH_SCALE = 4; |
Sascha Haeberling | 8bddf8c | 2013-08-14 11:20:34 -0700 | [diff] [blame] | 8 | const int PREVIEW_FBO_HEIGHT_SCALE = 2; |
| 9 | |
| 10 | // The factor below determines the (horizontal) speed at which the viewfinder |
| 11 | // will pan across the UI during capture. A value of 0.0 will keep the viewfinder |
| 12 | // static in the center of the screen and 1.0f will make it pan at the |
| 13 | // same speed as the device. |
| 14 | const float VIEWFINDER_PAN_FACTOR_HORZ = 0.0f; |
| 15 | |
| 16 | // What fraction of the screen viewport width has been allocated to show the |
| 17 | // arrows on the direction of motion side. |
| 18 | const float VIEWPORT_BORDER_FACTOR_HORZ = 0.1f; |
| 19 | |
| 20 | const int LR = 0; // Low-resolution mode |
| 21 | const int HR = 1; // High-resolution mode |
| 22 | const int NR = 2; // Number of resolution modes |
| 23 | |
| 24 | const int H2L_FACTOR = 4; // Can be 2 |
| 25 | |
| 26 | extern "C" void AllocateTextureMemory(int widthHR, int heightHR, |
| 27 | int widthLR, int heightLR); |
| 28 | extern "C" void FreeTextureMemory(); |
| 29 | extern "C" void UpdateWarpTransformation(float *trs); |
| 30 | |
| 31 | extern unsigned char* gPreviewImage[NR]; |
| 32 | extern int gPreviewImageWidth[NR]; |
| 33 | extern int gPreviewImageHeight[NR]; |
| 34 | |
| 35 | extern sem_t gPreviewImage_semaphore; |