Esempio n. 1
0
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *****************************************************************************/

#include "common/common.h"
#include "macroblock.h"

/* These chroma DC functions don't have assembly versions and are only used here. */

#define ZIG(i,y,x) level[i] = dct[x*2+y];
static inline void zigzag_scan_2x2_dc( int16_t level[4], int16_t dct[4] )
{
    ZIG(0,0,0)
    ZIG(1,0,1)
    ZIG(2,1,0)
    ZIG(3,1,1)
}
#undef ZIG

#define IDCT_DEQUANT_START \
    int d0 = dct[0] + dct[1]; \
    int d1 = dct[2] + dct[3]; \
    int d2 = dct[0] - dct[1]; \
    int d3 = dct[2] - dct[3]; \
    int dmf = dequant_mf[i_qp%6][0] << i_qp/6;

static inline void idct_dequant_2x2_dc( int16_t dct[4], int16_t dct4x4[4][16], int dequant_mf[6][16], int i_qp )
{
Esempio n. 2
0
    ZIG(36,7,1) ZIG(37,6,2) ZIG(38,5,3) ZIG(39,4,4)
    ZIG(40,3,5) ZIG(41,2,6) ZIG(42,1,7) ZIG(43,2,7)
    ZIG(44,3,6) ZIG(45,4,5) ZIG(46,5,4) ZIG(47,6,3)
    ZIG(48,7,2) ZIG(49,7,3) ZIG(50,6,4) ZIG(51,5,5)
    ZIG(52,4,6) ZIG(53,3,7) ZIG(54,4,7) ZIG(55,5,6)
    ZIG(56,6,5) ZIG(57,7,4) ZIG(58,7,5) ZIG(59,6,6)
    ZIG(60,5,7) ZIG(61,6,7) ZIG(62,7,6) ZIG(63,7,7)
}
#undef ZIG
 */

#define ZIG(i,y,x) level[i] = dct[y][x];
void scan_zigzag_8x8full( int level[64], int16_t dct[8][8] )
#ifdef HAVE_SSE2
    {
    ZIG( 0,0,0) ZIG( 1,1,0) ZIG( 2,0,1) ZIG( 3,0,2)
    ZIG( 4,1,1) ZIG( 5,2,0) ZIG( 6,3,0) ZIG( 7,2,1)
    ZIG( 8,1,2) ZIG( 9,0,3) ZIG(10,0,4) ZIG(11,1,3)
    ZIG(12,2,2) ZIG(13,3,1) ZIG(14,4,0) ZIG(15,5,0)
    ZIG(16,4,1) ZIG(17,3,2) ZIG(18,2,3) ZIG(19,1,4)
    ZIG(20,0,5) ZIG(21,0,6) ZIG(22,1,5) ZIG(23,2,4)
    ZIG(24,3,3) ZIG(25,4,2) ZIG(26,5,1) ZIG(27,6,0)
    ZIG(28,7,0) ZIG(29,6,1) ZIG(30,5,2) ZIG(31,4,3)
    ZIG(32,3,4) ZIG(33,2,5) ZIG(34,1,6) ZIG(35,0,7)
    ZIG(36,1,7) ZIG(37,2,6) ZIG(38,3,5) ZIG(39,4,4)
    ZIG(40,5,3) ZIG(41,6,2) ZIG(42,7,1) ZIG(43,7,2)
    ZIG(44,6,3) ZIG(45,5,4) ZIG(46,4,5) ZIG(47,3,6)
    ZIG(48,2,7) ZIG(49,3,7) ZIG(50,4,6) ZIG(51,5,5)
    ZIG(52,6,4) ZIG(53,7,3) ZIG(54,7,4) ZIG(55,6,5)
    ZIG(56,5,6) ZIG(57,4,7) ZIG(58,5,7) ZIG(59,6,6)
    ZIG(60,7,5) ZIG(61,7,6) ZIG(62,6,7) ZIG(63,7,7)