static cvar_t cl_capturevideo_ogg_theora_keyframe_auto_threshold = {CVAR_SAVE, "cl_capturevideo_ogg_theora_keyframe_auto_threshold", "80", "threshold for key frame decision (0 to 100)"};
static cvar_t cl_capturevideo_ogg_theora_noise_sensitivity = {CVAR_SAVE, "cl_capturevideo_ogg_theora_noise_sensitivity", "1", "video noise sensitivity (0 to 6); lower is better"};
static cvar_t cl_capturevideo_ogg_theora_sharpness = {CVAR_SAVE, "cl_capturevideo_ogg_theora_sharpness", "0", "sharpness (0 to 2); lower is sharper"};
-static cvar_t cl_capturevideo_ogg_vorbis_quality = {CVAR_SAVE, "cl_capturevideo_ogg_vorbis_quality", "1", "audio quality (-1 to 10); higher is better"};
+static cvar_t cl_capturevideo_ogg_vorbis_quality = {CVAR_SAVE, "cl_capturevideo_ogg_vorbis_quality", "3", "audio quality (-1 to 10); higher is better"};
// ogg.h stuff
#ifdef _MSC_VER
{ 0, 1, -1, -1, -1, -1, -1, -1 }, // stereo
{ 0, 1, 2, -1, -1, -1, -1, -1 }, // L C R
{ 0, 1, 2, 3, -1, -1, -1, -1 }, // surround40
- { 0, 4, 1, 2, 3, -1, -1, -1 }, // FL FC FR RL RR
- { 0, 4, 1, 2, 3, 5, -1, -1 }, // surround51
- { 0, 4, 1, 2, 3, 5, 6, -1 }, // (not defined by vorbis spec)
- { 0, 4, 1, 2, 3, 5, 6, 7 } // surround71 (not defined by vorbis spec)
+ { 0, 2, 3, 4, 1, -1, -1, -1 }, // FL FC FR RL RR
+ { 0, 2, 3, 4, 1, 5, -1, -1 }, // surround51
+ { 0, 2, 3, 4, 1, 5, 6, -1 }, // (not defined by vorbis spec)
+ { 0, 2, 3, 4, 1, 5, 6, 7 } // surround71 (not defined by vorbis spec)
};
static void SCR_CaptureVideo_Ogg_SoundFrame(const portable_sampleframe_t *paintbuffer, size_t length)
format->yuv[i].uv_width = ti.width / 2;
format->yuv[i].uv_height = ti.height / 2;
format->yuv[i].uv_stride = ti.width / 2;
- format->yuv[i].y = Mem_Alloc(tempmempool, format->yuv[i].y_stride * format->yuv[i].y_height);
- format->yuv[i].u = Mem_Alloc(tempmempool, format->yuv[i].uv_stride * format->yuv[i].uv_height);
- format->yuv[i].v = Mem_Alloc(tempmempool, format->yuv[i].uv_stride * format->yuv[i].uv_height);
+ format->yuv[i].y = (unsigned char *) Mem_Alloc(tempmempool, format->yuv[i].y_stride * format->yuv[i].y_height);
+ format->yuv[i].u = (unsigned char *) Mem_Alloc(tempmempool, format->yuv[i].uv_stride * format->yuv[i].uv_height);
+ format->yuv[i].v = (unsigned char *) Mem_Alloc(tempmempool, format->yuv[i].uv_stride * format->yuv[i].uv_height);
}
format->yuvi = -1; // -1: no frame valid yet, write into 0
if(ti.quality < 0)
{
ti.target_bitrate = bound(45000, ti.target_bitrate, 2000000);
- ti.keyframe_data_target_bitrate = ti.target_bitrate * max(1, cl_capturevideo_ogg_theora_keyframe_bitrate_multiplier.value);
+ ti.keyframe_data_target_bitrate = (int) (ti.target_bitrate * max(1, cl_capturevideo_ogg_theora_keyframe_bitrate_multiplier.value));
ti.quality = -1;
}
else
{
ti.target_bitrate = bound(45000, ti.target_bitrate, 2000000);
- ti.keyframe_data_target_bitrate = ti.target_bitrate * max(1, cl_capturevideo_ogg_theora_keyframe_bitrate_multiplier.value);
+ ti.keyframe_data_target_bitrate = (int) (ti.target_bitrate * max(1, cl_capturevideo_ogg_theora_keyframe_bitrate_multiplier.value));
ti.quality = -1;
}
}