shithub: libvpx

Download patch

ref: 18e93be9f2e9c863be573e910ff6940547fa0cad
parent: 087e4e0b07fa8d6190b508e60c0b67f627cea499
author: Cheng Chen <chengchen@google.com>
date: Mon Jan 13 07:31:33 EST 2020

Add comments to frame counts.

Change-Id: I74a1ccb55af78af1153af75734ca43fa140910a7

--- a/vp9/simple_encode.h
+++ b/vp9/simple_encode.h
@@ -50,30 +50,67 @@
 
 // This structure is a copy of vp9 |tx_counts|.
 struct TransformSizeCounts {
+  // Transform size found in blocks of partition size 32x32.
+  // First dimension: transform size contexts (2).
+  // Second dimension: transform size type (3: 32x32, 16x16, 8x8)
   std::vector<std::vector<unsigned int>> p32x32;
+  // Transform size found in blocks of partition size 16x16.
+  // First dimension: transform size contexts (2).
+  // Second dimension: transform size type (2: 16x16, 8x8)
   std::vector<std::vector<unsigned int>> p16x16;
+  // Transform size found in blocks of partition size 8x8.
+  // First dimension: transform size contexts (2).
+  // Second dimension: transform size type (1: 8x8)
   std::vector<std::vector<unsigned int>> p8x8;
+  // Overall transform size count.
   std::vector<unsigned int> tx_totals;
 };
 
 // This structure is a copy of vp9 |FRAME_COUNTS|.
 struct FrameCounts {
+  // Intra prediction mode for luma plane. First dimension: block size (4).
+  // Second dimension: intra prediction mode (10).
   std::vector<std::vector<unsigned int>> y_mode;
+  // Intra prediction mode for chroma plane. First and second dimension:
+  // intra prediction mode (10).
   std::vector<std::vector<unsigned int>> uv_mode;
+  // Partition type. First dimension: partition contexts (16).
+  // Second dimension: partition type (4).
   std::vector<std::vector<unsigned int>> partition;
+  // Transform coefficient.
   std::vector<std::vector<
       std::vector<std::vector<std::vector<std::vector<unsigned int>>>>>>
       coef;
+  // End of block (the position of the last non-zero transform coefficient)
   std::vector<std::vector<std::vector<std::vector<std::vector<unsigned int>>>>>
       eob_branch;
+  // Interpolation filter type. First dimension: switchable filter contexts (4).
+  // Second dimension: filter types (3).
   std::vector<std::vector<unsigned int>> switchable_interp;
+  // Inter prediction mode (the motion vector type).
+  // First dimension: inter mode contexts (7).
+  // Second dimension: mode type (4).
   std::vector<std::vector<unsigned int>> inter_mode;
+  // Block is intra or inter predicted. First dimension: contexts (4).
+  // Second dimension: type (0 for intra, 1 for inter).
   std::vector<std::vector<unsigned int>> intra_inter;
+  // Block is compound predicted (predicted from average of two blocks).
+  // First dimension: contexts (5).
+  // Second dimension: type (0 for single, 1 for compound prediction).
   std::vector<std::vector<unsigned int>> comp_inter;
+  // Type of the reference frame. Only one reference frame.
+  // First dimension: context (5). Second dimension: context (2).
+  // Third dimension: count (2).
   std::vector<std::vector<std::vector<unsigned int>>> single_ref;
+  // Type of the two reference frames.
+  // First dimension: context (5). Second dimension: count (2).
   std::vector<std::vector<unsigned int>> comp_ref;
+  // Block skips transform and quantization, uses prediction as reconstruction.
+  // First dimension: contexts (3). Second dimension: type (0 not skip, 1 skip).
   std::vector<std::vector<unsigned int>> skip;
+  // Transform size.
   TransformSizeCounts tx;
+  // New motion vector.
   NewMotionVectorContextCounts mv;
 };