[FFmpeg-devel] [PATCH] libavutil/video_enc_params: add block type

Yongle Lin yongle.lin.94 at gmail.com
Tue Jul 7 00:08:17 EEST 2020


add block type field to AVVideoBlockParams so we could either export or visualize it later.
---
 libavutil/video_enc_params.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/libavutil/video_enc_params.h b/libavutil/video_enc_params.h
index 43fa443154..55b9fc4031 100644
--- a/libavutil/video_enc_params.h
+++ b/libavutil/video_enc_params.h
@@ -101,6 +101,21 @@ typedef struct AVVideoEncParams {
     int32_t delta_qp[4][2];
 } AVVideoEncParams;
 
+typedef struct MacroBlockType {
+    /**
+     * Is intra prediction
+     */
+    int intra;
+    /**
+     * Skip flag
+     */
+    int skip;
+    /**
+     * Reference to the past or future
+     */
+    int ref[2];
+} MacroBlockType;
+
 /**
  * Data structure for storing block-level encoding information.
  * It is allocated as a part of AVVideoEncParams and should be retrieved with
@@ -126,6 +141,11 @@ typedef struct AVVideoBlockParams {
      * corresponding per-frame value.
      */
     int32_t delta_qp;
+
+    /**
+     * Type of block
+     */
+    MacroBlockType mb_type;
 } AVVideoBlockParams;
 
 /*
-- 
2.27.0.383.g050319c2ae-goog



More information about the ffmpeg-devel mailing list