diff --git a/build/VS2010/HEVC_encoder.vcxproj b/build/VS2010/HEVC_encoder.vcxproj
index 81a70754..a02be213 100644
--- a/build/VS2010/HEVC_encoder.vcxproj
+++ b/build/VS2010/HEVC_encoder.vcxproj
@@ -140,7 +140,7 @@
MaxSpeed
true
true
- WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ X64;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
CompileAsC
StreamingSIMDExtensions2
Default
@@ -167,6 +167,7 @@
+
@@ -180,6 +181,7 @@
+
diff --git a/build/VS2010/HEVC_encoder.vcxproj.filters b/build/VS2010/HEVC_encoder.vcxproj.filters
index 7432deb2..f0e86eab 100644
--- a/build/VS2010/HEVC_encoder.vcxproj.filters
+++ b/build/VS2010/HEVC_encoder.vcxproj.filters
@@ -60,6 +60,9 @@
Source Files
+
+ Source Files
+
@@ -99,7 +102,10 @@
Header Files\x86
- Header Files\x86
+ Header Files\x64
+
+
+ Header Files
diff --git a/src/bitstream.c b/src/bitstream.c
index 245e31b4..f79fab99 100644
--- a/src/bitstream.c
+++ b/src/bitstream.c
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file bitstream.c
diff --git a/src/cabac.c b/src/cabac.c
index 89008613..744782d6 100644
--- a/src/cabac.c
+++ b/src/cabac.c
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file cabac.c
diff --git a/src/cabac.h b/src/cabac.h
index e9e58bfa..7406a2a3 100644
--- a/src/cabac.h
+++ b/src/cabac.h
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file cabac.h
diff --git a/src/config.c b/src/config.c
index 353e2da4..6c532c9d 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file config.c
diff --git a/src/config.h b/src/config.h
index 1fe78644..4258c200 100644
--- a/src/config.h
+++ b/src/config.h
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file config.h
diff --git a/src/context.c b/src/context.c
index 98332a2f..32c7590d 100644
--- a/src/context.c
+++ b/src/context.c
@@ -1,6 +1,6 @@
/**
* Part of HEVC Encoder
- * By Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * By Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file context.c
diff --git a/src/context.h b/src/context.h
index c2a9f96c..d7740bc5 100644
--- a/src/context.h
+++ b/src/context.h
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file context.h
diff --git a/src/encmain.c b/src/encmain.c
index d932b9a5..382ba318 100644
--- a/src/encmain.c
+++ b/src/encmain.c
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file decmain.c
@@ -61,7 +61,8 @@
int main(int argc, char* argv[])
{
int ecx = 0,edx =0;
- enum { BIT_SSSE3 = 9, BIT_SSE41 = 19, BIT_SSE42 = 20, BIT_MMX = 24, BIT_SSE = 25, BIT_SSE2 = 26};
+ /* CPU feature bits */
+ enum { BIT_SSE3 = 0,BIT_SSSE3 = 9, BIT_SSE41 = 19, BIT_SSE42 = 20, BIT_MMX = 24, BIT_SSE = 25, BIT_SSE2 = 26, BIT_AVX = 28};
uint32_t curFrame = 0;
config *cfg = NULL; /* Global configuration */
FILE *input = NULL;
@@ -74,20 +75,22 @@
/* CPU id */
- printf("Checking for CPU features...\r\n");
#ifndef X64
- cpuId(&ecx,&edx);
+ //cpuId32(&ecx,&edx);
#else
- cpuId64(&ecx,&edx);
- #endif
- //printf("CPUID ECX: %X EDX: %X\r\n", ecx, edx);
+ //cpuId64(&ecx,&edx);
+ #endif
printf("CPU features enabled: ");
- if(edx & (1<in.cur_pic.uData,encoder->in.cur_pic.uRecData,cfg->width>>1,cfg->height>>1);
temp_PSNR[2] = imagePSNR(encoder->in.cur_pic.vData,encoder->in.cur_pic.vRecData,cfg->width>>1,cfg->height>>1);
- printf("[%d] %c-frame PSNR: %2.4f %2.4f %2.4f\n", encoder->frame, "IPB"[encoder->in.cur_pic.type%3],
+ printf("[%d] %c-frame PSNR: %2.4f %2.4f %2.4f\n", encoder->frame, "IPB"[encoder->in.cur_pic.slicetype%3],
temp_PSNR[0],temp_PSNR[1],temp_PSNR[2]);
PSNR[0]+=temp_PSNR[0];
PSNR[1]+=temp_PSNR[1];
diff --git a/src/encoder.c b/src/encoder.c
index 5b15d695..263594bf 100644
--- a/src/encoder.c
+++ b/src/encoder.c
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file encoder.c
@@ -1061,7 +1061,7 @@ void encode_transform_tree(encoder_control* encoder,transform_info* ti,uint8_t d
{
int16_t val = block[i++]+pred[x+y*pred_stride];
//ToDo: support 10+bits
- recbase[x+y*recbase_stride] = (uint8_t)CLIP(0,255,val);
+ recbase[x+y*recbase_stride] = (uint8_t)(val&0xff);//CLIP(0,255,val);
}
}
/* END RECONTRUCTION */
diff --git a/src/encoder.h b/src/encoder.h
index e3e8a74a..a90c1b9a 100644
--- a/src/encoder.h
+++ b/src/encoder.h
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file encoder.h
@@ -87,6 +87,7 @@ typedef struct
int32_t split[4];
} transform_info;
+void init_tables(void);
void init_encoder_control(encoder_control* control,bitstream* output);
void init_encoder_input(encoder_input* input,FILE* inputfile, int32_t width, int32_t height);
void encode_one_frame(encoder_control* encoder);
@@ -102,7 +103,6 @@ void encode_lastSignificantXY(encoder_control* encoder,uint8_t lastpos_x, uint8_
void encode_CoeffNxN(encoder_control* encoder,int16_t* coeff, uint8_t width, uint8_t type, int8_t scanMode);
void encode_transform_tree(encoder_control* encoder,transform_info* ti,uint8_t depth);
void encode_transform_coeff(encoder_control* encoder,transform_info* ti,int8_t depth, int8_t trDepth);
-void init_tables(void);
static uint32_t* g_auiSigLastScan[3][7];
int8_t g_aucConvertToBit[LCU_WIDTH+1];
@@ -146,8 +146,8 @@ static const uint8_t g_toBits[129] =
#define TOBITS(len) g_toBits[len]
-#define C1FLAG_NUMBER 8 // maximum number of largerThan1 flag coded in one chunk
-#define C2FLAG_NUMBER 1 // maximum number of largerThan2 flag coded in one chunk
+#define C1FLAG_NUMBER 8 /*!< maximum number of largerThan1 flag coded in one chunk */
+#define C2FLAG_NUMBER 1 /*!< maximum number of largerThan2 flag coded in one chunk */
enum COEFF_SCAN_TYPE
{
diff --git a/src/filter.c b/src/filter.c
index 5b520d5c..61f11b7a 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file filter.c
diff --git a/src/filter.h b/src/filter.h
index ec4e8589..30c28d6a 100644
--- a/src/filter.h
+++ b/src/filter.h
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems 2012.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing 2013.
*/
/*! \file filter.h
diff --git a/src/global.h b/src/global.h
index e3374d6b..bc2c7750 100644
--- a/src/global.h
+++ b/src/global.h
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file global.h
diff --git a/src/intra.c b/src/intra.c
index f3a216ba..88af804e 100644
--- a/src/intra.c
+++ b/src/intra.c
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file intra.c
diff --git a/src/intra.h b/src/intra.h
index f2e929b0..9dc77b4b 100644
--- a/src/intra.h
+++ b/src/intra.h
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file intra.h
diff --git a/src/nal.c b/src/nal.c
index 3e7ade0e..5d143993 100644
--- a/src/nal.c
+++ b/src/nal.c
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file nal.c
diff --git a/src/nal.h b/src/nal.h
index 1e3ad51e..fcfafbbc 100644
--- a/src/nal.h
+++ b/src/nal.h
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems 2012.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing 2013.
*/
/*! \file nal.h
diff --git a/src/picture.c b/src/picture.c
index f384b4c9..949d0361 100644
--- a/src/picture.c
+++ b/src/picture.c
@@ -1,6 +1,6 @@
/**
* Part of HEVC Encoder
- * By Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * By Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file picture.c
@@ -70,7 +70,7 @@
//allocate space for the new list
list->pics = (picture**)malloc(sizeof(picture*)*size);
- //Copy everthing from the old list to the new if needed.
+ //Copy everything from the old list to the new if needed.
if(old_pics != NULL)
{
for(i = 0; i < list->used_size; i++)
diff --git a/src/picture.h b/src/picture.h
index abead2d4..7a3fa8a3 100644
--- a/src/picture.h
+++ b/src/picture.h
@@ -1,6 +1,6 @@
/**
* Part of HEVC Encoder
- * By Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * By Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file picture.h
diff --git a/src/search.c b/src/search.c
new file mode 100644
index 00000000..6cf10e0a
--- /dev/null
+++ b/src/search.c
@@ -0,0 +1,24 @@
+/**
+ * HEVC Encoder
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
+ */
+
+/*! \file search.c
+ \brief searching
+ \author Marko Viitanen
+ \date 2013-04
+
+ Search related functions
+*/
+
+
+#include
+#include
+#include
+#include "global.h"
+#include "config.h"
+#include "bitstream.h"
+#include "picture.h"
+#include "cabac.h"
+#include "encoder.h"
+#include "filter.h"
diff --git a/src/search.h b/src/search.h
new file mode 100644
index 00000000..d588f666
--- /dev/null
+++ b/src/search.h
@@ -0,0 +1,18 @@
+/**
+ * HEVC Encoder
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing 2013.
+ */
+
+/*! \file search.h
+ \brief searching
+ \author Marko Viitanen
+ \date 2013-04
+
+ Search related function headers
+*/
+
+#ifndef __SEARCH_H
+#define __SEARCH_H
+
+
+#endif
diff --git a/src/transform.c b/src/transform.c
index 474d60d7..0aa7af04 100644
--- a/src/transform.c
+++ b/src/transform.c
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file transform.c
diff --git a/src/transform.h b/src/transform.h
index 670ea37b..e4356d73 100644
--- a/src/transform.h
+++ b/src/transform.h
@@ -1,6 +1,6 @@
/**
* HEVC Encoder
- * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file transform.h
diff --git a/src/x64/test64.asm b/src/x64/test64.asm
index 30963055..d9d256ef 100644
--- a/src/x64/test64.asm
+++ b/src/x64/test64.asm
@@ -3,6 +3,8 @@ bits 64
section .code
global cpuId64
+;void __cdecl cpuId64(int* ecx, int *edx );
+
cpuId64:
mov r8, rcx ; pointer to ecx-output
mov r9, rdx ; pointer to edx-output
diff --git a/src/x64/test64.h b/src/x64/test64.h
index 21fe9a71..4dc43f39 100644
--- a/src/x64/test64.h
+++ b/src/x64/test64.h
@@ -1,6 +1,6 @@
/**
* Part of HEVC Encoder
- * By Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * By Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file test.h
diff --git a/src/x86/test.asm b/src/x86/test.asm
index e9626f5b..932348fd 100644
--- a/src/x86/test.asm
+++ b/src/x86/test.asm
@@ -1,13 +1,16 @@
; Function to get CPUID for identifying CPU capabilities
bits 32
-global _cpuId
+section .code
+global cpuId32
-_cpuId:
+;void __cdecl cpuId(int* ecx, int *edx );
+
+cpuId32:
mov eax,1
cpuid
- mov eax, dword [esp+4]
+ mov eax, dword [esp+4] ; pointer to ecx-output, pushed second to the stack
mov dword [eax], ecx
- mov eax, dword [esp+8]
+ mov eax, dword [esp+8] ; pointer to edx-output, pushed first to the stack
mov dword [eax], edx
mov eax,0
ret
\ No newline at end of file
diff --git a/src/x86/test.h b/src/x86/test.h
index 3448e699..7af0b3ed 100644
--- a/src/x86/test.h
+++ b/src/x86/test.h
@@ -1,6 +1,6 @@
/**
* Part of HEVC Encoder
- * By Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Computer Systems.
+ * By Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
*/
/*! \file test.h
@@ -13,7 +13,7 @@
#ifndef _TEST_H_
#define _TEST_H_
-void __cdecl cpuId(int* ecx, int *edx );
+void __cdecl cpuId32(int* ecx, int *edx );
#endif
\ No newline at end of file