]> granicus.if.org Git - libvpx/commitdiff
Code cleanup.
authorDmitry Kovalev <dkovalev@google.com>
Tue, 5 Mar 2013 22:12:16 +0000 (14:12 -0800)
committerDmitry Kovalev <dkovalev@google.com>
Tue, 5 Mar 2013 22:12:16 +0000 (14:12 -0800)
Removing redundant 'extern' keywords, fixing formatting and #include order,
code simplification.

Change-Id: I0e5fdc8009010f3f885f13b5d76859b9da511758

20 files changed:
vp9/common/vp9_coefupdateprobs.h
vp9/common/vp9_common.h
vp9/common/vp9_debugmodes.c
vp9/common/vp9_findnearmv.c
vp9/common/vp9_findnearmv.h
vp9/common/vp9_maskingmv.c
vp9/common/vp9_mbpitch.c
vp9/common/vp9_mvref_common.c
vp9/common/vp9_postproc.h
vp9/common/vp9_pragmas.h
vp9/common/vp9_pred_common.c
vp9/common/vp9_pred_common.h
vp9/common/vp9_tile_common.c
vp9/common/vp9_tile_common.h
vp9/decoder/vp9_dboolhuff.c
vp9/decoder/vp9_dboolhuff.h
vp9/decoder/vp9_onyxd_if.c
vp9/decoder/vp9_treereader.h
vp9/encoder/vp9_encodemb.h
vpx_ports/mem.h

index ee250e0489fbea699f57fbb1c2b627f1667b4988..ab8d8d9403e5f0014f5b648cf0fe563b70c3812a 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef VP9_COMMON_VP9_COEFUPDATEPROBS_H_
-#define VP9_COMMON_VP9_COEFUPDATEPROBS_H__
+#define VP9_COMMON_VP9_COEFUPDATEPROBS_H_
 
 /* Update probabilities for the nodes in the token entropy tree.
    Generated file included by vp9_entropy.c */
index 4295eba871c0fb123f34ef01744d27a9a7ad8cf8..ecad3f15fda2018de3eeeec5cbd29451adb18385 100644 (file)
 #ifndef VP9_COMMON_VP9_COMMON_H_
 #define VP9_COMMON_VP9_COMMON_H_
 
-#include <assert.h>
-#include "vpx_config.h"
 /* Interface header for common constant data structures and lookup tables */
 
+#include <assert.h>
+
+#include "./vpx_config.h"
 #include "vpx_mem/vpx_mem.h"
 #include "vpx/vpx_integer.h"
 
index 1953d60c6b4b2e8a96e8dd87459f4238749c7f71..c3fffc63251216d0076b49e2ae1cc0f69ca72776 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <stdio.h>
+
 #include "vp9/common/vp9_blockd.h"
 
 void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols,
@@ -18,8 +19,7 @@ void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols,
   int mb_index = 0;
   FILE *mvs = fopen("mvs.stt", "a");
 
