int *bestdistortion) {
B_PREDICTION_MODE mode;
MACROBLOCKD *xd = &x->e_mbd;
- int64_t best_rd = LLONG_MAX;
+ int64_t best_rd = INT64_MAX;
int rate = 0;
int distortion;
}
if (total_rd >= best_rd)
- return LLONG_MAX;
+ return INT64_MAX;
*Rate = cost;
*rate_y = tot_rate_y;
MB_PREDICTION_MODE UNINITIALIZED_IS_SAFE(mode_selected);
int this_rate, this_rate_tokenonly;
int this_distortion, s;
- int64_t best_rd = LLONG_MAX, this_rd;
+ int64_t best_rd = INT64_MAX, this_rd;
/* Y Search for 32x32 intra prediction mode */
for (mode = DC_PRED; mode <= TM_PRED; mode++) {
MB_PREDICTION_MODE UNINITIALIZED_IS_SAFE(mode_selected);
int this_rate, this_rate_tokenonly;
int this_distortion, s;
- int64_t best_rd = LLONG_MAX, this_rd;
+ int64_t best_rd = INT64_MAX, this_rd;
/* Y Search for 32x32 intra prediction mode */
for (mode = DC_PRED; mode <= TM_PRED; mode++) {
MB_MODE_INFO *const mbmi = &xd->mode_info_context->mbmi;
int rate, ratey;
int distortion, skip;
- int64_t best_rd = LLONG_MAX;
+ int64_t best_rd = INT64_MAX;
int64_t this_rd;
int i;
for (i = 0; i < NB_TXFM_MODES; i++)
- txfm_cache[i] = LLONG_MAX;
+ txfm_cache[i] = INT64_MAX;
// Y Search for 16x16 intra prediction mode
for (mode = DC_PRED; mode <= TM_PRED; mode++) {
int *bestdistortion) {
MB_PREDICTION_MODE mode;
MACROBLOCKD *xd = &x->e_mbd;
- int64_t best_rd = LLONG_MAX;
+ int64_t best_rd = INT64_MAX;
int distortion = 0, rate = 0;
BLOCK *be = x->block + ib;
BLOCKD *b = xd->block + ib;
int cost = mb->mbmode_cost [xd->frame_type] [I8X8_PRED];
int distortion = 0;
int tot_rate_y = 0;
- long long total_rd = 0;
+ int64_t total_rd = 0;
ENTROPY_CONTEXT_PLANES t_above, t_left;
ENTROPY_CONTEXT *ta, *tl;
int *i8x8mode_costs;
MB_PREDICTION_MODE UNINITIALIZED_IS_SAFE(mode_selected);
MACROBLOCKD *xd = &x->e_mbd;
MB_MODE_INFO * mbmi = &x->e_mbd.mode_info_context->mbmi;
- int64_t best_rd = LLONG_MAX;
+ int64_t best_rd = INT64_MAX;
int UNINITIALIZED_IS_SAFE(d), UNINITIALIZED_IS_SAFE(r);
int rate_to, UNINITIALIZED_IS_SAFE(skip);
MB_PREDICTION_MODE mode;
MB_PREDICTION_MODE UNINITIALIZED_IS_SAFE(mode_selected);
MB_MODE_INFO * mbmi = &x->e_mbd.mode_info_context->mbmi;
- int64_t best_rd = LLONG_MAX;
+ int64_t best_rd = INT64_MAX;
int UNINITIALIZED_IS_SAFE(d), UNINITIALIZED_IS_SAFE(r);
int rate_to, UNINITIALIZED_IS_SAFE(skip);
int *skippable) {
MB_PREDICTION_MODE mode;
MB_PREDICTION_MODE UNINITIALIZED_IS_SAFE(mode_selected);
- int64_t best_rd = LLONG_MAX, this_rd;
+ int64_t best_rd = INT64_MAX, this_rd;
int this_rate_tokenonly, this_rate;
int this_distortion, s;
int *skippable) {
MB_PREDICTION_MODE mode;
MB_PREDICTION_MODE UNINITIALIZED_IS_SAFE(mode_selected);
- int64_t best_rd = LLONG_MAX, this_rd;
+ int64_t best_rd = INT64_MAX, this_rd;
int this_rate_tokenonly, this_rate;
int this_distortion, s;
mbmi->txfm_size = tx_size;
for (i = 0; i < label_count && this_segment_rd < bsi->segment_rd; i++) {
int_mv mode_mv[B_MODE_COUNT], second_mode_mv[B_MODE_COUNT];
- int64_t best_label_rd = LLONG_MAX, best_other_rd = LLONG_MAX;
+ int64_t best_label_rd = INT64_MAX, best_other_rd = INT64_MAX;
B_PREDICTION_MODE mode_selected = ZERO4X4;
int bestlabelyrate = 0;
vpx_memset(&bsi, 0, sizeof(bsi));
for (i = 0; i < NB_TXFM_MODES; i++)
- txfm_cache[i] = LLONG_MAX;
+ txfm_cache[i] = INT64_MAX;
bsi.segment_rd = best_rd;
bsi.ref_mv = best_ref_mv;
if (is_comp_pred) {
if (frame_mv[NEWMV][refs[0]].as_int == INVALID_MV ||
frame_mv[NEWMV][refs[1]].as_int == INVALID_MV)
- return LLONG_MAX;
+ return INT64_MAX;
*rate2 += vp9_mv_bit_cost(&frame_mv[NEWMV][refs[0]],
&ref_mv[0],
x->nmvjointcost, x->mvcost, 96,
// near) is 0,0 as this should then be coded using the zeromv mode.
for (i = 0; i < num_refs; ++i)
if (frame_mv[this_mode][refs[i]].as_int == 0)
- return LLONG_MAX;
+ return INT64_MAX;
case ZEROMV:
default:
break;
// Clip "next_nearest" so that it does not extend to far out of image
clamp_mv2(&cur_mv[i], xd);
if (mv_check_bounds(x, &cur_mv[i]))
- return LLONG_MAX;
+ return INT64_MAX;
mbmi->mv[i].as_int = cur_mv[i].as_int;
}
int64_t best_txfm_diff[NB_TXFM_MODES];
int64_t best_pred_diff[NB_PREDICTION_TYPES];
int64_t best_pred_rd[NB_PREDICTION_TYPES];
- int64_t best_rd = LLONG_MAX, best_intra_rd = LLONG_MAX;
+ int64_t best_rd = INT64_MAX, best_intra_rd = INT64_MAX;
#if CONFIG_COMP_INTERINTRA_PRED
int is_best_interintra = 0;
- int64_t best_intra16_rd = LLONG_MAX;
+ int64_t best_intra16_rd = INT64_MAX;
int best_intra16_mode = DC_PRED, best_intra16_uv_mode = DC_PRED;
#endif
- int64_t best_overall_rd = LLONG_MAX;
+ int64_t best_overall_rd = INT64_MAX;
INTERPOLATIONFILTERTYPE best_filter = SWITCHABLE;
int uv_intra_rate, uv_intra_distortion, uv_intra_rate_tokenonly;
int uv_intra_skippable = 0;
int uv_intra_skippable_8x8 = 0;
int rate_y, UNINITIALIZED_IS_SAFE(rate_uv);
int distortion_uv = INT_MAX;
- int64_t best_yrd = LLONG_MAX;
+ int64_t best_yrd = INT64_MAX;
int switchable_filter_index = 0;
MB_PREDICTION_MODE uv_intra_mode;
for (i = 0; i < MAX_REF_FRAMES; i++)
frame_mv[NEWMV][i].as_int = INVALID_MV;
for (i = 0; i < NB_PREDICTION_TYPES; ++i)
- best_pred_rd[i] = LLONG_MAX;
+ best_pred_rd[i] = INT64_MAX;
for (i = 0; i < NB_TXFM_MODES; i++)
- best_txfm_rd[i] = LLONG_MAX;
+ best_txfm_rd[i] = INT64_MAX;
for (i = 0; i < NB_PARTITIONINGS; i++) {
int j, k;
frame_mdcounts, y_buffer, u_buffer, v_buffer);
}
- *returnintra = LLONG_MAX;
+ *returnintra = INT64_MAX;
mbmi->ref_frame = INTRA_FRAME;
for (mode_index = 0; mode_index < MAX_MODES;
mode_index += (!switchable_filter_index)) {
- int64_t this_rd = LLONG_MAX;
+ int64_t this_rd = INT64_MAX;
int disable_skip = 0, skippable = 0;
int other_cost = 0;
int compmode_cost = 0;
distortion2 += uv_intra_distortion;
distortion_uv = uv_intra_distortion;
} else {
- this_rd = LLONG_MAX;
+ this_rd = INT64_MAX;
disable_skip = 1;
}
}
distortion2 += uv_intra_distortion;
distortion_uv = uv_intra_distortion;
} else {
- this_rd = LLONG_MAX;
+ this_rd = INT64_MAX;
disable_skip = 1;
}
}
distortion2 += distortion_uv;
skippable = skippable && uv_skippable;
} else {
- this_rd = LLONG_MAX;
+ this_rd = INT64_MAX;
disable_skip = 1;
}
&rate_uv, &distortion_uv,
&mode_excluded, &disable_skip, recon_yoffset,
mode_index, frame_mv);
- if (this_rd == LLONG_MAX)
+ if (this_rd == INT64_MAX)
continue;
}
}
/* keep record of best txfm size */
- if (!mode_excluded && this_rd != LLONG_MAX) {
+ if (!mode_excluded && this_rd != INT64_MAX) {
for (i = 0; i < NB_TXFM_MODES; i++) {
int64_t adj_rd;
if (this_mode != B_PRED) {
}
for (i = 0; i < NB_PREDICTION_TYPES; ++i) {
- if (best_pred_rd[i] == LLONG_MAX)
+ if (best_pred_rd[i] == INT64_MAX)
best_pred_diff[i] = INT_MIN;
else
best_pred_diff[i] = best_rd - best_pred_rd[i];
if (!x->skip) {
for (i = 0; i < NB_TXFM_MODES; i++) {
- if (best_txfm_rd[i] == LLONG_MAX)
+ if (best_txfm_rd[i] == INT64_MAX)
best_txfm_diff[i] = INT_MIN;
else
best_txfm_diff[i] = best_rd - best_txfm_rd[i];
int mdcounts[4];
int near_sadidx[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
int saddone = 0;
- int64_t best_rd = LLONG_MAX;
+ int64_t best_rd = INT64_MAX;
int64_t best_txfm_rd[NB_TXFM_MODES];
int64_t best_txfm_diff[NB_TXFM_MODES];
int64_t best_pred_diff[NB_PREDICTION_TYPES];
unsigned int ref_costs[MAX_REF_FRAMES];
#if CONFIG_COMP_INTERINTRA_PRED
int is_best_interintra = 0;
- int64_t best_intra16_rd = LLONG_MAX;
+ int64_t best_intra16_rd = INT64_MAX;
int best_intra16_mode = DC_PRED, best_intra16_uv_mode = DC_PRED;
#endif
- int64_t best_overall_rd = LLONG_MAX;
+ int64_t best_overall_rd = INT64_MAX;
INTERPOLATIONFILTERTYPE best_filter = SWITCHABLE;
int rate_uv_4x4 = 0, rate_uv_8x8 = 0, rate_uv_tokenonly_4x4 = 0,
rate_uv_tokenonly_8x8 = 0;
vpx_memset(&best_mbmode, 0, sizeof(best_mbmode));
for (i = 0; i < NB_PREDICTION_TYPES; ++i)
- best_pred_rd[i] = LLONG_MAX;
+ best_pred_rd[i] = INT64_MAX;
for (i = 0; i < NB_TXFM_MODES; i++)
- best_txfm_rd[i] = LLONG_MAX;
+ best_txfm_rd[i] = INT64_MAX;
for (ref_frame = LAST_FRAME; ref_frame <= ALTREF_FRAME; ref_frame++) {
if (cpi->ref_frame_flags & flag_list[ref_frame]) {
for (mode_index = 0; mode_index < MAX_MODES;
mode_index += (!switchable_filter_index)) {
int mode_excluded = 0;
- int64_t this_rd = LLONG_MAX;
+ int64_t this_rd = INT64_MAX;
int disable_skip = 0;
int other_cost = 0;
int compmode_cost = 0;
&rate_uv, &distortion_uv,
&mode_excluded, &disable_skip, recon_yoffset,
mode_index, frame_mv);
- if (this_rd == LLONG_MAX)
+ if (this_rd == INT64_MAX)
continue;
}
}
/* keep record of best txfm size */
- if (!mode_excluded && this_rd != LLONG_MAX) {
+ if (!mode_excluded && this_rd != INT64_MAX) {
for (i = 0; i < NB_TXFM_MODES; i++) {
int64_t adj_rd;
if (this_mode != B_PRED) {
vpx_memcpy(mbmi, &best_mbmode, sizeof(MB_MODE_INFO));
for (i = 0; i < NB_PREDICTION_TYPES; ++i) {
- if (best_pred_rd[i] == LLONG_MAX)
+ if (best_pred_rd[i] == INT64_MAX)
best_pred_diff[i] = INT_MIN;
else
best_pred_diff[i] = best_rd - best_pred_rd[i];
if (!x->skip) {
for (i = 0; i < NB_TXFM_MODES; i++) {
- if (best_txfm_rd[i] == LLONG_MAX)
+ if (best_txfm_rd[i] == INT64_MAX)
best_txfm_diff[i] = INT_MIN;
else
best_txfm_diff[i] = best_rd - best_txfm_rd[i];
+++ /dev/null
-/*
- * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-
-#ifndef __VPXTYPES_H__
-#define __VPXTYPES_H__
-
-#include "vpx_config.h"
-
-// #include <sys/types.h>
-#ifdef _MSC_VER
-# include <basetsd.h>
-typedef SSIZE_T ssize_t;
-#endif
-
-#if defined(HAVE_STDINT_H) && HAVE_STDINT_H
-/* C99 types are preferred to vpx integer types */
-# include <stdint.h>
-#endif
-
-/*!\defgroup basetypes Base Types
- @{*/
-#if !defined(HAVE_STDINT_H) && !defined(INT_T_DEFINED)
-# ifdef STRICTTYPES
-typedef signed char int8_t;
-typedef signed short int16_t;
-typedef signed int int32_t;
-# else
-typedef char int8_t;
-typedef short int16_t;
-typedef int int32_t;
-# endif
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-#endif
-
-typedef int8_t vpxs8;
-typedef uint8_t vpxu8;
-typedef int16_t vpxs16;
-typedef uint16_t vpxu16;
-typedef int32_t vpxs32;
-typedef uint32_t vpxu32;
-typedef int32_t vpxbool;
-
-enum {vpxfalse, vpxtrue};
-
-/*!\def OTC
- \brief a macro suitable for declaring a constant #vpxtc*/
-/*!\def VPXTC
- \brief printf format string suitable for printing an #vpxtc*/
-#ifdef UNICODE
-# ifdef NO_WCHAR
-# error "no non-wchar support added yet"
-# else
-# include <wchar.h>
-typedef wchar_t vpxtc;
-# define OTC(str) L ## str
-# define VPXTC "ls"
-# endif /*NO_WCHAR*/
-#else
-typedef char vpxtc;
-# define OTC(str) (vpxtc*)str
-# define VPXTC "s"
-#endif /*UNICODE*/
-/*@} end - base types*/
-
-/*!\addtogroup basetypes
- @{*/
-/*!\def VPX64
- \brief printf format string suitable for printing an #vpxs64*/
-#if defined(HAVE_STDINT_H)
-# define VPX64 PRId64
-typedef int64_t vpxs64;
-#elif defined(HASLONGLONG)
-# undef PRId64
-# define PRId64 "lld"
-# define VPX64 PRId64
-typedef long long vpxs64;
-#elif defined(WIN32) || defined(_WIN32_WCE)
-# undef PRId64
-# define PRId64 "I64d"
-# define VPX64 PRId64
-typedef __int64 vpxs64;
-typedef unsigned __int64 vpxu64;
-#elif defined(__uClinux__) && defined(CHIP_DM642)
-# include <lddk.h>
-# undef PRId64
-# define PRId64 "lld"
-# define VPX64 PRId64
-typedef long vpxs64;
-#else
-# error "64 bit integer type undefined for this platform!"
-#endif
-#if !defined(HAVE_STDINT_H) && !defined(INT_T_DEFINED)
-typedef vpxs64 int64_t;
-typedef vpxu64 uint64_t;
-#endif
-/*!@} end - base types*/
-
-/*!\ingroup basetypes
- \brief Common return type*/
-typedef enum {
- VPX_NOT_FOUND = -404,
- VPX_BUFFER_EMPTY = -202,
- VPX_BUFFER_FULL = -201,
-
- VPX_CONNREFUSED = -102,
- VPX_TIMEDOUT = -101,
- VPX_WOULDBLOCK = -100,
-
- VPX_NET_ERROR = -9,
- VPX_INVALID_VERSION = -8,
- VPX_INPROGRESS = -7,
- VPX_NOT_SUPP = -6,
- VPX_NO_MEM = -3,
- VPX_INVALID_PARAMS = -2,
- VPX_ERROR = -1,
- VPX_OK = 0,
- VPX_DONE = 1
-} vpxsc;
-
-#if defined(WIN32) || defined(_WIN32_WCE)
-# define DLLIMPORT __declspec(dllimport)
-# define DLLEXPORT __declspec(dllexport)
-# define DLLLOCAL
-#elif defined(LINUX)
-# define DLLIMPORT
-/*visibility attribute support is available in 3.4 and later.
- see: http:// gcc.gnu.org/wiki/Visibility for more info*/
-# if defined(__GNUC__) && ((__GNUC__<<16|(__GNUC_MINOR__&0xff)) >= (3<<16|4))
-# define GCC_HASCLASSVISIBILITY
-# endif /*defined(__GNUC__) && __GNUC_PREREQ(3,4)*/
-# ifdef GCC_HASCLASSVISIBILITY
-# define DLLEXPORT __attribute__ ((visibility("default")))
-# define DLLLOCAL __attribute__ ((visibility("hidden")))
-# else
-# define DLLEXPORT
-# define DLLLOCAL
-# endif /*GCC_HASCLASSVISIBILITY*/
-#endif /*platform ifdefs*/
-
-#endif /*__VPXTYPES_H__*/
-
-#undef VPXAPI
-/*!\def VPXAPI
- \brief library calling convention/storage class attributes.
-
- Specifies whether the function is imported through a dll
- or is from a static library.*/
-#ifdef VPXDLL
-# ifdef VPXDLLEXPORT
-# define VPXAPI DLLEXPORT
-# else
-# define VPXAPI DLLIMPORT
-# endif /*VPXDLLEXPORT*/
-#else
-# define VPXAPI
-#endif /*VPXDLL*/