[quake3-commits] r1893 - in trunk: . code/renderer
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Feb 10 16:18:31 EST 2011
Author: thilo
Date: 2011-02-10 16:18:31 -0500 (Thu, 10 Feb 2011)
New Revision: 1893
Modified:
trunk/README
trunk/code/renderer/tr_init.c
Log:
JPEG quality control patch, by Zack Middleton (#4673)
Modified: trunk/README
===================================================================
--- trunk/README 2011-02-10 19:58:20 UTC (rev 1892)
+++ trunk/README 2011-02-10 21:18:31 UTC (rev 1893)
@@ -209,6 +209,10 @@
backend being used
r_noborder - Remove window decoration from window
managers, like borders and titlebar.
+ r_screenshotJpegQuality - Controls quality of jpeg screenshots
+ captured using screenshotJPEG
+ r_aviMotionJpegQuality - Controls quality of video capture when
+ cl_aviMotionJpeg is enabled
New commands
video [filename] - start video capture (use with demo command)
Modified: trunk/code/renderer/tr_init.c
===================================================================
--- trunk/code/renderer/tr_init.c 2011-02-10 19:58:20 UTC (rev 1892)
+++ trunk/code/renderer/tr_init.c 2011-02-10 21:18:31 UTC (rev 1893)
@@ -156,6 +156,9 @@
cvar_t *r_marksOnTriangleMeshes;
+cvar_t *r_aviMotionJpegQuality;
+cvar_t *r_screenshotJpegQuality;
+
cvar_t *r_maxpolys;
int max_polys;
cvar_t *r_maxpolyverts;
@@ -405,7 +408,7 @@
}
ri.FS_WriteFile( fileName, buffer, 1 ); // create path
- SaveJPG( fileName, 90, glConfig.vidWidth, glConfig.vidHeight, buffer);
+ SaveJPG( fileName, r_screenshotJpegQuality->integer, glConfig.vidWidth, glConfig.vidHeight, buffer);
ri.Hunk_FreeTempMemory( buffer );
}
@@ -709,7 +712,7 @@
if( cmd->motionJpeg )
{
- frameSize = SaveJPGToBuffer( cmd->encodeBuffer, 90,
+ frameSize = SaveJPGToBuffer( cmd->encodeBuffer, r_aviMotionJpegQuality->integer,
cmd->width, cmd->height, cmd->captureBuffer );
ri.CL_WriteAVIVideoFrame( cmd->encodeBuffer, frameSize );
}
@@ -1012,6 +1015,9 @@
r_marksOnTriangleMeshes = ri.Cvar_Get("r_marksOnTriangleMeshes", "0", CVAR_ARCHIVE);
+ r_aviMotionJpegQuality = ri.Cvar_Get("r_aviMotionJpegQuality", "90", CVAR_ARCHIVE);
+ r_screenshotJpegQuality = ri.Cvar_Get("r_screenshotJpegQuality", "90", CVAR_ARCHIVE);
+
r_maxpolys = ri.Cvar_Get( "r_maxpolys", va("%d", MAX_POLYS), 0);
r_maxpolyverts = ri.Cvar_Get( "r_maxpolyverts", va("%d", MAX_POLYVERTS), 0);
More information about the quake3-commits
mailing list