-  /* print out the macroblock Y modes */
-  mb_index = 0;
+  // Print out the macroblock Y modes
   fprintf(mvs, "Mb Modes for Frame %d\n", frame);
 
   for (mb_row = 0; mb_row < rows; mb_row++) {
index 2f709bf58da5bfbab451ee0931947d04a2b34e90..8409885a0655d3051c0b1d18d26ce4bd2880bfab 100644 (file)
@@ -9,10 +9,11 @@
  */
 
 
+#include <limits.h>
+
 #include "vp9/common/vp9_findnearmv.h"
 #include "vp9/common/vp9_sadmxn.h"
 #include "vp9/common/vp9_subpelvar.h"
-#include <limits.h>
 
 const uint8_t vp9_mbsplit_offset[4][16] = {
   { 0,  8,  0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0},
@@ -32,8 +33,7 @@ static void lower_mv_precision(int_mv *mv, int usehp)
 }
 
 vp9_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
-                           vp9_prob p[4], const int context
-                          ) {
+                           vp9_prob p[4], const int context) {
   p[0] = pc->fc.vp9_mode_contexts[context][0];
   p[1] = pc->fc.vp9_mode_contexts[context][1];
   p[2] = pc->fc.vp9_mode_contexts[context][2];
index c42aab1a5acdcb7ddbc500c58aa00170099a9219..6887b044f6d6559b965d550c7426b82eb92fe265 100644 (file)
@@ -17,6 +17,9 @@
 #include "vp9/common/vp9_treecoder.h"
 #include "vp9/common/vp9_onyxc_int.h"
 
+#define LEFT_TOP_MARGIN (16 << 3)
+#define RIGHT_BOTTOM_MARGIN (16 << 3)
+
 /* check a list of motion vectors by sad score using a number rows of pixels
  * above and a number cols of pixels in the left to select the one with best
  * score to use as ref motion vector
@@ -30,8 +33,7 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
 
 static void mv_bias(int refmb_ref_frame_sign_bias, int refframe,
                     int_mv *mvp, const int *ref_frame_sign_bias) {
-  MV xmv;
-  xmv = mvp->as_mv;
+  MV xmv = mvp->as_mv;
 
   if (refmb_ref_frame_sign_bias != ref_frame_sign_bias[refframe]) {
     xmv.row *= -1;
@@ -41,8 +43,6 @@ static void mv_bias(int refmb_ref_frame_sign_bias, int refframe,
   mvp->as_mv = xmv;
 }
 
-#define LEFT_TOP_MARGIN (16 << 3)
-#define RIGHT_BOTTOM_MARGIN (16 << 3)
 
 static void clamp_mv(int_mv *mv,
                      int mb_to_left_edge,
@@ -72,10 +72,10 @@ static unsigned int check_mv_bounds(int_mv *mv,
                                     int mb_to_right_edge,
                                     int mb_to_top_edge,
                                     int mb_to_bottom_edge) {
-  return (mv->as_mv.col < mb_to_left_edge) ||
-         (mv->as_mv.col > mb_to_right_edge) ||
-         (mv->as_mv.row < mb_to_top_edge) ||
-         (mv->as_mv.row > mb_to_bottom_edge);
+  return mv->as_mv.col < mb_to_left_edge ||
+         mv->as_mv.col > mb_to_right_edge ||
+         mv->as_mv.row < mb_to_top_edge ||
+         mv->as_mv.row > mb_to_bottom_edge;
 }
 
 vp9_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
@@ -90,11 +90,12 @@ static int left_block_mv(const MACROBLOCKD *xd,
     if (!xd->left_available)
       return 0;
 
-    /* On L edge, get from MB to left of us */
+    // On L edge, get from MB to left of us
     --cur_mb;
 
     if (cur_mb->mbmi.mode != SPLITMV)
       return cur_mb->mbmi.mv[0].as_int;
+
     b += 4;
   }
 
index f1151e3dc2132f0233005a6dfa33cabaa8934f3b..326201bbeb9e7f163b85882d70d83c59ac4e5124 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-extern unsigned int vp9_sad16x16_sse3(
-  unsigned char *src_ptr,
-  int  src_stride,
-  unsigned char *ref_ptr,
-  int  ref_stride,
-  int  max_err);
 
-extern void vp9_sad16x16x3_sse3(
+unsigned int vp9_sad16x16_sse3(
   unsigned char *src_ptr,
   int  src_stride,
   unsigned char *ref_ptr,
   int  ref_stride,
-  int  *results);
+  int  max_err);
 
