mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 11:24:05 +00:00
Resolve remaining Visual Studio warnings.
- Ignore most of them and fix the ones that can't be ignored.
This commit is contained in:
parent
721002c10a
commit
9a23ae3d92
|
@ -14,7 +14,7 @@
|
|||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>KVZ_DLL_EXPORTS;KVZ_COMPILE_ASM;WIN32_LEAN_AND_MEAN;WIN32;WIN64;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)..\..\pthreads.2\include;$(SolutionDir)..\src;$(SolutionDir)..\src\extras;$(SolutionDir)..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4244;4204;4206;4028;4152</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4244;4204;4206;4028;4152;4996;4018;4456;4389;4100;4131;4459</DisableSpecificWarnings>
|
||||
<OpenMPSupport>false</OpenMPSupport>
|
||||
<TreatSpecificWarningsAsErrors>4013;4029;4047;4716;4700;4020;4021;4133</TreatSpecificWarningsAsErrors>
|
||||
</ClCompile>
|
||||
|
|
|
@ -95,10 +95,10 @@ extern int g_ckpt_record; //Do we record?
|
|||
#endif
|
||||
|
||||
#if !defined(CHECKPOINTS)
|
||||
#define CHECKPOINTS_INIT() do {} while (0)
|
||||
#define CHECKPOINTS_FINALIZE() do {} while (0)
|
||||
#define CHECKPOINT_MARK(str, ...) do {} while (0)
|
||||
#define CHECKPOINT(str, ...) do {} while (0)
|
||||
#define CHECKPOINTS_INIT()
|
||||
#define CHECKPOINTS_FINALIZE()
|
||||
#define CHECKPOINT_MARK(str, ...)
|
||||
#define CHECKPOINT(str, ...)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ static double search_intra_trdepth(encoder_state_t * const state,
|
|||
kvz_pixel u[TR_MAX_WIDTH*TR_MAX_WIDTH];
|
||||
kvz_pixel v[TR_MAX_WIDTH*TR_MAX_WIDTH];
|
||||
} nosplit_pixels;
|
||||
cu_cbf_t nosplit_cbf;
|
||||
cu_cbf_t nosplit_cbf = { .y = 0, .u = 0, .v = 0 };
|
||||
|
||||
double split_cost = INT32_MAX;
|
||||
double nosplit_cost = INT32_MAX;
|
||||
|
@ -516,7 +516,6 @@ static int8_t search_intra_rdo(encoder_state_t * const state,
|
|||
const int tr_depth = CLIP(1, MAX_PU_DEPTH, depth + state->encoder_control->tr_depth_intra);
|
||||
const int width = LCU_WIDTH >> depth;
|
||||
|
||||
kvz_pixel pred[LCU_WIDTH * LCU_WIDTH + 1];
|
||||
kvz_pixel orig_block[LCU_WIDTH * LCU_WIDTH + 1];
|
||||
int rdo_mode;
|
||||
int pred_mode;
|
||||
|
@ -559,8 +558,8 @@ static int8_t search_intra_rdo(encoder_state_t * const state,
|
|||
for(rdo_mode = 0; rdo_mode < modes_to_check; rdo_mode ++) {
|
||||
int rdo_bitcost = kvz_luma_mode_bits(state, modes[rdo_mode], intra_preds);
|
||||
costs[rdo_mode] = rdo_bitcost * (int)(state->global->cur_lambda_cost + 0.5);
|
||||
|
||||
if (0 && width != 4 && tr_depth == depth) {
|
||||
#if 0
|
||||
if (width != 4 && tr_depth == depth) {
|
||||
// This code path has been disabled for now because it increases bdrate
|
||||
// by 1-2 %. Possibly due to not taking chroma into account during luma
|
||||
// mode search. Enabling separate chroma search compensates a little,
|
||||
|
@ -571,7 +570,9 @@ static int8_t search_intra_rdo(encoder_state_t * const state,
|
|||
// where transform split or transform skip don't need to be handled.
|
||||
kvz_intra_get_pred(state->encoder_control, rec, recf, recstride, pred, width, modes[rdo_mode], 0);
|
||||
costs[rdo_mode] += kvz_rdo_cost_intra(state, pred, orig_block, width, modes[rdo_mode], width == 4 ? 1 : 0);
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
// Perform transform split search and save mode RD cost for the best one.
|
||||
cu_info_t pred_cu;
|
||||
pred_cu.depth = depth;
|
||||
|
|
|
@ -42,9 +42,9 @@ static void array_checksum_generic(const kvz_pixel* data,
|
|||
for (x = 0; x < width; ++x) {
|
||||
const uint8_t mask = (uint8_t)((x & 0xff) ^ (y & 0xff) ^ (x >> 8) ^ (y >> 8));
|
||||
checksum += (data[(y * stride) + x] & 0xff) ^ mask;
|
||||
if(bitdepth > 8) {
|
||||
checksum += ((data[(y * stride) + x]>>8) & 0xff) ^ mask;
|
||||
}
|
||||
#if KVZ_BIT_DEPTH > 8
|
||||
checksum += ((data[(y * stride) + x] >> 8) & 0xff) ^ mask;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -124,8 +124,8 @@ int threadqueue_log(threadqueue_queue_t * threadqueue, const CLOCK_T *start, con
|
|||
#define PERFORMANCE_MEASURE_END(mask, threadqueue, str, ...) do {if (_DEBUG & mask) { GET_TIME(&stop); {char job_description[256]; sprintf(job_description, (str), __VA_ARGS__); threadqueue_log((threadqueue), &start, &stop, job_description);}}} while (0) \
|
||||
|
||||
#else
|
||||
#define PERFORMANCE_MEASURE_START(mask) do {} while (0)
|
||||
#define PERFORMANCE_MEASURE_END(mask, threadqueue, str, ...) do {} while (0)
|
||||
#define PERFORMANCE_MEASURE_START(mask)
|
||||
#define PERFORMANCE_MEASURE_END(mask, threadqueue, str, ...)
|
||||
#endif
|
||||
|
||||
/* Constraints:
|
||||
|
|
|
@ -155,10 +155,10 @@ int yuv_io_seek(FILE* file, unsigned frames,
|
|||
unsigned input_width, unsigned input_height)
|
||||
{
|
||||
const size_t frame_bytes = input_width * input_height * 3 / 2;
|
||||
const size_t skip_bytes = frames * frame_bytes;
|
||||
const int64_t skip_bytes = (int64_t)(frames * frame_bytes);
|
||||
|
||||
// Attempt to seek normally.
|
||||
int error = fseek(file, skip_bytes, SEEK_CUR);
|
||||
size_t error = fseek(file, skip_bytes, SEEK_CUR);
|
||||
if (!error) return 1;
|
||||
|
||||
// Seek failed. Skip data by reading.
|
||||
|
|
Loading…
Reference in a new issue