media/libvpx/vp8/encoder/arm/quantize_arm.c

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /*
     2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
     3  *
     4  *  Use of this source code is governed by a BSD-style license
     5  *  that can be found in the LICENSE file in the root of the source
     6  *  tree. An additional intellectual property rights grant can be found
     7  *  in the file PATENTS.  All contributing project authors may
     8  *  be found in the AUTHORS file in the root of the source tree.
     9  */
    12 #include "vpx_config.h"
    13 #include "vp8_rtcd.h"
    14 #include "vp8/encoder/block.h"
    15 #include <math.h>
    16 #include "vpx_mem/vpx_mem.h"
    17 #include "vp8/encoder/quantize.h"
    18 #include "vp8/common/entropy.h"
    21 #if HAVE_NEON
    23 /* vp8_quantize_mbX functions here differs from corresponding ones in
    24  * quantize.c only by using quantize_b_pair function pointer instead of
    25  * the regular quantize_b function pointer */
    26 void vp8_quantize_mby_neon(MACROBLOCK *x)
    27 {
    28     int i;
    29     int has_2nd_order = (x->e_mbd.mode_info_context->mbmi.mode != B_PRED
    30         && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV);
    32     for (i = 0; i < 16; i+=2)
    33         x->quantize_b_pair(&x->block[i], &x->block[i+1],
    34                            &x->e_mbd.block[i], &x->e_mbd.block[i+1]);
    36     if(has_2nd_order)
    37         x->quantize_b(&x->block[24], &x->e_mbd.block[24]);
    38 }
    40 void vp8_quantize_mb_neon(MACROBLOCK *x)
    41 {
    42     int i;
    43     int has_2nd_order=(x->e_mbd.mode_info_context->mbmi.mode != B_PRED
    44         && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV);
    46     for (i = 0; i < 24; i+=2)
    47         x->quantize_b_pair(&x->block[i], &x->block[i+1],
    48                            &x->e_mbd.block[i], &x->e_mbd.block[i+1]);
    50     if (has_2nd_order)
    51         x->quantize_b(&x->block[24], &x->e_mbd.block[24]);
    52 }
    55 void vp8_quantize_mbuv_neon(MACROBLOCK *x)
    56 {
    57     int i;
    59     for (i = 16; i < 24; i+=2)
    60         x->quantize_b_pair(&x->block[i], &x->block[i+1],
    61                            &x->e_mbd.block[i], &x->e_mbd.block[i+1]);
    62 }
    64 #endif /* HAVE_NEON */

mercurial