media/libvpx/vp9/common/vp9_systemdependent.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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  */
    11 #ifndef VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
    12 #define VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
    14 #ifdef _MSC_VER
    15 #include <math.h>
    16 #define snprintf _snprintf
    17 #endif
    19 #include "./vpx_config.h"
    20 #if ARCH_X86 || ARCH_X86_64
    21 void vpx_reset_mmx_state(void);
    22 #define vp9_clear_system_state() vpx_reset_mmx_state()
    23 #else
    24 #define vp9_clear_system_state()
    25 #endif
    27 #if defined(_MSC_VER) && _MSC_VER < 1800
    28 // round is not defined in MSVC before VS2013.
    29 static int round(double x) {
    30   if (x < 0)
    31     return (int)ceil(x - 0.5);
    32   else
    33     return (int)floor(x + 0.5);
    34 }
    35 #endif
    37 struct VP9Common;
    38 void vp9_machine_specific_config(struct VP9Common *cm);
    40 #endif  // VP9_COMMON_VP9_SYSTEMDEPENDENT_H_

mercurial