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. 7const int PREVIEW_FBO_WIDTH_SCALE = 2; 8const int PREVIEW_FBO_HEIGHT_SCALE = 1; 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. 14const float VIEWFINDER_PAN_FACTOR_HORZ = 0.3f; 15 16// What fraction of the screen viewport width has been allocated to show the 17// arrows on the direction of motion side. 18const float VIEWPORT_BORDER_FACTOR_HORZ = 0.1f; 19 20const int LR = 0; // Low-resolution mode 21const int HR = 1; // High-resolution mode 22const int NR = 2; // Number of resolution modes 23 24const int H2L_FACTOR = 4; // Can be 2 25 26extern "C" void AllocateTextureMemory(int widthHR, int heightHR, 27 int widthLR, int heightLR); 28extern "C" void FreeTextureMemory(); 29extern "C" void UpdateWarpTransformation(float *trs); 30 31extern unsigned char* gPreviewImage[NR]; 32extern int gPreviewImageWidth[NR]; 33extern int gPreviewImageHeight[NR]; 34 35extern sem_t gPreviewImage_semaphore; 36