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

Yongle Lin yongle.lin.94 at gmail.com
Tue Jul 7 23:25:05 EEST 2020


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

diff --git a/libavutil/video_enc_params.h b/libavutil/video_enc_params.h
index 43fa443154..bff5354a8d 100644
--- a/libavutil/video_enc_params.h
+++ b/libavutil/video_enc_params.h
@@ -126,6 +126,21 @@ typedef struct AVVideoBlockParams {
      * corresponding per-frame value.
      */
     int32_t delta_qp;
+
+    /**
+     * Type of block
+     * Each bit field indicates a type flag:
+     * - (1 << 0) Intra prediction flag for the block
+     *   1 indicates that prediction type is intra, otherwise inter
+     * - (1 << 1) Skip flag for the block
+     *   1 indicates that a block has no residual coefficients, 0 otherwise
+     */
+     uint64_t type;
+
+    /**
+     * Reference frames used for prediction
+     */
+     uint8_t ref[8];
 } AVVideoBlockParams;
 
 /*
-- 
2.27.0.383.g050319c2ae-goog



More information about the ffmpeg-devel mailing list