ref: df994fa3f5840a48b8b651573c2394b671655ce8
parent: 61027613dde6aa370919d69319b2165332803eb3
author: Martin Storsjö <martin@martin.st>
date: Mon May 4 08:03:50 EDT 2015
Convert tabs to spaces in enums and tables of defines
--- a/codec/api/svc/codec_app_def.h
+++ b/codec/api/svc/codec_app_def.h
@@ -41,19 +41,19 @@
#include "codec_def.h"
/* Constants */
-#define MAX_TEMPORAL_LAYER_NUM 4
-#define MAX_SPATIAL_LAYER_NUM 4
-#define MAX_QUALITY_LAYER_NUM 4
+#define MAX_TEMPORAL_LAYER_NUM 4
+#define MAX_SPATIAL_LAYER_NUM 4
+#define MAX_QUALITY_LAYER_NUM 4
-#define MAX_LAYER_NUM_OF_FRAME 128
-#define MAX_NAL_UNITS_IN_LAYER 128 ///< predetermined here, adjust it later if need
+#define MAX_LAYER_NUM_OF_FRAME 128
+#define MAX_NAL_UNITS_IN_LAYER 128 ///< predetermined here, adjust it later if need
-#define MAX_RTP_PAYLOAD_LEN 1000
-#define AVERAGE_RTP_PAYLOAD_LEN 800
+#define MAX_RTP_PAYLOAD_LEN 1000
+#define AVERAGE_RTP_PAYLOAD_LEN 800
-#define SAVED_NALUNIT_NUM_TMP ( (MAX_SPATIAL_LAYER_NUM*MAX_QUALITY_LAYER_NUM) + 1 + MAX_SPATIAL_LAYER_NUM ) ///< SPS/PPS + SEI/SSEI + PADDING_NAL
-#define MAX_SLICES_NUM_TMP ( ( MAX_NAL_UNITS_IN_LAYER - SAVED_NALUNIT_NUM_TMP ) / 3 )
+#define SAVED_NALUNIT_NUM_TMP ( (MAX_SPATIAL_LAYER_NUM*MAX_QUALITY_LAYER_NUM) + 1 + MAX_SPATIAL_LAYER_NUM ) ///< SPS/PPS + SEI/SSEI + PADDING_NAL
+#define MAX_SLICES_NUM_TMP ( ( MAX_NAL_UNITS_IN_LAYER - SAVED_NALUNIT_NUM_TMP ) / 3 )
#define AUTO_REF_PIC_COUNT -1 ///< encoder selects the number of reference frame automatically
@@ -148,13 +148,13 @@
*/
typedef enum {
DECODER_OPTION_DATAFORMAT = 0, ///< color format, now supports 23 only (I420)
- DECODER_OPTION_END_OF_STREAM, ///< end of stream flag
+ DECODER_OPTION_END_OF_STREAM, ///< end of stream flag
DECODER_OPTION_VCL_NAL, ///< feedback whether or not have VCL NAL in current AU for application layer
DECODER_OPTION_TEMPORAL_ID, ///< feedback temporal id for application layer
DECODER_OPTION_FRAME_NUM, ///< feedback current decoded frame number
- DECODER_OPTION_IDR_PIC_ID, ///< feedback current frame belong to which IDR period
- DECODER_OPTION_LTR_MARKING_FLAG, ///< feedback wether current frame mark a LTR
- DECODER_OPTION_LTR_MARKED_FRAME_NUM, ///< feedback frame num marked by current Frame
+ DECODER_OPTION_IDR_PIC_ID, ///< feedback current frame belong to which IDR period
+ DECODER_OPTION_LTR_MARKING_FLAG, ///< feedback wether current frame mark a LTR
+ DECODER_OPTION_LTR_MARKED_FRAME_NUM, ///< feedback frame num marked by current Frame
DECODER_OPTION_ERROR_CON_IDC, ///< not finished yet, indicate decoder error concealment status, in progress
DECODER_OPTION_TRACE_LEVEL,
DECODER_OPTION_TRACE_CALLBACK, ///< a void (*)(void* context, int level, const char* message) function which receives log messages
@@ -267,12 +267,12 @@
* @brief Enumerate the type of slice mode
*/
typedef enum {
- SM_SINGLE_SLICE = 0, ///< | SliceNum==1
- SM_FIXEDSLCNUM_SLICE = 1, ///< | according to SliceNum | enabled dynamic slicing for multi-thread
- SM_RASTER_SLICE = 2, ///< | according to SlicesAssign | need input of MB numbers each slice. In addition, if other constraint in SSliceArgument is presented, need to follow the constraints. Typically if MB num and slice size are both constrained, re-encoding may be involved.
+ SM_SINGLE_SLICE = 0, ///< | SliceNum==1
+ SM_FIXEDSLCNUM_SLICE = 1, ///< | according to SliceNum | enabled dynamic slicing for multi-thread
+ SM_RASTER_SLICE = 2, ///< | according to SlicesAssign | need input of MB numbers each slice. In addition, if other constraint in SSliceArgument is presented, need to follow the constraints. Typically if MB num and slice size are both constrained, re-encoding may be involved.
SM_ROWMB_SLICE = 3, ///< | according to PictureMBHeight | typical of single row of mbs each slice + slice size constraint which including re-encoding
- SM_DYN_SLICE = 4, ///< | according to SliceSize | dynamic slicing (have no idea about slice_nums until encoding current frame)
- SM_AUTO_SLICE = 5, ///< | according to thread number
+ SM_DYN_SLICE = 4, ///< | according to SliceSize | dynamic slicing (have no idea about slice_nums until encoding current frame)
+ SM_AUTO_SLICE = 5, ///< | according to thread number
SM_RESERVED = 6
} SliceModeEnum;
@@ -292,17 +292,17 @@
*/
typedef enum {
PRO_UNKNOWN = 0,
- PRO_BASELINE = 66,
- PRO_MAIN = 77,
- PRO_EXTENDED = 88,
- PRO_HIGH = 100,
- PRO_HIGH10 = 110,
- PRO_HIGH422 = 122,
+ PRO_BASELINE = 66,
+ PRO_MAIN = 77,
+ PRO_EXTENDED = 88,
+ PRO_HIGH = 100,
+ PRO_HIGH10 = 110,
+ PRO_HIGH422 = 122,
PRO_HIGH444 = 144,
- PRO_CAVLC444 = 244,
+ PRO_CAVLC444 = 244,
- PRO_SCALABLE_BASELINE = 83,
- PRO_SCALABLE_HIGH = 86
+ PRO_SCALABLE_BASELINE = 83,
+ PRO_SCALABLE_HIGH = 86
} EProfileIdc;
/**
@@ -341,7 +341,7 @@
WELS_LOG_DETAIL = 1 << 4, ///< per packet/frame log
WELS_LOG_RESV = 1 << 5, ///< resversed log iLevel
WELS_LOG_LEVEL_COUNT = 6,
- WELS_LOG_DEFAULT = WELS_LOG_WARNING ///< default log iLevel in Wels codec
+ WELS_LOG_DEFAULT = WELS_LOG_WARNING ///< default log iLevel in Wels codec
};
/**
--- a/codec/api/svc/codec_def.h
+++ b/codec/api/svc/codec_def.h
@@ -118,8 +118,8 @@
#define IS_IDR_NAL(eNalRefIdc, eNalType) \
( (eNalRefIdc == NAL_PRIORITY_HIGHEST) && (eNalType == NAL_SLICE_IDR) )
-#define FRAME_NUM_PARAM_SET (-1)
-#define FRAME_NUM_IDR 0
+#define FRAME_NUM_PARAM_SET (-1)
+#define FRAME_NUM_IDR 0
/**
* @brief eDeblockingIdc
@@ -146,7 +146,7 @@
ET_IR_R2 = 0x08, ///< Intra Refresh in predifined 5% MB
ET_IR_R3 = 0x10, ///< Intra Refresh in predifined 10% MB
ET_FEC_HALF = 0x20, ///< Forward Error Correction in 50% redundency mode
- ET_FEC_FULL = 0x40, ///< Forward Error Correction in 100% redundency mode
+ ET_FEC_FULL = 0x40, ///< Forward Error Correction in 100% redundency mode
ET_RFS = 0x80 ///< Reference Frame Selection
};
--- a/codec/common/inc/WelsThreadLib.h
+++ b/codec/common/inc/WelsThreadLib.h
@@ -93,11 +93,11 @@
int32_t ProcessorCount;
} WelsLogicalProcessInfo;
-#define WELS_THREAD_ERROR_OK 0
-#define WELS_THREAD_ERROR_GENERAL ((uint32_t)(-1))
-#define WELS_THREAD_ERROR_WAIT_OBJECT_0 0
-#define WELS_THREAD_ERROR_WAIT_TIMEOUT ((uint32_t)0x00000102L)
-#define WELS_THREAD_ERROR_WAIT_FAILED WELS_THREAD_ERROR_GENERAL
+#define WELS_THREAD_ERROR_OK 0
+#define WELS_THREAD_ERROR_GENERAL ((uint32_t)(-1))
+#define WELS_THREAD_ERROR_WAIT_OBJECT_0 0
+#define WELS_THREAD_ERROR_WAIT_TIMEOUT ((uint32_t)0x00000102L)
+#define WELS_THREAD_ERROR_WAIT_FAILED WELS_THREAD_ERROR_GENERAL
WELS_THREAD_ERROR_CODE WelsMutexInit (WELS_MUTEX* mutex);
WELS_THREAD_ERROR_CODE WelsMutexLock (WELS_MUTEX* mutex);
--- a/codec/common/inc/cpu_core.h
+++ b/codec/common/inc/cpu_core.h
@@ -56,18 +56,18 @@
#define WELS_CPU_SSE42 0x00000400 /* sse 4.2 */
/* CPU features application extensive */
-#define WELS_CPU_AVX 0x00000800 /* Advanced Vector eXtentions */
-#define WELS_CPU_FPU 0x00001000 /* x87-FPU on chip */
-#define WELS_CPU_HTT 0x00002000 /* Hyper-Threading Technology (HTT), Multi-threading enabled feature:
- physical processor package is capable of supporting more than one logic processor
- */
-#define WELS_CPU_CMOV 0x00004000 /* Conditional Move Instructions,
- also if x87-FPU is present at indicated by the CPUID.FPU feature bit, then FCOMI and FCMOV are supported
- */
-#define WELS_CPU_MOVBE 0x00008000 /* MOVBE instruction */
-#define WELS_CPU_AES 0x00010000 /* AES instruction extensions */
-#define WELS_CPU_FMA 0x00020000 /* AVX VEX FMA instruction sets */
-#define WELS_CPU_AVX2 0x00040000 /* AVX2 */
+#define WELS_CPU_AVX 0x00000800 /* Advanced Vector eXtentions */
+#define WELS_CPU_FPU 0x00001000 /* x87-FPU on chip */
+#define WELS_CPU_HTT 0x00002000 /* Hyper-Threading Technology (HTT), Multi-threading enabled feature:
+ physical processor package is capable of supporting more than one logic processor
+ */
+#define WELS_CPU_CMOV 0x00004000 /* Conditional Move Instructions,
+ also if x87-FPU is present at indicated by the CPUID.FPU feature bit, then FCOMI and FCMOV are supported
+ */
+#define WELS_CPU_MOVBE 0x00008000 /* MOVBE instruction */
+#define WELS_CPU_AES 0x00010000 /* AES instruction extensions */
+#define WELS_CPU_FMA 0x00020000 /* AVX VEX FMA instruction sets */
+#define WELS_CPU_AVX2 0x00040000 /* AVX2 */
#define WELS_CPU_CACHELINE_16 0x10000000 /* CacheLine Size 16 */
#define WELS_CPU_CACHELINE_32 0x20000000 /* CacheLine Size 32 */
--- a/codec/common/inc/utils.h
+++ b/codec/common/inc/utils.h
@@ -42,7 +42,7 @@
#include <stdarg.h>
#include "typedefs.h"
-#define MAX_LOG_SIZE 1024
+#define MAX_LOG_SIZE 1024
#define MAX_WIDTH (4096)
#define MAX_HEIGHT (2304)//MAX_FS_LEVEL51 (36864); MAX_FS_LEVEL51*256/4096 = 2304
/*
--- a/codec/common/inc/wels_common_defs.h
+++ b/codec/common/inc/wels_common_defs.h
@@ -82,37 +82,37 @@
*/
enum EWelsNalUnitType {
NAL_UNIT_UNSPEC_0 = 0,
- NAL_UNIT_CODED_SLICE = 1,
- NAL_UNIT_CODED_SLICE_DPA = 2,
- NAL_UNIT_CODED_SLICE_DPB = 3,
- NAL_UNIT_CODED_SLICE_DPC = 4,
- NAL_UNIT_CODED_SLICE_IDR = 5,
- NAL_UNIT_SEI = 6,
- NAL_UNIT_SPS = 7,
- NAL_UNIT_PPS = 8,
- NAL_UNIT_AU_DELIMITER = 9,
- NAL_UNIT_END_OF_SEQ = 10,
- NAL_UNIT_END_OF_STR = 11,
- NAL_UNIT_FILLER_DATA = 12,
- NAL_UNIT_SPS_EXT = 13,
- NAL_UNIT_PREFIX = 14,
- NAL_UNIT_SUBSET_SPS = 15,
- NAL_UNIT_RESV_16 = 16,
- NAL_UNIT_RESV_17 = 17,
- NAL_UNIT_RESV_18 = 18,
- NAL_UNIT_AUX_CODED_SLICE = 19,
- NAL_UNIT_CODED_SLICE_EXT = 20,
- NAL_UNIT_RESV_21 = 21,
- NAL_UNIT_RESV_22 = 22,
- NAL_UNIT_RESV_23 = 23,
- NAL_UNIT_UNSPEC_24 = 24,
- NAL_UNIT_UNSPEC_25 = 25,
- NAL_UNIT_UNSPEC_26 = 26,
- NAL_UNIT_UNSPEC_27 = 27,
- NAL_UNIT_UNSPEC_28 = 28,
- NAL_UNIT_UNSPEC_29 = 29,
- NAL_UNIT_UNSPEC_30 = 30,
- NAL_UNIT_UNSPEC_31 = 31
+ NAL_UNIT_CODED_SLICE = 1,
+ NAL_UNIT_CODED_SLICE_DPA = 2,
+ NAL_UNIT_CODED_SLICE_DPB = 3,
+ NAL_UNIT_CODED_SLICE_DPC = 4,
+ NAL_UNIT_CODED_SLICE_IDR = 5,
+ NAL_UNIT_SEI = 6,
+ NAL_UNIT_SPS = 7,
+ NAL_UNIT_PPS = 8,
+ NAL_UNIT_AU_DELIMITER = 9,
+ NAL_UNIT_END_OF_SEQ = 10,
+ NAL_UNIT_END_OF_STR = 11,
+ NAL_UNIT_FILLER_DATA = 12,
+ NAL_UNIT_SPS_EXT = 13,
+ NAL_UNIT_PREFIX = 14,
+ NAL_UNIT_SUBSET_SPS = 15,
+ NAL_UNIT_RESV_16 = 16,
+ NAL_UNIT_RESV_17 = 17,
+ NAL_UNIT_RESV_18 = 18,
+ NAL_UNIT_AUX_CODED_SLICE = 19,
+ NAL_UNIT_CODED_SLICE_EXT = 20,
+ NAL_UNIT_RESV_21 = 21,
+ NAL_UNIT_RESV_22 = 22,
+ NAL_UNIT_RESV_23 = 23,
+ NAL_UNIT_UNSPEC_24 = 24,
+ NAL_UNIT_UNSPEC_25 = 25,
+ NAL_UNIT_UNSPEC_26 = 26,
+ NAL_UNIT_UNSPEC_27 = 27,
+ NAL_UNIT_UNSPEC_28 = 28,
+ NAL_UNIT_UNSPEC_29 = 29,
+ NAL_UNIT_UNSPEC_30 = 30,
+ NAL_UNIT_UNSPEC_31 = 31
};
/*
@@ -120,10 +120,10 @@
*/
enum EWelsNalRefIdc {
- NRI_PRI_LOWEST = 0,
- NRI_PRI_LOW = 1,
- NRI_PRI_HIGH = 2,
- NRI_PRI_HIGHEST = 3
+ NRI_PRI_LOWEST = 0,
+ NRI_PRI_LOW = 1,
+ NRI_PRI_HIGH = 2,
+ NRI_PRI_HIGHEST = 3
};
/*
@@ -131,9 +131,9 @@
*/
enum EVclType {
- NON_VCL = 0,
- VCL = 1,
- NOT_APP = 2
+ NON_VCL = 0,
+ VCL = 1,
+ NOT_APP = 2
};
/*
@@ -141,15 +141,15 @@
*/
extern const EVclType g_keTypeMap[32][2];
-#define IS_VCL_NAL(t, ext_idx) (g_keTypeMap[t][ext_idx] == VCL)
-#define IS_PARAM_SETS_NALS(t) ( (t) == NAL_UNIT_SPS || (t) == NAL_UNIT_PPS || (t) == NAL_UNIT_SUBSET_SPS )
-#define IS_SPS_NAL(t) ( (t) == NAL_UNIT_SPS )
-#define IS_SUBSET_SPS_NAL(t) ( (t) == NAL_UNIT_SUBSET_SPS )
-#define IS_PPS_NAL(t) ( (t) == NAL_UNIT_PPS )
-#define IS_SEI_NAL(t) ( (t) == NAL_UNIT_SEI )
-#define IS_PREFIX_NAL(t) ( (t) == NAL_UNIT_PREFIX )
-#define IS_SUBSET_SPS_USED(t) ( (t) == NAL_UNIT_SUBSET_SPS || (t) == NAL_UNIT_CODED_SLICE_EXT )
-#define IS_VCL_NAL_AVC_BASE(t) ( (t) == NAL_UNIT_CODED_SLICE || (t) == NAL_UNIT_CODED_SLICE_IDR )
+#define IS_VCL_NAL(t, ext_idx) (g_keTypeMap[t][ext_idx] == VCL)
+#define IS_PARAM_SETS_NALS(t) ( (t) == NAL_UNIT_SPS || (t) == NAL_UNIT_PPS || (t) == NAL_UNIT_SUBSET_SPS )
+#define IS_SPS_NAL(t) ( (t) == NAL_UNIT_SPS )
+#define IS_SUBSET_SPS_NAL(t) ( (t) == NAL_UNIT_SUBSET_SPS )
+#define IS_PPS_NAL(t) ( (t) == NAL_UNIT_PPS )
+#define IS_SEI_NAL(t) ( (t) == NAL_UNIT_SEI )
+#define IS_PREFIX_NAL(t) ( (t) == NAL_UNIT_PREFIX )
+#define IS_SUBSET_SPS_USED(t) ( (t) == NAL_UNIT_SUBSET_SPS || (t) == NAL_UNIT_CODED_SLICE_EXT )
+#define IS_VCL_NAL_AVC_BASE(t) ( (t) == NAL_UNIT_CODED_SLICE || (t) == NAL_UNIT_CODED_SLICE_IDR )
#define IS_NEW_INTRODUCED_SVC_NAL(t) ( (t) == NAL_UNIT_PREFIX || (t) == NAL_UNIT_CODED_SLICE_EXT )
@@ -160,9 +160,9 @@
*/
enum EWelsSliceType {
- P_SLICE = 0,
- B_SLICE = 1,
- I_SLICE = 2,
+ P_SLICE = 0,
+ B_SLICE = 1,
+ I_SLICE = 2,
SP_SLICE = 3,
SI_SLICE = 4,
UNKNOWN_SLICE = 5
@@ -170,16 +170,16 @@
/* SSlice Types in scalable extension */
enum ESliceTypeExt {
- EP_SLICE = 0, // EP_SLICE: 0, 5
- EB_SLICE = 1, // EB_SLICE: 1, 6
- EI_SLICE = 2 // EI_SLICE: 2, 7
+ EP_SLICE = 0, // EP_SLICE: 0, 5
+ EB_SLICE = 1, // EB_SLICE: 1, 6
+ EI_SLICE = 2 // EI_SLICE: 2, 7
};
/* List Index */
enum EListIndex {
- LIST_0 = 0,
- LIST_1 = 1,
- LIST_A = 2
+ LIST_0 = 0,
+ LIST_1 = 1,
+ LIST_A = 2
};
@@ -186,17 +186,17 @@
/* Motion Vector components */
enum EMvComp {
- MV_X = 0,
- MV_Y = 1,
- MV_A = 2
+ MV_X = 0,
+ MV_Y = 1,
+ MV_A = 2
};
/* Chroma Components */
enum EChromaComp {
- CHROMA_CB = 0,
- CHROMA_CR = 1,
- CHROMA_A = 2
+ CHROMA_CB = 0,
+ CHROMA_CR = 1,
+ CHROMA_A = 2
};
@@ -205,13 +205,13 @@
* Memory Management Control Operation (MMCO) code
*/
enum EMmcoCode {
- MMCO_END = 0,
- MMCO_SHORT2UNUSED = 1,
- MMCO_LONG2UNUSED = 2,
- MMCO_SHORT2LONG = 3,
- MMCO_SET_MAX_LONG = 4,
- MMCO_RESET = 5,
- MMCO_LONG = 6
+ MMCO_END = 0,
+ MMCO_SHORT2UNUSED = 1,
+ MMCO_LONG2UNUSED = 2,
+ MMCO_SHORT2LONG = 3,
+ MMCO_SET_MAX_LONG = 4,
+ MMCO_RESET = 5,
+ MMCO_LONG = 6
};
/*
--- a/codec/common/inc/wels_const_common.h
+++ b/codec/common/inc/wels_const_common.h
@@ -35,29 +35,29 @@
// Miscellaneous sizing infos
#ifndef MAX_FNAME_LEN
-#define MAX_FNAME_LEN 256 // maximal length of file name in char size
+#define MAX_FNAME_LEN 256 // maximal length of file name in char size
#endif//MAX_FNAME_LEN
#ifndef WELS_LOG_BUF_SIZE
-#define WELS_LOG_BUF_SIZE 4096
+#define WELS_LOG_BUF_SIZE 4096
#endif//WELS_LOG_BUF_SIZE
#ifndef MAX_TRACE_LOG_SIZE
-#define MAX_TRACE_LOG_SIZE (50 * (1<<20)) // max trace log size: 50 MB, overwrite occur if log file size exceeds this size
+#define MAX_TRACE_LOG_SIZE (50 * (1<<20)) // max trace log size: 50 MB, overwrite occur if log file size exceeds this size
#endif//MAX_TRACE_LOG_SIZE
/* MB width in pixels for specified colorspace I420 usually used in codec */
-#define MB_WIDTH_LUMA 16
-#define MB_WIDTH_CHROMA (MB_WIDTH_LUMA>>1)
+#define MB_WIDTH_LUMA 16
+#define MB_WIDTH_CHROMA (MB_WIDTH_LUMA>>1)
/* MB height in pixels for specified colorspace I420 usually used in codec */
-#define MB_HEIGHT_LUMA 16
-#define MB_HEIGHT_CHROMA (MB_HEIGHT_LUMA>>1)
-#define MB_COEFF_LIST_SIZE (256+((MB_WIDTH_CHROMA*MB_HEIGHT_CHROMA)<<1))
-#define MB_PARTITION_SIZE 4 // Macroblock partition size in 8x8 sub-blocks
-#define MB_BLOCK4x4_NUM 16
-#define MB_BLOCK8x8_NUM 4
-#define MAX_SPS_COUNT 32 // Count number of SPS
-#define BASE_QUALITY_ID 0
+#define MB_HEIGHT_LUMA 16
+#define MB_HEIGHT_CHROMA (MB_HEIGHT_LUMA>>1)
+#define MB_COEFF_LIST_SIZE (256+((MB_WIDTH_CHROMA*MB_HEIGHT_CHROMA)<<1))
+#define MB_PARTITION_SIZE 4 // Macroblock partition size in 8x8 sub-blocks
+#define MB_BLOCK4x4_NUM 16
+#define MB_BLOCK8x8_NUM 4
+#define MAX_SPS_COUNT 32 // Count number of SPS
+#define BASE_QUALITY_ID 0
#endif//WELS_CONST_COMMON_H__
--- a/codec/common/src/utils.cpp
+++ b/codec/common/src/utils.cpp
@@ -75,8 +75,8 @@
}
#ifndef CALC_PSNR
-#define CONST_FACTOR_PSNR (10.0 / log(10.0)) // for good computation
-#define CALC_PSNR(w, h, s) ((float)(CONST_FACTOR_PSNR * log( 65025.0 * w * h / iSqe )))
+#define CONST_FACTOR_PSNR (10.0 / log(10.0)) // for good computation
+#define CALC_PSNR(w, h, s) ((float)(CONST_FACTOR_PSNR * log( 65025.0 * w * h / iSqe )))
#endif//CALC_PSNR
/*
--- a/codec/console/dec/src/d3d9_utils.cpp
+++ b/codec/console/dec/src/d3d9_utils.cpp
@@ -39,11 +39,11 @@
#ifdef ENABLE_DISPLAY_MODULE
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-#define IDM_ABOUT 104
-#define IDM_EXIT 105
-#define IDI_TESTSHARESURFACE 107
-#define IDI_SMALL 108
-#define IDC_TESTSHARESURFACE 109
+#define IDM_ABOUT 104
+#define IDM_EXIT 105
+#define IDI_TESTSHARESURFACE 107
+#define IDI_SMALL 108
+#define IDC_TESTSHARESURFACE 109
#define NV12_FORMAT MAKEFOURCC('N','V','1','2')
--- a/codec/decoder/core/inc/error_code.h
+++ b/codec/decoder/core/inc/error_code.h
@@ -43,12 +43,12 @@
namespace WelsDec {
typedef enum TagWelsErr {
-ERR_NONE = 0,
-ERR_INVALID_PARAMETERS = 1,
-ERR_MALLOC_FAILED = 2,
-ERR_API_FAILED = 3,
+ERR_NONE = 0,
+ERR_INVALID_PARAMETERS = 1,
+ERR_MALLOC_FAILED = 2,
+ERR_API_FAILED = 3,
-ERR_BOUND = 31
+ERR_BOUND = 31
} EWelsErr;
/*
@@ -75,12 +75,12 @@
/* More detailed error information, maximal value is 65535 */
//-----------------------------------------------------------------------------------------------------------
-#define ERR_INFO_COMMON_BASE 1
-#define ERR_INFO_SYNTAX_BASE 1001
-#define ERR_INFO_LOGIC_BASE 10001
+#define ERR_INFO_COMMON_BASE 1
+#define ERR_INFO_SYNTAX_BASE 1001
+#define ERR_INFO_LOGIC_BASE 10001
enum {
/* Error from common system level: 1-1000 */
-ERR_INFO_OUT_OF_MEMORY = ERR_INFO_COMMON_BASE,
+ERR_INFO_OUT_OF_MEMORY = ERR_INFO_COMMON_BASE,
ERR_INFO_INVALID_ACCESS,
ERR_INFO_INVALID_PTR,
ERR_INFO_INVALID_PARAM,
@@ -93,9 +93,9 @@
ERR_INFO_READ_OVERFLOW,
ERR_INFO_READ_LEADING_ZERO,
/* Error from H.264 syntax elements parser: 1001-10000 */
-ERR_INFO_NO_PREFIX_CODE = ERR_INFO_SYNTAX_BASE, // No start prefix code indication
-ERR_INFO_NO_PARAM_SETS, // No SPS and/ PPS before sequence header
-ERR_INFO_PARAM_SETS_NOT_INTEGRATED, // Parameters sets (sps/pps) are not integrated at all before to decode VCL nal
+ERR_INFO_NO_PREFIX_CODE = ERR_INFO_SYNTAX_BASE, // No start prefix code indication
+ERR_INFO_NO_PARAM_SETS, // No SPS and/ PPS before sequence header
+ERR_INFO_PARAM_SETS_NOT_INTEGRATED, // Parameters sets (sps/pps) are not integrated at all before to decode VCL nal
ERR_INFO_SPS_ID_OVERFLOW,
ERR_INFO_PPS_ID_OVERFLOW,
ERR_INFO_INVALID_PROFILE_IDC,
@@ -179,7 +179,7 @@
ERR_INFO_INVALID_REF_REORDERING,
/* Error from corresponding logic, 10001-65535 */
-ERR_INFO_NO_IDR_PIC = ERR_INFO_LOGIC_BASE, // NO IDR picture available before sequence header
+ERR_INFO_NO_IDR_PIC = ERR_INFO_LOGIC_BASE, // NO IDR picture available before sequence header
ERR_INFO_EC_NO_NEIGHBOUR_MBS,
ERR_INFO_EC_UNEXPECTED_MB_TYPE,
ERR_INFO_EC_NO_ENOUGH_NEIGHBOUR_MBS,
--- a/codec/decoder/core/inc/wels_const.h
+++ b/codec/decoder/core/inc/wels_const.h
@@ -38,25 +38,25 @@
/* Some list size */
-#define MB_SUB_PARTITION_SIZE 4 // Sub partition size in a 8x8 sub-block
-#define NAL_UNIT_HEADER_EXT_SIZE 3 // Size of NAL unit header for extension in byte
-#define MAX_PPS_COUNT 256 // Count number of PPS
+#define MB_SUB_PARTITION_SIZE 4 // Sub partition size in a 8x8 sub-block
+#define NAL_UNIT_HEADER_EXT_SIZE 3 // Size of NAL unit header for extension in byte
+#define MAX_PPS_COUNT 256 // Count number of PPS
-#define MAX_REF_PIC_COUNT 16 // MAX Short + Long reference pictures
-#define MIN_REF_PIC_COUNT 1 // minimal count number of reference pictures, 1 short + 2 key reference based?
-#define MAX_SHORT_REF_COUNT 16 // maximal count number of short reference pictures
-#define MAX_LONG_REF_COUNT 16 // maximal count number of long reference pictures
+#define MAX_REF_PIC_COUNT 16 // MAX Short + Long reference pictures
+#define MIN_REF_PIC_COUNT 1 // minimal count number of reference pictures, 1 short + 2 key reference based?
+#define MAX_SHORT_REF_COUNT 16 // maximal count number of short reference pictures
+#define MAX_LONG_REF_COUNT 16 // maximal count number of long reference pictures
-#define MAX_MMCO_COUNT 66
+#define MAX_MMCO_COUNT 66
-#define MAX_SLICEGROUP_IDS 8 // Count number of Slice Groups
+#define MAX_SLICEGROUP_IDS 8 // Count number of Slice Groups
-#define MAX_LAYER_NUM 8
+#define MAX_LAYER_NUM 8
-#define LAYER_NUM_EXCHANGEABLE 1
+#define LAYER_NUM_EXCHANGEABLE 1
-#define MAX_NAL_UNIT_NUM_IN_AU 32 // predefined maximal number of NAL Units in an access unit
-#define MIN_ACCESS_UNIT_CAPACITY 1048576 // Min AU capacity in bytes: (1<<20) = 1024 KB predefined
+#define MAX_NAL_UNIT_NUM_IN_AU 32 // predefined maximal number of NAL Units in an access unit
+#define MIN_ACCESS_UNIT_CAPACITY 1048576 // Min AU capacity in bytes: (1<<20) = 1024 KB predefined
#define MAX_BUFFERED_NUM 3 //mamixum stored number of AU|packet to prevent overwrite
#define MAX_ACCESS_UNIT_CAPACITY 7077888 //Maximum AU size in bytes for level 5.2 for single frame
#define MAX_MACROBLOCK_CAPACITY 5000 //Maximal legal MB capacity, 15000 bits is enough
--- a/codec/encoder/core/inc/mt_defs.h
+++ b/codec/encoder/core/inc/mt_defs.h
@@ -54,9 +54,9 @@
#define DYNAMIC_DETECT_CPU_CORES
-#define THRESHOLD_RMSE_CORE8 0.0320f // v1.1: 0.0320f; v1.0: 0.02f
-#define THRESHOLD_RMSE_CORE4 0.0215f // v1.1: 0.0215f; v1.0: 0.03f
-#define THRESHOLD_RMSE_CORE2 0.0200f // v1.1: 0.0200f; v1.0: 0.04f
+#define THRESHOLD_RMSE_CORE8 0.0320f // v1.1: 0.0320f; v1.0: 0.02f
+#define THRESHOLD_RMSE_CORE4 0.0215f // v1.1: 0.0215f; v1.0: 0.03f
+#define THRESHOLD_RMSE_CORE2 0.0200f // v1.1: 0.0200f; v1.0: 0.04f
typedef struct TagSliceThreadPrivateData {
void* pWelsPEncCtx;
--- a/codec/encoder/core/inc/rc.h
+++ b/codec/encoder/core/inc/rc.h
@@ -69,7 +69,7 @@
//qp information
GOM_MIN_QP_MODE = 12,
GOM_MAX_QP_MODE = 36,
- MAX_LOW_BR_QP = 42,
+ MAX_LOW_BR_QP = 42,
MIN_IDR_QP = 26,
MAX_IDR_QP = 32,
MIN_SCREEN_QP = 26,
--- a/codec/encoder/core/inc/svc_enc_slice_segment.h
+++ b/codec/encoder/core/inc/svc_enc_slice_segment.h
@@ -58,18 +58,18 @@
// in case MT and PACKING_ONE_SLICE_PER_LAYER, MAX_SLICES_NUM should not be exceeding MAX_LAYER_NUM_OF_FRAME
// for AVC cases, maximal resolution we can support up to (?x1024) for SM_ROWMB_SLICE slice mode
// fine solution for MAX_SLICES_NUM, need us use the variable instead of MACRO for any resolution combining any multiple-slice mode adaptive
-#define SAVED_NALUNIT_NUM ( (MAX_SPATIAL_LAYER_NUM*MAX_QUALITY_LAYER_NUM) + 1 + MAX_SPATIAL_LAYER_NUM ) // SPS/PPS + SEI/SSEI + PADDING_NAL
-#define MAX_SLICES_NUM ( ( MAX_NAL_UNITS_IN_LAYER - SAVED_NALUNIT_NUM ) / 3 ) // Also MAX_SLICES_NUM need constrained by implementation: uiSliceIdc allocated in SSliceCtx.pOverallMbMap need a byte range as expected
-#define AVERSLICENUM_CONSTRAINT (MAX_SLICES_NUM) // used in sNalList initialization,
+#define SAVED_NALUNIT_NUM ( (MAX_SPATIAL_LAYER_NUM*MAX_QUALITY_LAYER_NUM) + 1 + MAX_SPATIAL_LAYER_NUM ) // SPS/PPS + SEI/SSEI + PADDING_NAL
+#define MAX_SLICES_NUM ( ( MAX_NAL_UNITS_IN_LAYER - SAVED_NALUNIT_NUM ) / 3 ) // Also MAX_SLICES_NUM need constrained by implementation: uiSliceIdc allocated in SSliceCtx.pOverallMbMap need a byte range as expected
+#define AVERSLICENUM_CONSTRAINT (MAX_SLICES_NUM) // used in sNalList initialization,
-#define MIN_NUM_MB_PER_SLICE 48 // (128/16 * 96/16), addressing the lowest resolution for multiple slicing is 128x96 above
+#define MIN_NUM_MB_PER_SLICE 48 // (128/16 * 96/16), addressing the lowest resolution for multiple slicing is 128x96 above
-#define DEFAULT_MAXPACKETSIZE_CONSTRAINT (1200) //in bytes
-//#define MINPACKETSIZE_CONSTRAINT (1200)
+#define DEFAULT_MAXPACKETSIZE_CONSTRAINT (1200) //in bytes
+//#define MINPACKETSIZE_CONSTRAINT (1200)
-#define AVER_MARGIN_BYTES ( 100 ) //in bytes
-#define JUMPPACKETSIZE_CONSTRAINT(max_byte) ( max_byte - AVER_MARGIN_BYTES ) //in bytes
-#define JUMPPACKETSIZE_JUDGE(len,mb_idx,max_byte) ( (len) > JUMPPACKETSIZE_CONSTRAINT(max_byte) ) //( (mb_idx+1)%40/*16slice for compare*/ == 0 ) //
+#define AVER_MARGIN_BYTES ( 100 ) //in bytes
+#define JUMPPACKETSIZE_CONSTRAINT(max_byte) ( max_byte - AVER_MARGIN_BYTES ) //in bytes
+#define JUMPPACKETSIZE_JUDGE(len,mb_idx,max_byte) ( (len) > JUMPPACKETSIZE_CONSTRAINT(max_byte) ) //( (mb_idx+1)%40/*16slice for compare*/ == 0 ) //
//cur_mb_idx is for early tests, can be omit in optimization
/*!
--- a/codec/encoder/core/inc/wels_common_basis.h
+++ b/codec/encoder/core/inc/wels_common_basis.h
@@ -112,46 +112,46 @@
/* Transform Type */
enum ETransType {
- T_4x4 = 0,
- T_8x8 = 1,
- T_16x16 = 2,
- T_PCM = 3
+ T_4x4 = 0,
+ T_8x8 = 1,
+ T_16x16 = 2,
+ T_PCM = 3
};
enum EMbPosition {
- LEFT_MB_POS = 0x01, // A
- TOP_MB_POS = 0x02, // B
- TOPRIGHT_MB_POS = 0x04, // C
- TOPLEFT_MB_POS = 0x08, // D,
- RIGHT_MB_POS = 0x10, // add followed four case to reuse when intra up-sample
- BOTTOM_MB_POS = 0x20, //
- BOTTOMRIGHT_MB_POS = 0x40, //
- BOTTOMLEFT_MB_POS = 0x80, //
- MB_POS_A = 0x100
+ LEFT_MB_POS = 0x01, // A
+ TOP_MB_POS = 0x02, // B
+ TOPRIGHT_MB_POS = 0x04, // C
+ TOPLEFT_MB_POS = 0x08, // D,
+ RIGHT_MB_POS = 0x10, // add followed four case to reuse when intra up-sample
+ BOTTOM_MB_POS = 0x20, //
+ BOTTOMRIGHT_MB_POS = 0x40, //
+ BOTTOMLEFT_MB_POS = 0x80, //
+ MB_POS_A = 0x100
};
/* MB Type & Sub-MB Type */
typedef uint32_t Mb_Type;
-#define MB_LEFT_BIT 0// add to use in intra up-sample
-#define MB_TOP_BIT 1
-#define MB_TOPRIGHT_BIT 2
-#define MB_TOPLEFT_BIT 3
-#define MB_RIGHT_BIT 4
-#define MB_BOTTOM_BIT 5
-#define MB_BTMRIGHT_BIT 6
-#define MB_BTMLEFT_BIT 7
+#define MB_LEFT_BIT 0// add to use in intra up-sample
+#define MB_TOP_BIT 1
+#define MB_TOPRIGHT_BIT 2
+#define MB_TOPLEFT_BIT 3
+#define MB_RIGHT_BIT 4
+#define MB_BOTTOM_BIT 5
+#define MB_BTMRIGHT_BIT 6
+#define MB_BTMLEFT_BIT 7
-#define MB_TYPE_BACKGROUND 0x00010000 // conditional BG skip_mb
+#define MB_TYPE_BACKGROUND 0x00010000 // conditional BG skip_mb
enum {
- Intra4x4 = 0,
- Intra16x16 = 1,
- Inter16x16 = 2,
- Inter16x8 = 3,
- Inter8x16 = 4,
- Inter8x8 = 5,
- PSkip = 6
+ Intra4x4 = 0,
+ Intra16x16 = 1,
+ Inter16x16 = 2,
+ Inter16x8 = 3,
+ Inter8x16 = 4,
+ Inter8x8 = 5,
+ PSkip = 6
};
--- a/codec/encoder/core/inc/wels_const.h
+++ b/codec/encoder/core/inc/wels_const.h
@@ -45,105 +45,105 @@
#define STATISTICS_LOG_INTERVAL_MS (5000) // output statistics log every 5s
-#define INTRA_4x4_MODE_NUM 8
-#define MB_LUMA_CHROMA_BLOCK4x4_NUM 24
+#define INTRA_4x4_MODE_NUM 8
+#define MB_LUMA_CHROMA_BLOCK4x4_NUM 24
#define MAX_PPS_COUNT_LIMITED 57// limit the max ID of PPS because of known limitation of receiver endpoints
-#define MAX_PPS_COUNT (MAX_PPS_COUNT_LIMITED)//in Standard is 256 // Count number of PPS
+#define MAX_PPS_COUNT (MAX_PPS_COUNT_LIMITED)//in Standard is 256 // Count number of PPS
-#define PARA_SET_TYPE 3 // SPS+PPS
-#define PARA_SET_TYPE_AVCSPS 0
+#define PARA_SET_TYPE 3 // SPS+PPS
+#define PARA_SET_TYPE_AVCSPS 0
#define PARA_SET_TYPE_SUBSETSPS 1
-#define PARA_SET_TYPE_PPS 2
+#define PARA_SET_TYPE_PPS 2
-#define MAX_VERTICAL_MV_RANGE 1024 //TODO, for allocate enough memory for transpose
-#define MAX_FRAME_RATE 60 // maximal frame rate to support
-#define MIN_FRAME_RATE 1 // minimal frame rate need support
+#define MAX_VERTICAL_MV_RANGE 1024 //TODO, for allocate enough memory for transpose
+#define MAX_FRAME_RATE 60 // maximal frame rate to support
+#define MIN_FRAME_RATE 1 // minimal frame rate need support
-#define MAX_BIT_RATE INT_MAX // maximal bit rate to support
+#define MAX_BIT_RATE INT_MAX // maximal bit rate to support
//TODO {Sijia}: 30fps*MaxCPB in level5.1 = 30*240000*1000bits = 7 200 000 000, larger than INT_MAX which is 2147483647, but this is also very big and abnormal number, should figure out a reasonable number after discussion
-#define MIN_BIT_RATE 1 // minimal bit rate need support
+#define MIN_BIT_RATE 1 // minimal bit rate need support
-#define SVC_QUALITY_BASE_QP 26
-#define MAX_SLICEGROUP_IDS 8 // Count number of SSlice Groups
-#define MAX_THREADS_NUM 4 // assume to support up to 4 logical cores(threads)
+#define SVC_QUALITY_BASE_QP 26
+#define MAX_SLICEGROUP_IDS 8 // Count number of SSlice Groups
+#define MAX_THREADS_NUM 4 // assume to support up to 4 logical cores(threads)
-#define INTPEL_NEEDED_MARGIN (3) // for safe sub-pel MC
+#define INTPEL_NEEDED_MARGIN (3) // for safe sub-pel MC
-#define I420_PLANES 3
+#define I420_PLANES 3
-#define COMPRESS_RATIO_THR (1.0f) //set to size of the original data, which will be large enough considering MinCR
+#define COMPRESS_RATIO_THR (1.0f) //set to size of the original data, which will be large enough considering MinCR
#if !defined(SSEI_BUFFER_SIZE)
-#define SSEI_BUFFER_SIZE 128
+#define SSEI_BUFFER_SIZE 128
#endif//SSEI_BUFFER_SIZE
#if !defined(SPS_BUFFER_SIZE)
-#define SPS_BUFFER_SIZE 32
+#define SPS_BUFFER_SIZE 32
#endif//SPS_BUFFER_SIZE
#if !defined(PPS_BUFFER_SIZE)
-#define PPS_BUFFER_SIZE 16
+#define PPS_BUFFER_SIZE 16
#endif//PPS_BUFFER_SIZE
#if !defined(MAX_MACROBLOCK_SIZE_IN_BYTE)
-#define MAX_MACROBLOCK_SIZE_IN_BYTE 400 //3200/8, 3200 is from Annex A.3.1.(n)
+#define MAX_MACROBLOCK_SIZE_IN_BYTE 400 //3200/8, 3200 is from Annex A.3.1.(n)
#endif
#define MAX_MACROBLOCK_SIZE_IN_BYTE_x2 (MAX_MACROBLOCK_SIZE_IN_BYTE<<1)
#if defined(NUM_SPATIAL_LAYERS_CONSTRAINT)
-#define MAX_DEPENDENCY_LAYER MAX_SPATIAL_LAYER_NUM // Maximal dependency layer
+#define MAX_DEPENDENCY_LAYER MAX_SPATIAL_LAYER_NUM // Maximal dependency layer
#else
-#define MAX_DEPENDENCY_LAYER 8 // Maximal dependency layer
+#define MAX_DEPENDENCY_LAYER 8 // Maximal dependency layer
#endif//NUM_SPATIAL_LAYERS_CONSTRAINT
//The max temporal level support is equal or less than MAX_TEMPORAL_LAYER_NUM defined @ codec_app_def.h
-#define MAX_TEMPORAL_LEVEL MAX_TEMPORAL_LAYER_NUM // Maximal temporal level
+#define MAX_TEMPORAL_LEVEL MAX_TEMPORAL_LAYER_NUM // Maximal temporal level
#if defined(NUM_QUALITY_LAYERS_CONSTRAINT)
-#define MAX_QUALITY_LEVEL MAX_QUALITY_LAYER_NUM // Maximal quality level
+#define MAX_QUALITY_LEVEL MAX_QUALITY_LAYER_NUM // Maximal quality level
#else
-#define MAX_QUALITY_LEVEL 16 // Maximal quality level
+#define MAX_QUALITY_LEVEL 16 // Maximal quality level
#endif//NUM_QUALITY_LAYERS_CONSTRAINT
#if defined(MAX_GOP_SIZE)
#undef MAX_GOP_SIZE
#endif//MAX_GOP_SIZE
-#define MAX_GOP_SIZE (1<<(MAX_TEMPORAL_LEVEL-1))
+#define MAX_GOP_SIZE (1<<(MAX_TEMPORAL_LEVEL-1))
-#define MAX_SHORT_REF_COUNT (MAX_GOP_SIZE>>1) // 16 in standard, maximal count number of short reference pictures
-#define LONG_TERM_REF_NUM 2
-#define LONG_TERM_REF_NUM_SCREEN 4
-#define MAX_REF_PIC_COUNT 16 // 32 in standard, maximal Short + Long reference pictures
-#define MIN_REF_PIC_COUNT 1 // minimal count number of reference pictures, 1 short + 2 key reference based?
-#define MAX_MULTI_REF_PIC_COUNT 1 //maximum multi-reference number
-//#define TOTAL_REF_MINUS_HALF_GOP 1 // last t0 in last gop
-#define MAX_MMCO_COUNT 66
+#define MAX_SHORT_REF_COUNT (MAX_GOP_SIZE>>1) // 16 in standard, maximal count number of short reference pictures
+#define LONG_TERM_REF_NUM 2
+#define LONG_TERM_REF_NUM_SCREEN 4
+#define MAX_REF_PIC_COUNT 16 // 32 in standard, maximal Short + Long reference pictures
+#define MIN_REF_PIC_COUNT 1 // minimal count number of reference pictures, 1 short + 2 key reference based?
+#define MAX_MULTI_REF_PIC_COUNT 1 //maximum multi-reference number
+//#define TOTAL_REF_MINUS_HALF_GOP 1 // last t0 in last gop
+#define MAX_MMCO_COUNT 66
// adjusted numbers reference picture functionality related definition
-#define MAX_REFERENCE_MMCO_COUNT_NUM 4 // adjusted MAX_MMCO_COUNT(66 in standard) definition per encoder design
-#define MAX_REFERENCE_REORDER_COUNT_NUM 2 // adjusted MAX_REF_PIC_COUNT(32 in standard) for reference reordering definition per encoder design
-#define MAX_REFERENCE_PICTURE_COUNT_NUM_CAMERA (MAX_SHORT_REF_COUNT+LONG_TERM_REF_NUM) // <= MAX_REF_PIC_COUNT, memory saved if <
-#define MAX_REFERENCE_PICTURE_COUNT_NUM_SCREEN (MAX_SHORT_REF_COUNT+LONG_TERM_REF_NUM_SCREEN) // <= MAX_REF_PIC_COUNT, memory saved if <
+#define MAX_REFERENCE_MMCO_COUNT_NUM 4 // adjusted MAX_MMCO_COUNT(66 in standard) definition per encoder design
+#define MAX_REFERENCE_REORDER_COUNT_NUM 2 // adjusted MAX_REF_PIC_COUNT(32 in standard) for reference reordering definition per encoder design
+#define MAX_REFERENCE_PICTURE_COUNT_NUM_CAMERA (MAX_SHORT_REF_COUNT+LONG_TERM_REF_NUM) // <= MAX_REF_PIC_COUNT, memory saved if <
+#define MAX_REFERENCE_PICTURE_COUNT_NUM_SCREEN (MAX_SHORT_REF_COUNT+LONG_TERM_REF_NUM_SCREEN) // <= MAX_REF_PIC_COUNT, memory saved if <
-#define BASE_DEPENDENCY_ID 0
-#define MAX_DQ_LAYER_NUM (MAX_DEPENDENCY_LAYER/**MAX_QUALITY_LEVEL*/)
+#define BASE_DEPENDENCY_ID 0
+#define MAX_DQ_LAYER_NUM (MAX_DEPENDENCY_LAYER/**MAX_QUALITY_LEVEL*/)
-#define INVALID_ID (-1)
+#define INVALID_ID (-1)
-#define NAL_HEADER_ADD_0X30BYTES 50
+#define NAL_HEADER_ADD_0X30BYTES 50
-#define SLICE_NUM_EXPAND_COEF 2
+#define SLICE_NUM_EXPAND_COEF 2
enum {
-BLOCK_16x16 = 0,
-BLOCK_16x8 = 1,
-BLOCK_8x16 = 2,
-BLOCK_8x8 = 3,
-BLOCK_4x4 = 4,
-// BLOCK_8x4 = 5,
-// BLOCK_4x8 = 6,
+BLOCK_16x16 = 0,
+BLOCK_16x8 = 1,
+BLOCK_8x16 = 2,
+BLOCK_8x8 = 3,
+BLOCK_4x4 = 4,
+// BLOCK_8x4 = 5,
+// BLOCK_4x8 = 6,
BLOCK_SIZE_ALL = 5
};
@@ -154,8 +154,8 @@
} LTR_MARKING_RECEIVE_STATE;
enum {
- CUR_AU_IDX = 0, // index symbol for current access unit
- SUC_AU_IDX = 1 // index symbol for successive access unit
+ CUR_AU_IDX = 0, // index symbol for current access unit
+ SUC_AU_IDX = 1 // index symbol for successive access unit
};
enum {
--- a/codec/encoder/core/src/property.cpp
+++ b/codec/encoder/core/src/property.cpp
@@ -40,17 +40,17 @@
#include "property.h"
#include "crt_util_safe_x.h" // Safe CRT routines like utils for cross_platforms
namespace WelsEnc {
-#define WELS_CODE_NAME "Wels"
-#define WELS_LIB_NAME "Encoder"
+#define WELS_CODE_NAME "Wels"
+#define WELS_LIB_NAME "Encoder"
-#define WELS_VERSION_INT 0x000001 // v 0.0.1
-#define WELS_VERSION_STR "0.0.1"
+#define WELS_VERSION_INT 0x000001 // v 0.0.1
+#define WELS_VERSION_STR "0.0.1"
-#define WELS_BUILD_NUM "090420" // yymmdd
+#define WELS_BUILD_NUM "090420" // yymmdd
//////////////summary information//////////////
-#define WELS_IDENT WELS_CODE_NAME WELS_LIB_NAME "v" WELS_VERSION_STR "b" WELS_BUILD_NUM
+#define WELS_IDENT WELS_CODE_NAME WELS_LIB_NAME "v" WELS_VERSION_STR "b" WELS_BUILD_NUM
/*!
* \brief get code name
--- a/codec/processing/interface/IWelsVP.h
+++ b/codec/processing/interface/IWelsVP.h
@@ -56,9 +56,9 @@
RET_FAILED = -1,
RET_INVALIDPARAM = -2,
RET_OUTOFMEMORY = -3,
- RET_NOTSUPPORTED = -4,
+ RET_NOTSUPPORTED = -4,
RET_UNEXPECTED = -5,
- RET_NEEDREINIT = -6
+ RET_NEEDREINIT = -6
} EResult;
typedef enum {
@@ -80,7 +80,7 @@
VIDEO_FORMAT_I420 = 23, /* yuv 4:2:0 planar */
VIDEO_FORMAT_YV12 = 24, /* yuv 4:2:0 planar */
VIDEO_FORMAT_INTERNAL = 25, /* Only Used for SVC decoder testbed */
- VIDEO_FORMAT_NV12 = 26, /* y planar + uv packed */
+ VIDEO_FORMAT_NV12 = 26, /* y planar + uv packed */
VIDEO_FORMAT_I422 = 27, /* yuv 4:2:2 planar */
VIDEO_FORMAT_I444 = 28, /* yuv 4:4:4 planar */
VIDEO_FORMAT_YUYV = 20, /* yuv 4:2:2 packed */
@@ -124,13 +124,13 @@
METHOD_DENOISE ,
METHOD_SCENE_CHANGE_DETECTION_VIDEO ,
METHOD_SCENE_CHANGE_DETECTION_SCREEN ,
- METHOD_DOWNSAMPLE ,
+ METHOD_DOWNSAMPLE ,
METHOD_VAA_STATISTICS ,
METHOD_BACKGROUND_DETECTION ,
METHOD_ADAPTIVE_QUANT ,
METHOD_COMPLEXITY_ANALYSIS ,
METHOD_COMPLEXITY_ANALYSIS_SCREEN,
- METHOD_IMAGE_ROTATE ,
+ METHOD_IMAGE_ROTATE ,
METHOD_SCROLL_DETECTION,
METHOD_MASK
} EMethods;
--- a/codec/processing/src/backgrounddetection/BackgroundDetection.cpp
+++ b/codec/processing/src/backgrounddetection/BackgroundDetection.cpp
@@ -39,16 +39,16 @@
#define BGD_OU_SIZE (1<<LOG2_BGD_OU_SIZE)
#define BGD_OU_SIZE_UV (BGD_OU_SIZE>>1)
#define BGD_THD_SAD (2*BGD_OU_SIZE*BGD_OU_SIZE)
-#define BGD_THD_ASD_UV (4*BGD_OU_SIZE_UV)
+#define BGD_THD_ASD_UV (4*BGD_OU_SIZE_UV)
#define LOG2_MB_SIZE (4)
#define OU_SIZE_IN_MB (BGD_OU_SIZE >> 4)
#define Q_FACTOR (8)
#define BGD_DELTA_QP_THD (3)
-#define OU_LEFT (0x01)
-#define OU_RIGHT (0x02)
-#define OU_TOP (0x04)
-#define OU_BOTTOM (0x08)
+#define OU_LEFT (0x01)
+#define OU_RIGHT (0x02)
+#define OU_TOP (0x04)
+#define OU_BOTTOM (0x08)
CBackgroundDetection::CBackgroundDetection (int32_t iCpuFlag) {
m_eMethod = METHOD_BACKGROUND_DETECTION;
--- a/codec/processing/src/common/util.h
+++ b/codec/processing/src/common/util.h
@@ -58,16 +58,16 @@
#define MAX_HEIGHT (2304)//MAX_FS_LEVEL51 (36864); MAX_FS_LEVEL51*256/4096 = 2304
#define MB_WIDTH_LUMA (16)
-#define PESN (1e-6) // desired float precision
+#define PESN (1e-6) // desired float precision
#define AQ_INT_MULTIPLY 10000000
#define AQ_TIME_INT_MULTIPLY 10000
#define AQ_QSTEP_INT_MULTIPLY 100
#define AQ_PESN 10 // (1e-6)*AQ_INT_MULTIPLY
-#define MB_TYPE_INTRA4x4 0x00000001
-#define MB_TYPE_INTRA16x16 0x00000002
-#define MB_TYPE_INTRA_PCM 0x00000004
-#define MB_TYPE_INTRA (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA_PCM)
+#define MB_TYPE_INTRA4x4 0x00000001
+#define MB_TYPE_INTRA16x16 0x00000002
+#define MB_TYPE_INTRA_PCM 0x00000004
+#define MB_TYPE_INTRA (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA_PCM)
#define IS_INTRA(type) ((type)&MB_TYPE_INTRA)
#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
--- a/codec/processing/src/denoise/denoise.h
+++ b/codec/processing/src/denoise/denoise.h
@@ -52,7 +52,7 @@
#define DENOISE_GRAY_SIGMA (2)
#define UV_WINDOWS_RADIUS (2)
-#define TAIL_OF_LINE8 (7)
+#define TAIL_OF_LINE8 (7)
#define DENOISE_Y_COMPONENT (1)
#define DENOISE_U_COMPONENT (2)