27 |
#include "../global.h" |
#include "../global.h" |
28 |
#include "../encoder.h" |
#include "../encoder.h" |
29 |
#include "gmc.h" |
#include "gmc.h" |
30 |
|
#include "../utils/emms.h" |
31 |
|
|
32 |
#include <stdio.h> |
#include <stdio.h> |
33 |
|
|
460 |
if ( W2>(uint32_t)U && W2>(uint32_t)(U+15*dUx) && |
if ( W2>(uint32_t)U && W2>(uint32_t)(U+15*dUx) && |
461 |
H2>(uint32_t)V && H2>(uint32_t)(V+15*dVx) ) |
H2>(uint32_t)V && H2>(uint32_t)(V+15*dVx) ) |
462 |
{ |
{ |
463 |
|
uint32_t UV1, UV2; |
464 |
for(i=0; i<16; ++i) |
for(i=0; i<16; ++i) |
465 |
{ |
{ |
466 |
uint32_t u = ( U >> 16 ) << rho; |
uint32_t u = ( U >> 16 ) << rho; |
469 |
Offsets[ i] = u; |
Offsets[ i] = u; |
470 |
Offsets[16+i] = v; |
Offsets[16+i] = v; |
471 |
} |
} |
|
|
|
|
{ |
|
472 |
// batch 8 input pixels when linearity says it's ok |
// batch 8 input pixels when linearity says it's ok |
473 |
uint32_t UV1, UV2; |
|
474 |
UV1 = (Offsets[0] | (Offsets[16]<<16)) & 0xfff0fff0U; |
UV1 = (Offsets[0] | (Offsets[16]<<16)) & 0xfff0fff0U; |
475 |
UV2 = (Offsets[7] | (Offsets[23]<<16)) & 0xfff0fff0U; |
UV2 = (Offsets[7] | (Offsets[23]<<16)) & 0xfff0fff0U; |
476 |
if (UV1+7*16==UV2) |
if (UV1+7*16==UV2) |
484 |
else |
else |
485 |
GMC_Core_Non_Lin_8(dst+8, Offsets+8, src, srcstride, Rounder); |
GMC_Core_Non_Lin_8(dst+8, Offsets+8, src, srcstride, Rounder); |
486 |
} |
} |
|
} |
|
487 |
else |
else |
488 |
{ |
{ |
489 |
for(i=0; i<16; ++i) |
for(i=0; i<16; ++i) |
534 |
if ( W2>(uint32_t)U && W2>(uint32_t)(U+15*dUx) && |
if ( W2>(uint32_t)U && W2>(uint32_t)(U+15*dUx) && |
535 |
H2>(uint32_t)V && H2>(uint32_t)(V+15*dVx) ) |
H2>(uint32_t)V && H2>(uint32_t)(V+15*dVx) ) |
536 |
{ |
{ |
537 |
|
uint32_t UV1, UV2; |
538 |
for(i=0; i<8; ++i) |
for(i=0; i<8; ++i) |
539 |
{ |
{ |
540 |
int32_t u = ( U >> 16 ) << rho; |
int32_t u = ( U >> 16 ) << rho; |
544 |
Offsets[16+i] = v; |
Offsets[16+i] = v; |
545 |
} |
} |
546 |
|
|
|
{ |
|
547 |
// batch 8 input pixels when linearity says it's ok |
// batch 8 input pixels when linearity says it's ok |
548 |
const uint32_t UV1 = (Offsets[ 0] | (Offsets[16]<<16)) & 0xfff0fff0U; |
UV1 = (Offsets[ 0] | (Offsets[16]<<16)) & 0xfff0fff0U; |
549 |
const uint32_t UV2 = (Offsets[ 7] | (Offsets[23]<<16)) & 0xfff0fff0U; |
UV2 = (Offsets[ 7] | (Offsets[23]<<16)) & 0xfff0fff0U; |
550 |
if (UV1+7*16==UV2) |
if (UV1+7*16==UV2) |
551 |
{ |
{ |
552 |
const uint32_t Off = (Offsets[0]>>4) + (Offsets[16]>>4)*srcstride; |
const uint32_t Off = (Offsets[0]>>4) + (Offsets[16]>>4)*srcstride; |
558 |
GMC_Core_Non_Lin_8(vDst, Offsets, vSrc, srcstride, Rounder); |
GMC_Core_Non_Lin_8(vDst, Offsets, vSrc, srcstride, Rounder); |
559 |
} |
} |
560 |
} |
} |
|
} |
|
561 |
else |
else |
562 |
{ |
{ |
563 |
for(i=0; i<8; ++i) |
for(i=0; i<8; ++i) |
738 |
|
|
739 |
pMBs[mbnum].mcsel = 0; /* until mode decision */ |
pMBs[mbnum].mcsel = 0; /* until mode decision */ |
740 |
} |
} |
741 |
|
emms(); |
742 |
} |
} |