summaryrefslogtreecommitdiff
path: root/libavcodec/libpostproc
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/libpostproc')
-rw-r--r--libavcodec/libpostproc/postprocess.c36
-rw-r--r--libavcodec/libpostproc/postprocess.h2
-rw-r--r--libavcodec/libpostproc/postprocess_altivec_template.c78
-rw-r--r--libavcodec/libpostproc/postprocess_internal.h8
-rw-r--r--libavcodec/libpostproc/postprocess_template.c42
5 files changed, 83 insertions, 83 deletions
diff --git a/libavcodec/libpostproc/postprocess.c b/libavcodec/libpostproc/postprocess.c
index 9f3e522ed1..21ee6f6a6e 100644
--- a/libavcodec/libpostproc/postprocess.c
+++ b/libavcodec/libpostproc/postprocess.c
@@ -22,7 +22,7 @@
* @file postprocess.c
* postprocessing.
*/
-
+
/*
C MMX MMX2 3DNow AltiVec
isVertDC Ec Ec Ec
@@ -267,7 +267,7 @@ static inline int isHorizMinMaxOk_C(uint8_t src[], int stride, int QP)
if((unsigned)(src[6] - src[3] + 2*QP) > 4*QP) return 0;
src += stride;
}
-#else
+#else
for(i=0; i<8; i++){
if((unsigned)(src[0] - src[7] + 2*QP) > 4*QP) return 0;
src += stride;
@@ -503,7 +503,7 @@ static always_inline void do_a_deblock_C(uint8_t *src, int step, int stride, PPC
if(((unsigned)(src[ 7*step] - src[8*step] + dcOffset)) < dcThreshold) numEq++;
if(numEq > c->ppMode.flatnessThreshold){
int min, max, x;
-
+
if(src[0] > src[step]){
max= src[0];
min= src[step];
@@ -523,7 +523,7 @@ static always_inline void do_a_deblock_C(uint8_t *src, int step, int stride, PPC
if(max-min < 2*QP){
const int first= ABS(src[-1*step] - src[0]) < QP ? src[-1*step] : src[0];
const int last= ABS(src[8*step] - src[7*step]) < QP ? src[8*step] : src[7*step];
-
+
int sums[10];
sums[0] = 4*first + src[0*step] + src[1*step] + src[2*step] + 4;
sums[1] = sums[0] - first + src[3*step];
@@ -556,10 +556,10 @@ static always_inline void do_a_deblock_C(uint8_t *src, int step, int stride, PPC
int d= ABS(middleEnergy) - MIN( ABS(leftEnergy), ABS(rightEnergy) );
d= MAX(d, 0);
-
+
d= (5*d + 32) >> 6;
d*= SIGN(-middleEnergy);
-
+
if(q>0)
{
d= d<0 ? 0 : d;
@@ -570,7 +570,7 @@ static always_inline void do_a_deblock_C(uint8_t *src, int step, int stride, PPC
d= d>0 ? 0 : d;
d= d<q ? q : d;
}
-
+
src[3*step]-= d;
src[4*step]+= d;
}
@@ -771,7 +771,7 @@ pp_mode_t *pp_get_mode_by_name_and_quality(char *name, int quality)
char *filterToken;
ppMode= memalign(8, sizeof(PPMode));
-
+
ppMode->lumMode= 0;
ppMode->chromMode= 0;
ppMode->maxTmpNoise[0]= 700;
@@ -907,7 +907,7 @@ pp_mode_t *pp_get_mode_by_name_and_quality(char *name, int quality)
}
}
}
- else if(filters[i].mask == V_DEBLOCK || filters[i].mask == H_DEBLOCK
+ else if(filters[i].mask == V_DEBLOCK || filters[i].mask == H_DEBLOCK
|| filters[i].mask == V_A_DEBLOCK || filters[i].mask == H_A_DEBLOCK)
{
int o;
@@ -1004,7 +1004,7 @@ pp_context_t *pp_get_context(int width, int height, int cpuCaps){
PPContext *c= memalign(32, sizeof(PPContext));
int stride= (width+15)&(~15); //assumed / will realloc if needed
int qpStride= (width+15)/16 + 2; //assumed / will realloc if needed
-
+
global_init();
memset(c, 0, sizeof(PPContext));
@@ -1018,7 +1018,7 @@ pp_context_t *pp_get_context(int width, int height, int cpuCaps){
}
reallocBuffers(c, width, height, stride, qpStride);
-
+
c->frameNum=-1;
return c;
@@ -1027,10 +1027,10 @@ pp_context_t *pp_get_context(int width, int height, int cpuCaps){
void pp_free_context(void *vc){
PPContext *c = (PPContext*)vc;
int i;
-
+
for(i=0; i<3; i++) free(c->tempBlured[i]);
for(i=0; i<3; i++) free(c->tempBluredPast[i]);
-
+
free(c->tempBlocks);
free(c->yHistogram);
free(c->tempDst);
@@ -1039,7 +1039,7 @@ void pp_free_context(void *vc){
free(c->stdQPTable);
free(c->nonBQPTable);
free(c->forcedQPTable);
-
+
memset(c, 0, sizeof(PPContext));
free(c);
@@ -1060,11 +1060,11 @@ void pp_postprocess(uint8_t * src[3], int srcStride[3],
// c->stride and c->QPStride are always positive
if(c->stride < minStride || c->qpStride < absQPStride)
- reallocBuffers(c, width, height,
- MAX(minStride, c->stride),
+ reallocBuffers(c, width, height,
+ MAX(minStride, c->stride),
MAX(c->qpStride, absQPStride));
- if(QP_store==NULL || (mode->lumMode & FORCE_QUANT))
+ if(QP_store==NULL || (mode->lumMode & FORCE_QUANT))
{
int i;
QP_store= c->forcedQPTable;
@@ -1086,7 +1086,7 @@ void pp_postprocess(uint8_t * src[3], int srcStride[3],
c->stdQPTable[i] = QP_store[i]>>1;
}
QP_store= c->stdQPTable;
- QPStride= absQPStride;
+ QPStride= absQPStride;
}
if(0){
diff --git a/libavcodec/libpostproc/postprocess.h b/libavcodec/libpostproc/postprocess.h
index b5d4fa319d..539ea1e181 100644
--- a/libavcodec/libpostproc/postprocess.h
+++ b/libavcodec/libpostproc/postprocess.h
@@ -21,7 +21,7 @@
/**
* @file postprocess.h
- * @brief
+ * @brief
* external api for the pp stuff
*/
diff --git a/libavcodec/libpostproc/postprocess_altivec_template.c b/libavcodec/libpostproc/postprocess_altivec_template.c
index 1c59b94656..5c431c89d9 100644
--- a/libavcodec/libpostproc/postprocess_altivec_template.c
+++ b/libavcodec/libpostproc/postprocess_altivec_template.c
@@ -79,7 +79,7 @@ static inline int vertClassify_altivec(uint8_t src[], int stride, PPContext *c)
const vector signed int zero = vec_splat_s32(0);
const vector signed short mask = vec_splat_s16(1);
vector signed int v_numEq = vec_splat_s32(0);
-
+
data[0] = ((c->nonBQP*c->ppMode.baseDcDiff)>>8) + 1;
data[1] = data[0] * 2 + 1;
data[2] = c->QP * 2;
@@ -160,7 +160,7 @@ static inline int vertClassify_altivec(uint8_t src[], int stride, PPContext *c)
#undef ITER
v_numEq = vec_sums(v_numEq, zero);
-
+
v_numEq = vec_splat(v_numEq, 3);
vec_ste(v_numEq, 0, &numEq);
@@ -174,7 +174,7 @@ static inline int vertClassify_altivec(uint8_t src[], int stride, PPContext *c)
0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f);
const vector unsigned char mmoP = (const vector unsigned char)
vec_lvsl(8, (unsigned char*)0);
-
+
vector signed short mmoL1 = vec_perm(v_srcAss0, v_srcAss2, mmoP1);
vector signed short mmoL2 = vec_perm(v_srcAss4, v_srcAss6, mmoP2);
vector signed short mmoL = vec_perm(mmoL1, mmoL2, mmoP);
@@ -183,13 +183,13 @@ static inline int vertClassify_altivec(uint8_t src[], int stride, PPContext *c)
vector signed short mmoR = vec_perm(mmoR1, mmoR2, mmoP);
vector signed short mmoDiff = vec_sub(mmoL, mmoR);
vector unsigned short mmoSum = (vector unsigned short)vec_add(mmoDiff, v2QP);
-
+
if (vec_any_gt(mmoSum, v4QP))
return 0;
else
return 1;
}
- else return 2;
+ else return 2;
}
static inline void doVertLowPass_altivec(uint8_t *src, int stride, PPContext *c) {
@@ -209,14 +209,14 @@ static inline void doVertLowPass_altivec(uint8_t *src, int stride, PPContext *c)
qp[0] = c->QP;
vector signed short vqp = vec_ld(0, qp);
vqp = vec_splat(vqp, 0);
-
+
src2 += stride*3;
vector signed short vb0, vb1, vb2, vb3, vb4, vb5, vb6, vb7, vb8, vb9;
vector unsigned char vbA0, vbA1, vbA2, vbA3, vbA4, vbA5, vbA6, vbA7, vbA8, vbA9;
vector unsigned char vbB0, vbB1, vbB2, vbB3, vbB4, vbB5, vbB6, vbB7, vbB8, vbB9;
vector unsigned char vbT0, vbT1, vbT2, vbT3, vbT4, vbT5, vbT6, vbT7, vbT8, vbT9;
-
+
#define LOAD_LINE(i) \
const vector unsigned char perml##i = \
vec_lvsl(i * stride, src2); \
@@ -275,7 +275,7 @@ static inline void doVertLowPass_altivec(uint8_t *src, int stride, PPContext *c)
const vector unsigned short v_cmp89 =
(const vector unsigned short) vec_cmplt(vec_abs(v_diff89), vqp);
const vector signed short v_last = vec_sel(vb8, vb9, v_cmp89);
-
+
const vector signed short temp01 = vec_mladd(v_first, (vector signed short)v_4, vb1);
const vector signed short temp02 = vec_add(vb2, vb3);
const vector signed short temp03 = vec_add(temp01, (vector signed short)v_4);
@@ -409,9 +409,9 @@ static inline void doVertDefFilter_altivec(uint8_t src[], int stride, PPContext
const vector signed short vb##i = \
(vector signed short)vec_mergeh((vector unsigned char)zero, \
(vector unsigned char)vbT##i)
-
+
src2 += stride*3;
-
+
LOAD_LINE(1);
LOAD_LINE(2);
LOAD_LINE(3);
@@ -421,7 +421,7 @@ static inline void doVertDefFilter_altivec(uint8_t src[], int stride, PPContext
LOAD_LINE(7);
LOAD_LINE(8);
#undef LOAD_LINE
-
+
const vector signed short v_1 = vec_splat_s16(1);
const vector signed short v_2 = vec_splat_s16(2);
const vector signed short v_5 = vec_splat_s16(5);
@@ -480,11 +480,11 @@ static inline void doVertDefFilter_altivec(uint8_t src[], int stride, PPContext
/* finally, stores */
const vector unsigned char st4 = vec_packsu(vb4minusd, (vector signed short)zero);
const vector unsigned char st5 = vec_packsu(vb5plusd, (vector signed short)zero);
-
+
const vector signed char neg1 = vec_splat_s8(-1);
const vector unsigned char permHH = (const vector unsigned char)AVV(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F);
-
+
#define STORE(i) \
const vector unsigned char perms##i = \
vec_lvsr(i * stride, src2); \
@@ -500,7 +500,7 @@ static inline void doVertDefFilter_altivec(uint8_t src[], int stride, PPContext
vec_sel(vg2##i, vbB##i, mask##i); \
vec_st(svA##i, i * stride, src2); \
vec_st(svB##i, i * stride + 16, src2)
-
+
STORE(4);
STORE(5);
}
@@ -528,7 +528,7 @@ static inline void dering_altivec(uint8_t src[], int stride, PPContext *c) {
vector unsigned char sA##i = vec_ld(i * stride, srcCopy); \
vector unsigned char sB##i = vec_ld(i * stride + 16, srcCopy); \
vector unsigned char src##i = vec_perm(sA##i, sB##i, perm##i)
-
+
LOAD_LINE(0);
LOAD_LINE(1);
LOAD_LINE(2);
@@ -550,7 +550,7 @@ static inline void dering_altivec(uint8_t src[], int stride, PPContext *c) {
const vector unsigned char trunc_src34 = vec_perm(src3, src4, trunc_perm);
const vector unsigned char trunc_src56 = vec_perm(src5, src6, trunc_perm);
const vector unsigned char trunc_src78 = vec_perm(src7, src8, trunc_perm);
-
+
#define EXTRACT(op) do { \
const vector unsigned char s##op##_1 = vec_##op(trunc_src12, trunc_src34); \
const vector unsigned char s##op##_2 = vec_##op(trunc_src56, trunc_src78); \
@@ -567,19 +567,19 @@ static inline void dering_altivec(uint8_t src[], int stride, PPContext *c) {
const vector unsigned char s##op##_11h = vec_mergeh(s##op##_11, s##op##_11); \
const vector unsigned char s##op##_11l = vec_mergel(s##op##_11, s##op##_11); \
v_##op = vec_##op(s##op##_11h, s##op##_11l); } while (0)
-
+
vector unsigned char v_min;
vector unsigned char v_max;
EXTRACT(min);
EXTRACT(max);
#undef EXTRACT
-
+
if (vec_all_lt(vec_sub(v_max, v_min), v_dt))
return;
-
+
v_avg = vec_avg(v_min, v_max);
}
-
+
signed int __attribute__((aligned(16))) S[8];
{
const vector unsigned short mask1 = (vector unsigned short)
@@ -588,10 +588,10 @@ static inline void dering_altivec(uint8_t src[], int stride, PPContext *c) {
const vector unsigned short mask2 = (vector unsigned short)
AVV(0x0100, 0x0200, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000);
-
+
const vector unsigned int vuint32_16 = vec_sl(vec_splat_u32(1), vec_splat_u32(4));
const vector unsigned int vuint32_1 = vec_splat_u32(1);
-
+
#define COMPARE(i) \
vector signed int sum##i; \
do { \
@@ -608,7 +608,7 @@ static inline void dering_altivec(uint8_t src[], int stride, PPContext *c) {
const vector signed int sump##i = vec_sum4s(cmpHf##i, zero); \
const vector signed int sumq##i = vec_sum4s(cmpLf##i, sump##i); \
sum##i = vec_sums(sumq##i, zero); } while (0)
-
+
COMPARE(0);
COMPARE(1);
COMPARE(2);
@@ -620,22 +620,22 @@ static inline void dering_altivec(uint8_t src[], int stride, PPContext *c) {
COMPARE(8);
COMPARE(9);
#undef COMPARE
-
+
vector signed int sumA2;
vector signed int sumB2;
{
const vector signed int sump02 = vec_mergel(sum0, sum2);
const vector signed int sump13 = vec_mergel(sum1, sum3);
const vector signed int sumA = vec_mergel(sump02, sump13);
-
+
const vector signed int sump46 = vec_mergel(sum4, sum6);
const vector signed int sump57 = vec_mergel(sum5, sum7);
const vector signed int sumB = vec_mergel(sump46, sump57);
-
+
const vector signed int sump8A = vec_mergel(sum8, zero);
const vector signed int sump9B = vec_mergel(sum9, zero);
const vector signed int sumC = vec_mergel(sump8A, sump9B);
-
+
const vector signed int tA = vec_sl(vec_nor(zero, sumA), vuint32_16);
const vector signed int tB = vec_sl(vec_nor(zero, sumB), vuint32_16);
const vector signed int tC = vec_sl(vec_nor(zero, sumC), vuint32_16);
@@ -651,7 +651,7 @@ static inline void dering_altivec(uint8_t src[], int stride, PPContext *c) {
const vector signed int yA = vec_and(t2A, t3A);
const vector signed int yB = vec_and(t2B, t3B);
const vector signed int yC = vec_and(t2C, t3C);
-
+
const vector unsigned char strangeperm1 = vec_lvsl(4, (unsigned char*)0);
const vector unsigned char strangeperm2 = vec_lvsl(8, (unsigned char*)0);
const vector signed int sumAd4 = vec_perm(yA, yB, strangeperm1);
@@ -668,14 +668,14 @@ static inline void dering_altivec(uint8_t src[], int stride, PPContext *c) {
sumB2 = vec_or(sumBp,
vec_sra(sumBp,
vuint32_16));
- }
+ }
vec_st(sumA2, 0, S);
vec_st(sumB2, 16, S);
}
/* I'm not sure the following is actually faster
than straight, unvectorized C code :-( */
-
+
int __attribute__((aligned(16))) tQP2[4];
tQP2[0]= c->QP/2 + 1;
vector signed int vQP2 = vec_ld(0, tQP2);
@@ -776,7 +776,7 @@ static inline void dering_altivec(uint8_t src[], int stride, PPContext *c) {
ITER(7, 8, 9);
const vector signed char neg1 = vec_splat_s8(-1);
-
+
#define STORE_LINE(i) \
const vector unsigned char permST##i = \
vec_lvsr(i * stride, srcCopy); \
@@ -788,7 +788,7 @@ static inline void dering_altivec(uint8_t src[], int stride, PPContext *c) {
sB##i= vec_sel(src##i, sB##i, maskST##i); \
vec_st(sA##i, i * stride, srcCopy); \
vec_st(sB##i, i * stride + 16, srcCopy)
-
+
STORE_LINE(1);
STORE_LINE(2);
STORE_LINE(3);
@@ -815,7 +815,7 @@ static inline void RENAME(tempNoiseReducer)(uint8_t *src, int stride,
vector signed int v_dp = zero;
vector signed int v_sysdp = zero;
int d, sysd, i;
-
+
tempBluredPast[127]= maxNoise[0];
tempBluredPast[128]= maxNoise[1];
tempBluredPast[129]= maxNoise[2];
@@ -830,7 +830,7 @@ static inline void RENAME(tempNoiseReducer)(uint8_t *src, int stride,
vector signed short v_##src##Ass##i = \
(vector signed short)vec_mergeh((vector signed char)zero, \
(vector signed char)v_##src##A##i)
-
+
LOAD_LINE(src, 0);
LOAD_LINE(src, 1);
LOAD_LINE(src, 2);
@@ -871,7 +871,7 @@ static inline void RENAME(tempNoiseReducer)(uint8_t *src, int stride,
v_dp = vec_splat(v_dp, 3);
v_sysdp = vec_splat(v_sysdp, 3);
-
+
vec_ste(v_dp, 0, &d);
vec_ste(v_sysdp, 0, &sysd);
@@ -915,7 +915,7 @@ static inline void RENAME(tempNoiseReducer)(uint8_t *src, int stride,
const vector signed short vsint16_7 = vec_splat_s16(7);
const vector signed short vsint16_4 = vec_splat_s16(4);
const vector unsigned short vuint16_3 = vec_splat_u16(3);
-
+
#define OP(i) \
const vector signed short v_temp##i = \
vec_mladd(v_tempBluredAss##i, \
@@ -936,7 +936,7 @@ static inline void RENAME(tempNoiseReducer)(uint8_t *src, int stride,
} else {
const vector signed short vsint16_3 = vec_splat_s16(3);
const vector signed short vsint16_2 = vec_splat_s16(2);
-
+
#define OP(i) \
const vector signed short v_temp##i = \
vec_mladd(v_tempBluredAss##i, \
@@ -1010,7 +1010,7 @@ static inline void transpose_16x8_char_toPackedAlign_altivec(unsigned char* dst,
vector unsigned char srcD##i = vec_ld(j * stride+ 16, src); \
vector unsigned char src##i = vec_perm(srcA##i, srcB##i, perm1##i); \
vector unsigned char src##j = vec_perm(srcC##i, srcD##i, perm2##i)
-
+
LOAD_DOUBLE_LINE(0, 1);
LOAD_DOUBLE_LINE(2, 3);
LOAD_DOUBLE_LINE(4, 5);
@@ -1108,7 +1108,7 @@ static inline void transpose_8x16_char_fromPackedAlign_altivec(unsigned char* ds
const vector unsigned char magic_perm = (const vector unsigned char)
AVV(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F);
-
+
#define LOAD_DOUBLE_LINE(i, j) \
vector unsigned char src##i = vec_ld(i * 16, src); \
vector unsigned char src##j = vec_ld(j * 16, src)
diff --git a/libavcodec/libpostproc/postprocess_internal.h b/libavcodec/libpostproc/postprocess_internal.h
index 01d4679adb..f72dc05cd4 100644
--- a/libavcodec/libpostproc/postprocess_internal.h
+++ b/libavcodec/libpostproc/postprocess_internal.h
@@ -114,7 +114,7 @@ typedef struct PPContext{
uint8_t *tempBlocks; ///<used for the horizontal code
/**
- * luma histogram.
+ * luma histogram.
* we need 64bit here otherwise we'll going to have a problem
* after watching a black picture for 5 hours
*/
@@ -147,12 +147,12 @@ typedef struct PPContext{
int nonBQP;
int frameNum;
-
+
int cpuCaps;
-
+
int qpStride; ///<size of qp buffers (needed to realloc them if needed)
int stride; ///<size of some buffers (needed to realloc them if needed)
-
+
int hChromaSubSample;
int vChromaSubSample;
diff --git a/libavcodec/libpostproc/postprocess_template.c b/libavcodec/libpostproc/postprocess_template.c
index 8f225636ee..84e60e0f65 100644
--- a/libavcodec/libpostproc/postprocess_template.c
+++ b/libavcodec/libpostproc/postprocess_template.c
@@ -80,11 +80,11 @@ static inline int RENAME(vertClassify)(uint8_t src[], int stride, PPContext *c){
int numEq= 0, dcOk;
src+= stride*4; // src points to begin of the 8x8 Block
asm volatile(
- "movq %0, %%mm7 \n\t"
- "movq %1, %%mm6 \n\t"
+ "movq %0, %%mm7 \n\t"
+ "movq %1, %%mm6 \n\t"
: : "m" (c->mmxDcOffset[c->nonBQP]), "m" (c->mmxDcThreshold[c->nonBQP])
);
-
+
asm volatile(
"lea (%2, %3), %%"REG_a" \n\t"
// 0 1 2 3 4 5 6 7 8 9
@@ -115,7 +115,7 @@ asm volatile(
"paddb %%mm7, %%mm2 \n\t"
"pcmpgtb %%mm6, %%mm2 \n\t"
"paddb %%mm2, %%mm0 \n\t"
-
+
"lea (%%"REG_a", %3, 4), %%"REG_a" \n\t"
"movq (%2, %3, 4), %%mm2 \n\t"
@@ -1195,7 +1195,7 @@ static inline void RENAME(dering)(uint8_t src[], int stride, PPContext *c)
"lea (%0, %1), %%"REG_a" \n\t"
"lea (%%"REG_a", %1, 4), %%"REG_d" \n\t"
-
+
// 0 1 2 3 4 5 6 7 8 9
// %0 eax eax+%1 eax+2%1 %0+4%1 edx edx+%1 edx+2%1 %0+8%1 edx+4%1
@@ -1276,7 +1276,7 @@ FIND_MIN_MAX((%0, %1, 8))
"cmpb "MANGLE(deringThreshold)", %%cl \n\t"
" jb 1f \n\t"
"lea -24(%%"REG_SP"), %%"REG_c" \n\t"
- "and "ALIGN_MASK", %%"REG_c" \n\t"
+ "and "ALIGN_MASK", %%"REG_c" \n\t"
PAVGB(%%mm0, %%mm7) // a=(max + min)/2
"punpcklbw %%mm7, %%mm7 \n\t"
"punpcklbw %%mm7, %%mm7 \n\t"
@@ -1444,12 +1444,12 @@ DERING_CORE((%0, %1, 8),(%%REGd, %1, 4) ,%%mm2,%%mm4,%%mm0,%%mm3,%%mm5,%%mm1,%%m
if(src[stride*y + 7] > avg) t+= 128;
if(src[stride*y + 8] > avg) t+= 256;
if(src[stride*y + 9] > avg) t+= 512;
-
+
t |= (~t)<<16;
t &= (t<<1) & (t>>1);
s[y] = t;
}
-
+
for(y=1; y<9; y++)
{
int t = s[y-1] & s[y] & s[y+1];
@@ -1796,7 +1796,7 @@ DEINT_L5(%%mm0, %%mm1, (%0) , (%%REGa) , (%%REGa, %1) )
DEINT_L5(%%mm1, %%mm0, (%%REGa) , (%%REGa, %1) , (%%REGa, %1, 2))
DEINT_L5(%%mm0, %%mm1, (%%REGa, %1) , (%%REGa, %1, 2), (%0, %1, 4) )
DEINT_L5(%%mm1, %%mm0, (%%REGa, %1, 2), (%0, %1, 4) , (%%REGd) )
-DEINT_L5(%%mm0, %%mm1, (%0, %1, 4) , (%%REGd) , (%%REGd, %1) )
+DEINT_L5(%%mm0, %%mm1, (%0, %1, 4) , (%%REGd) , (%%REGd, %1) )
DEINT_L5(%%mm1, %%mm0, (%%REGd) , (%%REGd, %1) , (%%REGd, %1, 2))
DEINT_L5(%%mm0, %%mm1, (%%REGd, %1) , (%%REGd, %1, 2), (%0, %1, 8) )
DEINT_L5(%%mm1, %%mm0, (%%REGd, %1, 2), (%0, %1, 8) , (%%REGd, %1, 4))
@@ -2111,7 +2111,7 @@ static inline void RENAME(transpose1)(uint8_t *dst1, uint8_t *dst2, uint8_t *src
"movd %%mm1, 112(%3) \n\t"
"lea (%%"REG_a", %1, 4), %%"REG_a" \n\t"
-
+
"movq (%0, %1, 4), %%mm0 \n\t" // 12345678
"movq (%%"REG_a"), %%mm1 \n\t" // abcdefgh
"movq %%mm0, %%mm2 \n\t" // 12345678
@@ -2242,7 +2242,7 @@ static inline void RENAME(tempNoiseReducer)(uint8_t *src, int stride,
tempBluredPast[127]= maxNoise[0];
tempBluredPast[128]= maxNoise[1];
tempBluredPast[129]= maxNoise[2];
-
+
#define FAST_L2_DIFF
//#define L1_DIFF //u should change the thresholds too if u try that one
#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
@@ -2651,11 +2651,11 @@ static always_inline void RENAME(do_a_deblock)(uint8_t *src, int step, int strid
src+= step*3; // src points to begin of the 8x8 Block
//START_TIMER
asm volatile(
- "movq %0, %%mm7 \n\t"
- "movq %1, %%mm6 \n\t"
+ "movq %0, %%mm7 \n\t"
+ "movq %1, %%mm6 \n\t"
: : "m" (c->mmxDcOffset[c->nonBQP]), "m" (c->mmxDcThreshold[c->nonBQP])
);
-
+
asm volatile(
"lea (%2, %3), %%"REG_a" \n\t"
// 0 1 2 3 4 5 6 7 8 9
@@ -2684,7 +2684,7 @@ asm volatile(
"paddb %%mm7, %%mm2 \n\t"
"pcmpgtb %%mm6, %%mm2 \n\t"
"paddb %%mm2, %%mm0 \n\t"
-
+
"lea (%%"REG_a", %3, 4), %%"REG_a" \n\t"
"movq (%2, %3, 4), %%mm2 \n\t"
@@ -2795,7 +2795,7 @@ asm volatile(
"pxor %%mm7, %%mm1 \n\t"
"pand %%mm0, %%mm1 \n\t"
"pxor %%mm1, %%mm7 \n\t"
-
+
"movq %%mm6, %%mm5 \n\t"
"punpckhbw %%mm4, %%mm6 \n\t"
"punpcklbw %%mm4, %%mm5 \n\t"
@@ -2826,7 +2826,7 @@ asm volatile(
"psubw %%mm2, %%mm0 \n\t"\
"psubw %%mm3, %%mm1 \n\t"
-
+
NEXT //0
NEXT //1
NEXT //2
@@ -2860,7 +2860,7 @@ asm volatile(
"movq %%mm7, %%mm6 \n\t"
"punpckhbw %%mm4, %%mm7 \n\t"
"punpcklbw %%mm4, %%mm6 \n\t"
-
+
NEXT //7
"mov %4, %0 \n\t"
"add %1, %0 \n\t"
@@ -2873,7 +2873,7 @@ asm volatile(
"paddw %%mm7, %%mm1 \n\t"
"movq %%mm0, 96(%3) \n\t"
"movq %%mm1, 104(%3) \n\t"
-
+
PREV //2
"paddw %%mm6, %%mm0 \n\t"
"paddw %%mm7, %%mm1 \n\t"
@@ -3449,7 +3449,7 @@ static void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int
c.packedYScale|= c.packedYScale<<32;
c.packedYScale|= c.packedYScale<<16;
-
+
if(mode & LEVEL_FIX) QPCorrecture= (int)(scale*256*256 + 0.5);
else QPCorrecture= 256*256;
}
@@ -3612,7 +3612,7 @@ static void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int
"packuswb %%mm7, %%mm7 \n\t" // 0,QP, 0, QP, 0,QP, 0, QP
"packuswb %%mm7, %%mm7 \n\t" // QP,..., QP
"movq %%mm7, %0 \n\t"
- : "=m" (c.pQPb)
+ : "=m" (c.pQPb)
: "r" (QP)
);
#endif