Commit fc83326e authored by Milan Jaros's avatar Milan Jaros
Browse files

add new env varable for resolution and compressions

parent 49624182
......@@ -9,8 +9,16 @@ export KERNEL_CUDA_CUBIN=${ROOT_DIR}/build/vrclient_gcc/cycles_cuda/kernel_sm_%c
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH
export CLIENT_FILE_KERNEL_GLOBAL=$ROOT_DIR/src/blender-vr-interactive/client/data/box_gpu.kg
export CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES:-0,1,2,3,4,5,6,7}
export DEBUG_RES_W=3840
export DEBUG_RES_H=2160
#rendering of 400 rows
export CLIENT_TILES="0;100;100;100;200;100;300;100"
export LIBUG_COMPRESSION="UG_UNCOMPRESSED"
#export LIBUG_COMPRESSION="UG_JPEG"
#TX
#export SOCKET_SERVER_PORT_DATA=5006
#RX
......
......@@ -291,6 +291,13 @@ void cesnet_set_camera_data(cyclesphi::cyclesphi_data *cdata)
// g_cdata.width = 5120 / 2;
// g_cdata.height = 1440; //2116x1203
const char* env_res_w = getenv("DEBUG_RES_W");
const char* env_res_h = getenv("DEBUG_RES_H");
if (env_res_w != NULL && env_res_h != NULL) {
g_cdata.width = atoi(env_res_w);
g_cdata.height = atoi(env_res_h);
}
#ifndef RENDER_PACKET_FROM_FILE
g_cdata.cam.transform_inverse_view_matrix[0] = -0.437973917;
g_cdata.cam.transform_inverse_view_matrix[1] = -0.267504632;
......@@ -367,6 +374,16 @@ void cesnet_set_camera_data(cyclesphi::cyclesphi_data *cdata)
g_init_params.rx_port = atoi(env_p_port_cam);
g_init_params.compression = UG_UNCOMPRESSED; //UG_JPEG
const char* env_libug_comp = getenv("LIBUG_COMPRESSION");
if (env_libug_comp != NULL) {
if (!strcmp(env_libug_comp, "UG_UNCOMPRESSED")) {
g_init_params.compression = UG_UNCOMPRESSED;
}
if (!strcmp(env_libug_comp, "UG_JPEG")) {
g_init_params.compression = UG_JPEG;
}
}
g_init_params.rprc = render_packet_received_callback;
g_init_params.rprc_udata = NULL; // not used by render_packet_received_callback()
......@@ -526,7 +543,7 @@ int cesnet_set_render_buffer_rgba(unsigned char* rgba, int width, int height)
#ifdef WITH_CLIENT_ULTRAGRID_LIB
//printf("ug_send_frame: %d x %d\n", width, height);
ug_send_frame(g_ug_sender, rgba, UG_RGBA, width, height);
ug_send_frame(g_ug_sender, (char*)rgba, UG_RGBA, width, height);
return 0;
#endif
......@@ -534,7 +551,7 @@ int cesnet_set_render_buffer_rgba(unsigned char* rgba, int width, int height)
if (cesnet_shm == (struct cesnet_shm *) PLATFORM_IPC_ERR) {
if (!initialize_shm(&shm_id, &cesnet_shm, sem, &post_should_exit)) {
done_shm(&shm_id, &cesnet_shm, sem, &post_should_exit);
return;
return -1;
}
if (!shm_cleanup_registered_atexit) {
atexit(shm_cleanup);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment