Merge branch 'gcc-problems'

This commit is contained in:
Ari Koivula 2014-06-17 16:29:39 +03:00
commit 3d23c7e913
3 changed files with 4 additions and 19 deletions

View file

@ -53,7 +53,7 @@ endif
WARNINGS = -Wall -Wtype-limits -Wvla
CC = gcc
CCFLAGS = $(DFLAGS) -I. -I./strategies $(WARNINGS)
CCFLAGS = $(DFLAGS) -std=gnu99 -I. -I./strategies $(WARNINGS)
LDFLAGS += -lm
LD = gcc -pthread -lrt
OBJS = interface_main.o encmain.o bitstream.o cabac.o checkpoint.o config.o context.o cu.o encoder.o encoderstate.o filter.o inter.o intra.o nal.o imagelist.o rdo.o sao.o scalinglist.o search.o strategyselector.o tables.o threadqueue.o transform.o encoder_state-bitstream.o encoder_state-ctors_dtors.o encoder_state-geometry.o image.o videoframe.o strategies/strategies-picture.o strategies/strategies-nal.o

View file

@ -823,19 +823,6 @@ static void sort_modes(int8_t *modes, uint32_t *costs, int length)
}
}
static uint32_t search_intra_get_mode_cost(encoder_state * const encoder_state, pixel *ref[2], cost_pixel_nxn_func *cost_func,
pixel *pred, int width, int16_t recstride, pixel *orig_block,
int8_t *intra_preds, int8_t mode)
{
uint32_t sad = 0;
uint32_t mode_cost = intra_pred_ratecost(mode, intra_preds);
intra_get_pred(encoder_state->encoder_control, ref, recstride, pred, width, mode, 0);
sad = cost_func(pred, orig_block);
sad += mode_cost * (int)(encoder_state->global->cur_lambda_cost + 0.5);
return sad;
}
static int8_t search_intra_rough(encoder_state * const encoder_state,
pixel *orig, int32_t origstride,
@ -843,8 +830,6 @@ static int8_t search_intra_rough(encoder_state * const encoder_state,
int width, int8_t *intra_preds,
int8_t modes[35], uint32_t costs[35])
{
int16_t mode;
cost_pixel_nxn_func *cost_func = pixels_get_sad_func(width);
// Temporary block arrays
@ -1074,7 +1059,7 @@ static int search_cu_intra(encoder_state * const encoder_state,
ref_pixels, LCU_WIDTH,
cu_in_rec_buffer, cu_width * 2 + 8,
cu_width, candidate_modes,
modes, costs, &number_of_modes);
modes, costs);
if (encoder_state->encoder_control->rdo == 2) {
int num_modes_to_check = MIN(number_of_modes, (cu_width <= 8) ? 8 : 3);

View file

@ -166,13 +166,13 @@ static void* strategyselector_choose_for(const strategy_list * const strategies,
#if defined(__GNUC__)
#include <cpuid.h>
INLINE int get_cpuid(unsigned int level, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) {
static INLINE int get_cpuid(unsigned int level, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) {
return __get_cpuid(level, eax, ebx, ecx, edx);
}
#else
#include <intrin.h>
//Adapter from __cpuid (VS) to __get_cpuid (GNU C).
INLINE int get_cpuid(unsigned int level, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) {
static INLINE int get_cpuid(unsigned int level, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) {
int CPUInfo[4] = {*eax, *ebx, *ecx, *edx};
__cpuid(CPUInfo, 0);
// check if the CPU supports the cpuid instruction.