[xiph-commits] r15383 - trunk/theora/lib/enc
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Fri Oct 10 07:33:47 PDT 2008
Author: xiphmont
Date: 2008-10-10 07:33:46 -0700 (Fri, 10 Oct 2008)
New Revision: 15383
Modified:
trunk/theora/lib/enc/encode.c
trunk/theora/lib/enc/encoder_toplevel.c
Log:
Modification of Claus's patch to add const and eliminate a few warnings on VC++
Modified: trunk/theora/lib/enc/encode.c
===================================================================
--- trunk/theora/lib/enc/encode.c 2008-10-10 13:47:25 UTC (rev 15382)
+++ trunk/theora/lib/enc/encode.c 2008-10-10 14:33:46 UTC (rev 15383)
@@ -271,7 +271,7 @@
static void PackModes (CP_INSTANCE *cpi) {
ogg_uint32_t i,j;
unsigned char ModeIndex;
- unsigned char *SchemeList;
+ const unsigned char *SchemeList;
unsigned char BestModeSchemes[MAX_MODES];
ogg_int32_t ModeCount[MAX_MODES];
@@ -373,8 +373,8 @@
static void PackMotionVectors (CP_INSTANCE *cpi) {
ogg_int32_t i;
ogg_uint32_t MethodBits[2] = {0,0};
- ogg_uint32_t * MvBitsPtr;
- ogg_uint32_t * MvPatternPtr;
+ const ogg_uint32_t * MvBitsPtr;
+ const ogg_uint32_t * MvPatternPtr;
oggpack_buffer *opb=cpi->oggbuffer;
Modified: trunk/theora/lib/enc/encoder_toplevel.c
===================================================================
--- trunk/theora/lib/enc/encoder_toplevel.c 2008-10-10 13:47:25 UTC (rev 15382)
+++ trunk/theora/lib/enc/encoder_toplevel.c 2008-10-10 14:33:46 UTC (rev 15383)
@@ -1388,8 +1388,10 @@
return TH_EINVAL;
}
- if(buf==NULL)buf=&TH_VP31_QUANT_INFO;
- memcpy(&pbi->quant_info, buf, sizeof(th_quant_info));
+ if(buf==NULL)
+ memcpy(&pbi->quant_info, &TH_VP31_QUANT_INFO, sizeof(th_quant_info));
+ else
+ memcpy(&pbi->quant_info, buf, sizeof(th_quant_info));
InitQTables(pbi);
return 0;
More information about the commits
mailing list