-extern int vp8_growmaskmb_sse3(
+int vp8_growmaskmb_sse3(
   unsigned char *om,
   unsigned char *nm);
 
-extern void vp8_makemask_sse3(
+void vp8_makemask_sse3(
   unsigned char *y,
   unsigned char *u,
   unsigned char *v,
@@ -238,6 +232,7 @@ void grow_ymask(unsigned char *ym) {
   for (i = 0; i < 256; i++)
     ym[i] = nym[i];
 }
+
 void make_mb_mask(unsigned char *y, unsigned char *u, unsigned char *v,
                   unsigned char *ym, unsigned char *uvm,
                   int yp, int uvp,
@@ -283,6 +278,7 @@ int compare_masks(unsigned char *sym, unsigned char *ym) {
 
   return sad;
 }
+
 int unmasked_sad(unsigned char *src, int p, unsigned char *dst, int dp,
                  unsigned char *ym) {
   int i, j;
@@ -294,6 +290,7 @@ int unmasked_sad(unsigned char *src, int p, unsigned char *dst, int dp,
 
   return sad;
 }
+
 int masked_motion_search(unsigned char *y, unsigned char *u, unsigned char *v,
                          int yp, int uvp,
                          unsigned char *dy, unsigned char *du, unsigned char *dv,
@@ -802,5 +799,5 @@ int mainz(int argc, char *argv[]) {
   }
   fclose(f);
   fclose(g);
-  return;
+  return 0;
 }
index ed96292a4fad7b7f9daa611760a4e2954472e0bc..8d99335d4f39262f373bbc5ee72e67a2879f96f1 100644 (file)
@@ -20,15 +20,15 @@ static void setup_block(BLOCKD *b,
                         int mv_stride,
                         uint8_t **base,
                         uint8_t **base2,
-                        int Stride,
+                        int stride,
                         int offset,
                         BLOCKSET bs) {
   if (bs == DEST) {
-    b->dst_stride = Stride;
+    b->dst_stride = stride;
     b->dst = offset;
     b->base_dst = base;
   } else {
-    b->pre_stride = Stride;
+    b->pre_stride = stride;
     b->pre = offset;
     b->base_pre = base;
     b->base_second_pre = base2;
index 25aa53b5a98fad23d9460eb3233dbbf3e9e36f83..2f322a33f995a8833ed52a8270bbb02fd1710284 100644 (file)
 #include "vp9/common/vp9_mvref_common.h"
 
 #define MVREF_NEIGHBOURS 8
+
 static int mb_mv_ref_search[MVREF_NEIGHBOURS][2] = {
     {0, -1}, {-1, 0}, {-1, -1}, {0, -2},
     {-2, 0}, {-1, -2}, {-2, -1}, {-2, -2}
 };
+
 static int mb_ref_distance_weight[MVREF_NEIGHBOURS] =
   { 3, 3, 2, 1, 1, 1, 1, 1 };
+
 static int sb_mv_ref_search[MVREF_NEIGHBOURS][2] = {
     {0, -1}, {-1, 0}, {1, -1}, {-1, 1},
     {-1, -1}, {0, -2}, {-2, 0}, {-1, -2}
 };
+
 static int sb_ref_distance_weight[MVREF_NEIGHBOURS] =
   { 3, 3, 2, 2, 2, 1, 1, 1 };
 
 // clamp_mv_ref
 #define MV_BORDER (16 << 3) // Allow 16 pels in 1/8th pel units
-static void clamp_mv_ref(const MACROBLOCKD *xd, int_mv *mv) {
 
+static void clamp_mv_ref(const MACROBLOCKD *xd, int_mv *mv) {
   if (mv->as_mv.col < (xd->mb_to_left_edge - MV_BORDER))
     mv->as_mv.col = xd->mb_to_left_edge - MV_BORDER;
   else if (mv->as_mv.col > xd->mb_to_right_edge + MV_BORDER)
@@ -41,11 +45,9 @@ static void clamp_mv_ref(const MACROBLOCKD *xd, int_mv *mv) {
 
 // Gets a candidate refenence motion vector from the given mode info
 // structure if one exists that matches the given reference frame.
-static int get_matching_candidate(
-  const MODE_INFO *candidate_mi,
+static int get_matching_candidate(const MODE_INFO *candidate_mi,
   MV_REFERENCE_FRAME ref_frame,
-  int_mv *c_mv
-) {
+  int_mv *c_mv) {
   int ret_val = TRUE;
 
   if (ref_frame == candidate_mi->mbmi.ref_frame) {
index 11f55ab0a0145e5b325fc1eeda214b10b056a8ae..0a637f011c56feb9d44f00d748beadfc50d217c5 100644 (file)
 #define VP9_COMMON_VP9_POSTPROC_H_
 
 #include "vpx_ports/mem.h"
+
 struct postproc_state {
-  int           last_q;
-  int           last_noise;
-  char          noise[3072];
+  int last_q;
+  int last_noise;
+  char noise[3072];
   DECLARE_ALIGNED(16, char, blackclamp[16]);
   DECLARE_ALIGNED(16, char, whiteclamp[16]);
   DECLARE_ALIGNED(16, char, bothclamp[16]);
 };
+
 #include "vp9/common/vp9_onyxc_int.h"
 #include "vp9/common/vp9_ppflags.h"
+
 int vp9_post_proc_frame(struct VP9Common *oci, YV12_BUFFER_CONFIG *dest,
                         vp9_ppflags_t *flags);
 
+void vp9_de_noise(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *post,
+                  int q, int low_var_thresh, int flag);
 
-void vp9_de_noise(YV12_BUFFER_CONFIG         *source,
-                  YV12_BUFFER_CONFIG         *post,
-                  int                         q,
-                  int                         low_var_thresh,
-                  int                         flag);
-
-void vp9_deblock(YV12_BUFFER_CONFIG         *source,
-                 YV12_BUFFER_CONFIG         *post,
-                 int                         q,
-                 int                         low_var_thresh,
-                 int                         flag);
+void vp9_deblock(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *post,
+                 int q, int low_var_thresh, int flag);
 
 #endif  // VP9_COMMON_VP9_POSTPROC_H_
index cbeaf5370b1af43a8687cc83efc185d7a176bbbd..f079161d6b43a548d03b110a7a2f11431eb055db 100644 (file)
@@ -14,6 +14,7 @@
 #ifdef __INTEL_COMPILER
 #pragma warning(disable:997 1011 170)
 #endif
+
 #ifdef _MSC_VER
 #pragma warning(disable:4799)
 #endif
index 41a4e000bcd94adc0a25dda85a336e5ebcb5a8b1..9fe66fc5b12741f53db5fee229334db1be5e5f22 100644 (file)
@@ -34,7 +34,6 @@ unsigned char vp9_get_pred_context(const VP9_COMMON *const cm,
         pred_context += (m - 1)->mbmi.seg_id_predicted;
       break;
 
-
     case PRED_REF:
       pred_context = (m - cm->mode_info_stride)->mbmi.ref_predicted;
       if (xd->left_available)
@@ -101,8 +100,7 @@ unsigned char vp9_get_pred_context(const VP9_COMMON *const cm,
       break;
 
     default:
-      // TODO *** add error trap code.
-      pred_context = 0;
+      pred_context = 0;  // *** add error trap code.
       break;
   }
 
@@ -114,39 +112,23 @@ unsigned char vp9_get_pred_context(const VP9_COMMON *const cm,
 vp9_prob vp9_get_pred_prob(const VP9_COMMON *const cm,
                           const MACROBLOCKD *const xd,
                           PRED_ID pred_id) {
-  vp9_prob pred_probability;
-  int pred_context;
-
-  // Get the appropriate prediction context
-  pred_context = vp9_get_pred_context(cm, xd, pred_id);
+  const int pred_context = vp9_get_pred_context(cm, xd, pred_id);
 
   switch (pred_id) {
     case PRED_SEG_ID:
-      pred_probability = cm->segment_pred_probs[pred_context];
-      break;
-
+      return cm->segment_pred_probs[pred_context];
     case PRED_REF:
-      pred_probability = cm->ref_pred_probs[pred_context];
-      break;
-
+      return cm->ref_pred_probs[pred_context];
     case PRED_COMP:
       // In keeping with convention elsewhre the probability returned is
       // the probability of a "0" outcome which in this case means the
       // probability of comp pred off.
-      pred_probability = cm->prob_comppred[pred_context];
-      break;
-
+      return cm->prob_comppred[pred_context];
     case PRED_MBSKIP:
-      pred_probability = cm->mbskip_pred_probs[pred_context];
-      break;
-
+      return cm->mbskip_pred_probs[pred_context];
     default:
-      // TODO *** add error trap code.
-      pred_probability = 128;
-      break;
+      return 128;  // *** add error trap code.
   }
-
-  return pred_probability;
 }
 
 // This function returns a context probability ptr for coding a given
@@ -154,71 +136,41 @@ vp9_prob vp9_get_pred_prob(const VP9_COMMON *const cm,
 const vp9_prob *vp9_get_pred_probs(const VP9_COMMON *const cm,
                                    const MACROBLOCKD *const xd,
                                    PRED_ID pred_id) {
-  const vp9_prob *pred_probability;
-  int pred_context;
-
-  // Get the appropriate prediction context
-  pred_context = vp9_get_pred_context(cm, xd, pred_id);
+  const int pred_context = vp9_get_pred_context(cm, xd, pred_id);
 
   switch (pred_id) {
     case PRED_SEG_ID:
-      pred_probability = &cm->segment_pred_probs[pred_context];
-      break;
-
+      return &cm->segment_pred_probs[pred_context];
     case PRED_REF:
-      pred_probability = &cm->ref_pred_probs[pred_context];
-      break;
-
+      return &cm->ref_pred_probs[pred_context];
     case PRED_COMP:
       // In keeping with convention elsewhre the probability returned is
       // the probability of a "0" outcome which in this case means the
       // probability of comp pred off.
-      pred_probability = &cm->prob_comppred[pred_context];
-      break;
-
+      return &cm->prob_comppred[pred_context];
     case PRED_MBSKIP:
-      pred_probability = &cm->mbskip_pred_probs[pred_context];
-      break;
-
+      return &cm->mbskip_pred_probs[pred_context];
     case PRED_SWITCHABLE_INTERP:
-      pred_probability = &cm->fc.switchable_interp_prob[pred_context][0];
-      break;
-
+      return &cm->fc.switchable_interp_prob[pred_context][0];
     default:
-      // TODO *** add error trap code.
-      pred_probability = NULL;
-      break;
+      return NULL;  // *** add error trap code.
   }
-
-  return pred_probability;
 }
 
 // This function returns the status of the given prediction signal.
 // I.e. is the predicted value for the given signal correct.
 unsigned char vp9_get_pred_flag(const MACROBLOCKD *const xd,
                                 PRED_ID pred_id) {
-  unsigned char pred_flag = 0;
-
   switch (pred_id) {
     case PRED_SEG_ID:
-      pred_flag = xd->mode_info_context->mbmi.seg_id_predicted;
-      break;
-
+      return xd->mode_info_context->mbmi.seg_id_predicted;
     case PRED_REF:
-      pred_flag = xd->mode_info_context->mbmi.ref_predicted;
-      break;
-
+      return  xd->mode_info_context->mbmi.ref_predicted;
     case PRED_MBSKIP:
-      pred_flag = xd->mode_info_context->mbmi.mb_skip_coeff;
-      break;
-
+      return xd->mode_info_context->mbmi.mb_skip_coeff;
     default:
-      // TODO *** add error trap code.
-      pred_flag = 0;
-      break;
+      return 0;  // *** add error trap code.
   }
-
-  return pred_flag;
 }
 
 // This function sets the status of the given prediction signal.
@@ -280,7 +232,7 @@ void vp9_set_pred_flag(MACROBLOCKD *const xd,
       break;
 
     default:
-      // TODO *** add error trap code.
+      // *** add error trap code.
       break;
   }
 }
@@ -325,7 +277,6 @@ MV_REFERENCE_FRAME vp9_get_pred_ref(const VP9_COMMON *const cm,
   MV_REFERENCE_FRAME pred_ref = LAST_FRAME;
 
   int segment_id = xd->mode_info_context->mbmi.segment_id;
-  int seg_ref_active;
   int i;
 
   unsigned char frame_allowed[MAX_REF_FRAMES] = {1, 1, 1, 1};
@@ -336,7 +287,7 @@ MV_REFERENCE_FRAME vp9_get_pred_ref(const VP9_COMMON *const cm,
   unsigned char above_left_in_image;
 
   // Is segment coding ennabled
-  seg_ref_active = vp9_segfeature_active(xd, segment_id, SEG_LVL_REF_FRAME);
+  int seg_ref_active = vp9_segfeature_active(xd, segment_id, SEG_LVL_REF_FRAME);
 
   // Special case treatment if segment coding is enabled.
   // Dont allow prediction of a reference frame that the segment
@@ -389,9 +340,7 @@ MV_REFERENCE_FRAME vp9_get_pred_ref(const VP9_COMMON *const cm,
 // Functions to computes a set of modified reference frame probabilities
 // to use when the prediction of the reference frame value fails
 void vp9_calc_ref_probs(int *count, vp9_prob *probs) {
-  int tot_count;
-
-  tot_count = count[0] + count[1] + count[2] + count[3];
+  int tot_count = count[0] + count[1] + count[2] + count[3];
   probs[0] = get_prob(count[0], tot_count);
 
   tot_count -= count[0];
@@ -407,19 +356,12 @@ void vp9_calc_ref_probs(int *count, vp9_prob *probs) {
 // they are not allowed for a given segment.
 void vp9_compute_mod_refprobs(VP9_COMMON *const cm) {
   int norm_cnt[MAX_REF_FRAMES];
-  int intra_count;
-  int inter_count;
-  int last_count;
-  int gfarf_count;
-  int gf_count;
-  int arf_count;
-
-  intra_count = cm->prob_intra_coded;
-  inter_count = (255 - intra_count);
-  last_count = (inter_count * cm->prob_last_coded) / 255;
-  gfarf_count = inter_count - last_count;
-  gf_count = (gfarf_count * cm->prob_gf_coded) / 255;
-  arf_count = gfarf_count - gf_count;
+  const int intra_count = cm->prob_intra_coded;
+  const int inter_count = (255 - intra_count);
+  const int last_count = (inter_count * cm->prob_last_coded) / 255;
+  const int gfarf_count = inter_count - last_count;
+  const int gf_count = (gfarf_count * cm->prob_gf_coded) / 255;
+  const int arf_count = gfarf_count - gf_count;
 
   // Work out modified reference frame probabilities to use where prediction
   // of the reference frame fails
index 52c4d42ef8fac5695b73bcfa97f2bf2c7e79291d..49dcf0a4cf2bb523a7d4b450dd9f4ef97589becc 100644 (file)
@@ -8,48 +8,48 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "vp9/common/vp9_onyxc_int.h"
-#include "vp9/common/vp9_blockd.h"
-
 #ifndef VP9_COMMON_VP9_PRED_COMMON_H_
 #define VP9_COMMON_VP9_PRED_COMMON_H_
 
+#include "vp9/common/vp9_blockd.h"
+#include "vp9/common/vp9_onyxc_int.h"
 
 // Predicted items
 typedef enum {
-  PRED_SEG_ID = 0,               // Segment identifier
+  PRED_SEG_ID = 0,  // Segment identifier
   PRED_REF = 1,
   PRED_COMP = 2,
   PRED_MBSKIP = 3,
   PRED_SWITCHABLE_INTERP = 4
 } PRED_ID;
 
-extern unsigned char vp9_get_pred_context(const VP9_COMMON *const cm,
-                                          const MACROBLOCKD *const xd,
-                                          PRED_ID pred_id);
+unsigned char vp9_get_pred_context(const VP9_COMMON *const cm,
+                                   const MACROBLOCKD *const xd,
+                                   PRED_ID pred_id);
+
+vp9_prob vp9_get_pred_prob(const VP9_COMMON *const cm,
+                           const MACROBLOCKD *const xd,
+                           PRED_ID pred_id);
 
-extern vp9_prob vp9_get_pred_prob(const VP9_COMMON *const cm,
-                                  const MACROBLOCKD *const xd,
-                                  PRED_ID pred_id);
+const vp9_prob *vp9_get_pred_probs(const VP9_COMMON *const cm,
+                                   const MACROBLOCKD *const xd,
+                                   PRED_ID pred_id);
 
-extern const vp9_prob *vp9_get_pred_probs(const VP9_COMMON *const cm,
-                                          const MACROBLOCKD *const xd,
-                                          PRED_ID pred_id);
+unsigned char vp9_get_pred_flag(const MACROBLOCKD *const xd,
+                                PRED_ID pred_id);
 
-extern unsigned char vp9_get_pred_flag(const MACROBLOCKD *const xd,
-                                       PRED_ID pred_id);
+void vp9_set_pred_flag(MACROBLOCKD *const xd,
+                       PRED_ID pred_id,
+                       unsigned char pred_flag);
 
-extern void vp9_set_pred_flag(MACROBLOCKD *const xd,
-                              PRED_ID pred_id,
-                              unsigned char pred_flag);
 
+unsigned char vp9_get_pred_mb_segid(const VP9_COMMON *const cm,
+                                    const MACROBLOCKD *const xd,
+                                    int MbIndex);
 
-extern unsigned char vp9_get_pred_mb_segid(const VP9_COMMON *const cm,
-                                           const MACROBLOCKD *const xd,
-                                           int MbIndex);
+MV_REFERENCE_FRAME vp9_get_pred_ref(const VP9_COMMON *const cm,
+                                    const MACROBLOCKD *const xd);
 
-extern MV_REFERENCE_FRAME vp9_get_pred_ref(const VP9_COMMON *const cm,
-                                       const MACROBLOCKD *const xd);
-extern void vp9_compute_mod_refprobs(VP9_COMMON *const cm);
+void vp9_compute_mod_refprobs(VP9_COMMON *const cm);
 
 #endif  // VP9_COMMON_VP9_PRED_COMMON_H_
index 29f89b618d8d728afd94747b5b59d1cf231046c3..53a1eb8c656d9b5a68155e763b7c8d81173e0ef4 100644 (file)
 
 #include "vp9/common/vp9_tile_common.h"
 
+#define MIN_TILE_WIDTH 256
+#define MAX_TILE_WIDTH 4096
+#define MIN_TILE_WIDTH_SBS (MIN_TILE_WIDTH >> 6)
+#define MAX_TILE_WIDTH_SBS (MAX_TILE_WIDTH >> 6)
+
 static void vp9_get_tile_offsets(VP9_COMMON *cm, int *min_tile_off,
                                  int *max_tile_off, int tile_idx,
                                  int log2_n_tiles, int n_mbs) {
@@ -35,8 +40,6 @@ void vp9_get_tile_row_offsets(VP9_COMMON *cm, int tile_row_idx) {
                        cm->log2_tile_rows, cm->mb_rows);
 }
 
-#define MIN_TILE_WIDTH_SBS (MIN_TILE_WIDTH >> 6)
-#define MAX_TILE_WIDTH_SBS (MAX_TILE_WIDTH >> 6)
 
 void vp9_get_tile_n_bits(VP9_COMMON *cm, int *min_log2_n_tiles_ptr,
                          int *delta_log2_n_tiles) {
index ea6935601e5217f63a7c65cfb4e80cf26f705204..7ea377297c56d2a92670b6aefd52de60f295ae20 100644 (file)
@@ -13,9 +13,6 @@
 
 #include "vp9/common/vp9_onyxc_int.h"
 
-#define MIN_TILE_WIDTH 256
-#define MAX_TILE_WIDTH 4096
-
 void vp9_get_tile_col_offsets(VP9_COMMON *cm, int tile_col_idx);
 
 void vp9_get_tile_row_offsets(VP9_COMMON *cm, int tile_row_idx);
index 99c3664b23cd1e5f97e60faadf5f3d3b1582f51c..7e3b4646b2060ae33cfb614e2b0a49455a2e2bbd 100644 (file)
@@ -8,11 +8,11 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-
-#include "vp9/decoder/vp9_dboolhuff.h"
 #include "vpx_ports/mem.h"
 #include "vpx_mem/vpx_mem.h"
 
+#include "vp9/decoder/vp9_dboolhuff.h"
+
 int vp9_start_decode(BOOL_DECODER *br,
                      const unsigned char *source,
                      unsigned int source_sz) {
index cf31d380ae6395be0f129f3a6ea22e1e45d4f020..eeb5c35d49292fee0617edd3f5f2e588f5cb555a 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <stddef.h>
 #include <limits.h>
+
 #include "./vpx_config.h"
 #include "vpx_ports/mem.h"
 #include "vpx/vpx_integer.h"
index ce7958c3b61a222834788de789b83e3c84282a86..87d1d3b9885a2d2575e7e6943f02c30ab89fe78e 100644 (file)
@@ -9,6 +9,9 @@
  */
 
 
+#include <stdio.h>
+#include <assert.h>
+
 #include "vp9/common/vp9_onyxc_int.h"
 #if CONFIG_POSTPROC
 #include "vp9/common/vp9_postproc.h"
@@ -19,8 +22,6 @@
 #include "vp9/common/vp9_alloccommon.h"
 #include "vp9/common/vp9_loopfilter.h"
 #include "vp9/common/vp9_swapyv12buffer.h"
-#include <stdio.h>
-#include <assert.h>
 
 #include "vp9/common/vp9_quant_common.h"
 #include "vpx_scale/vpx_scale.h"
@@ -99,7 +100,7 @@ void write_dx_frame_to_file(YV12_BUFFER_CONFIG *frame, int this_frame) {
 }
 #endif
 
-void vp9_initialize_dec(void) {
+void vp9_initialize_dec() {
   static int init_done = 0;
 
   if (!init_done) {
index cca017de420c8e5ab49d16cac0ff8b1247504498..305dfe51fa98c8ce317a38b32d2e0e90153f03aa 100644 (file)
@@ -13,7 +13,6 @@
 #define VP9_DECODER_VP9_TREEREADER_H_
 
 #include "vp9/common/vp9_treecoder.h"
-
 #include "vp9/decoder/vp9_dboolhuff.h"
 
 typedef BOOL_DECODER vp9_reader;
index 6356df2159747425de3cc319803751eb0cabc5c2..f51d2ffbd5204065c4c44977ddb39fa36fe7ad0d 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "./vpx_config.h"
 #include "vp9/encoder/vp9_block.h"
+#include "vp9/encoder/vp9_onyx_int.h"
 
 typedef struct {
   MB_PREDICTION_MODE mode;
@@ -21,7 +22,6 @@ typedef struct {
 } MODE_DEFINITION;
 
 
-#include "vp9/encoder/vp9_onyx_int.h"
 struct VP9_ENCODER_RTCD;
 void vp9_encode_inter16x16(MACROBLOCK *x, int mb_row, int mb_col);
 
index b130da8a022e51aba79aad173ab196270fbff896..62b86bb1df8ae4db468529080b959222d101fcfb 100644 (file)
@@ -11,6 +11,7 @@
 
 #ifndef VPX_PORTS_MEM_H
 #define VPX_PORTS_MEM_H
+
 #include "vpx_config.h"
 #include "vpx/vpx_integer.h"