shithub: libvpx

Download patch

ref: ca88d22f39e9f68b954752dabbf9116bfa860e1d
parent: 168eea5d60aafc9b13555ee0da7661330918de4b
author: James Zern <[email protected]>
date: Sat Jun 25 06:58:38 EDT 2016

s/UINT32_MAX/UINT_MAX/

provides better toolchain compatibility

Change-Id: I8561a6de668a68ff54fe3886a4ee6300f0ae9c04

--- a/vp9/encoder/vp9_mcomp.c
+++ b/vp9/encoder/vp9_mcomp.c
@@ -362,8 +362,8 @@
   }
   *distortion = (uint32_t)besterr;
   besterr += mv_err_cost(bestmv, ref_mv, mvjcost, mvcost, error_per_bit);
-  if (besterr >= UINT32_MAX)
-    return UINT32_MAX;
+  if (besterr >= UINT_MAX)
+    return UINT_MAX;
   return (uint32_t)besterr;
 #else
   uint32_t besterr;
@@ -448,7 +448,7 @@
 
   if ((abs(bestmv->col - ref_mv->col) > (MAX_FULL_PEL_VAL << 3)) ||
       (abs(bestmv->row - ref_mv->row) > (MAX_FULL_PEL_VAL << 3)))
-    return UINT32_MAX;
+    return UINT_MAX;
 
   return besterr;
 }
@@ -602,7 +602,7 @@
 
   if ((abs(bestmv->col - ref_mv->col) > (MAX_FULL_PEL_VAL << 3)) ||
       (abs(bestmv->row - ref_mv->row) > (MAX_FULL_PEL_VAL << 3)))
-    return UINT32_MAX;
+    return UINT_MAX;
 
   return besterr;
 }
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -1594,7 +1594,7 @@
 
   // Do joint motion search in compound mode to get more accurate mv.
   struct buf_2d backup_yv12[2][MAX_MB_PLANE];
-  uint32_t last_besterr[2] = {UINT32_MAX, UINT32_MAX};
+  uint32_t last_besterr[2] = {UINT_MAX, UINT_MAX};
   const YV12_BUFFER_CONFIG *const scaled_ref_frame[2] = {
     vp9_get_scaled_ref_frame(cpi, mi->ref_frame[0]),
     vp9_get_scaled_ref_frame(cpi, mi->ref_frame[1])
@@ -1640,7 +1640,7 @@
   // and break out of the search loop if it couldn't find a better mv.
   for (ite = 0; ite < 4; ite++) {
     struct buf_2d ref_yv12[2];
-    uint32_t bestsme = UINT32_MAX;
+    uint32_t bestsme = UINT_MAX;
     int sadpb = x->sadperbit16;
     MV tmp_mv;
     int search_range = 3;
@@ -1705,7 +1705,7 @@
                                        search_range,
                                        &cpi->fn_ptr[bsize],
                                        &ref_mv[id].as_mv, second_pred);
-    if (bestsme < UINT32_MAX)
+    if (bestsme < UINT_MAX)
       bestsme = vp9_get_mvpred_av_var(x, &tmp_mv, &ref_mv[id].as_mv,
                                       second_pred, &cpi->fn_ptr[bsize], 1);
 
@@ -1714,7 +1714,7 @@
     x->mv_row_min = tmp_row_min;
     x->mv_row_max = tmp_row_max;
 
-    if (bestsme < UINT32_MAX) {
+    if (bestsme < UINT_MAX) {
       uint32_t dis; /* TODO: use dis in distortion calculation later. */
       uint32_t sse;
       bestsme = cpi->find_fractional_mv_step(
@@ -1860,7 +1860,7 @@
             seg_mvs[i][mi->ref_frame[0]].as_int == INVALID_MV) {
           MV *const new_mv = &mode_mv[NEWMV][0].as_mv;
           int step_param = 0;
-          uint32_t bestsme = UINT32_MAX;
+          uint32_t bestsme = UINT_MAX;
           int sadpb = x->sadperbit4;
           MV mvp_full;
           int max_mv;
@@ -1915,7 +1915,7 @@
               &bsi->ref_mv[0]->as_mv, new_mv,
               INT_MAX, 1);
 
-          if (bestsme < UINT32_MAX) {
+          if (bestsme < UINT_MAX) {
             uint32_t distortion;
             cpi->find_fractional_mv_step(
                 x,