FIRSTPASS_STATS: Add comments for struct members.

Noting down my understanding of these fields, so that everyone doesn't
need to rediscover their meaning.

Change-Id: Icfd2a734d3f7fb66c6fca842a638757cce73eaa9
diff --git a/av1/encoder/firstpass.c b/av1/encoder/firstpass.c
index cb8ebd7..f6a0fb2 100644
--- a/av1/encoder/firstpass.c
+++ b/av1/encoder/firstpass.c
@@ -475,11 +475,6 @@
       av1_encode_intra_block_plane(cpi, x, bsize, 0, 0, mb_row * 2, mb_col * 2);
       this_error = aom_get_mb_ss(x->plane[0].src_diff);
 
-      // Keep a record of blocks that have almost no intra error residual
-      // (i.e. are in effect completely flat and untextured in the intra
-      // domain). In natural videos this is uncommon, but it is much more
-      // common in animations, graphics and screen content, so may be used
-      // as a signal to detect these types of content.
       if (this_error < UL_INTRA_THRESH) {
         ++intra_skip_count;
       } else if ((mb_col > 0) && (image_data_start_row == INVALID_ROW)) {
diff --git a/av1/encoder/firstpass.h b/av1/encoder/firstpass.h
index e898314..1b8636c 100644
--- a/av1/encoder/firstpass.h
+++ b/av1/encoder/firstpass.h
@@ -31,28 +31,65 @@
 #define VLOW_MOTION_THRESHOLD 950
 
 typedef struct {
+  // Frame number in display order, if stats are for a single frame.
+  // No real meaning for a collection of frames.
   double frame;
+  // Weight assigned to this frame (or total weight for the collection of
+  // frames) currently based on intra factor and brightness factor. This is used
+  // to distribute bits betweeen easier and harder frames.
   double weight;
+  // Intra prediction error.
   double intra_error;
+  // Average wavelet energy computed using Discrete Wavelet Transform (DWT).
   double frame_avg_wavelet_energy;
+  // Best of intra pred error and inter pred error using last frame as ref.
   double coded_error;
+  // Best of intra pred error and inter pred error using golden frame as ref.
   double sr_coded_error;
+  // Percentage of blocks with inter pred error < intra pred error.
   double pcnt_inter;
+  // Percentage of blocks using (inter prediction and) non-zero motion vectors.
   double pcnt_motion;
+  // Percentage of blocks where golden frame was the best reference. That is:
+  // inter pred error using golden frame < inter pred error using last frame and
+  // inter pred error using golden frame < intra pred error
   double pcnt_second_ref;
+  // Percentage of blocks where intra and inter prediction errors were very
+  // close. Note that this is a 'weighted count', that is, the so blocks may be
+  // weighted by how close the two errors were.
   double pcnt_neutral;
+  // Percentage of blocks that have almost no intra error residual
+  // (i.e. are in effect completely flat and untextured in the intra
+  // domain). In natural videos this is uncommon, but it is much more
+  // common in animations, graphics and screen content, so may be used
+  // as a signal to detect these types of content.
   double intra_skip_pct;
-  double inactive_zone_rows;  // Image mask rows top and bottom.
-  double inactive_zone_cols;  // Image mask columns at left and right edges.
+  // Image mask rows top and bottom.
+  double inactive_zone_rows;
+  // Image mask columns at left and right edges.
+  double inactive_zone_cols;
+  // Average of row motion vectors.
   double MVr;
+  // Mean of absolute value of row motion vectors.
   double mvr_abs;
+  // Mean of column motion vectors.
   double MVc;
+  // Mean of absolute value of column motion vectors.
   double mvc_abs;
+  // Variance of row motion vectors.
   double MVrv;
+  // Variance of column motion vectors.
   double MVcv;
+  // Value in range [-1,1] indicating fraction of row and column motion vectors
+  // that point inwards (negative MV value) or outwards (positive MV value).
+  // For example, value of 1 indicates, all row/column MVs are inwards.
   double mv_in_out_count;
+  // Count of unique non-zero motion vectors.
   double new_mv_count;
+  // Duration of the frame / collection of frames.
   double duration;
+  // 1.0 if stats are for a single frame, OR
+  // Number of frames in this collection for which the stats are accumulated.
   double count;
   // standard deviation for (0, 0) motion prediction error
   double raw_error_stdev;