summaryrefslogtreecommitdiff
path: root/vpx
diff options
context:
space:
mode:
authorJerome Jiang <jianj@google.com>2023-04-27 16:15:56 -0400
committerJerome Jiang <jianj@google.com>2023-05-01 13:39:01 -0400
commit84a180fe858fd6de9c301cd884e2f1ff341781b3 (patch)
tree5df976d008f34d2a55639a5a8900120efc3d517b /vpx
parentdbb1e8c7a6eafcd209a56c84b6f0111e74ec3ae5 (diff)
downloadlibvpx-84a180fe858fd6de9c301cd884e2f1ff341781b3.tar
libvpx-84a180fe858fd6de9c301cd884e2f1ff341781b3.tar.gz
libvpx-84a180fe858fd6de9c301cd884e2f1ff341781b3.tar.bz2
libvpx-84a180fe858fd6de9c301cd884e2f1ff341781b3.zip
Move TplFrameStats to public header
Get ready for changes to follow: - Custom reader/writer IO functions - Codec control to get TPL stats from the encoder Move the definition of TplFrameStats to public header so applications can use them directly. Bug: b/273736974 Change-Id: Ieb0db4560ddd966df1bc01f6a7e179cc97f9bac1
Diffstat (limited to 'vpx')
-rw-r--r--vpx/vpx_encoder.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/vpx/vpx_encoder.h b/vpx/vpx_encoder.h
index a0d2c8755..924723132 100644
--- a/vpx/vpx_encoder.h
+++ b/vpx/vpx_encoder.h
@@ -252,6 +252,25 @@ enum vpx_kf_mode {
VPX_KF_DISABLED = 0 /**< Encoder does not place keyframes. */
};
+/*!\brief Temporal dependency model stats for each block before propagation */
+typedef struct TplBlockStats {
+ int64_t intra_cost; /**< Intra cost */
+ int64_t inter_cost; /**< Inter cost */
+ int16_t mv_r; /**< Motion vector row */
+ int16_t mv_c; /**< Motion vector col */
+ int64_t recrf_rate; /**< Rate from reconstructed ref frame */
+ int64_t recrf_dist; /**< Distortion from reconstructed ref frame */
+ int ref_frame_index; /**< Ref frame index */
+} TplBlockStats;
+
+/*!\brief Temporal dependency model stats for each frame before propagation */
+typedef struct TplFrameStats {
+ int frame_width; /**< Frame width */
+ int frame_height; /**< Frame height */
+ // Size of the list can be calculated from frame_width and frame_height.
+ TplBlockStats *block_stats_list; /**< List of tpl stats for each block */
+} TplFrameStats;
+
/*!\brief Encoded Frame Flags
*
* This type indicates a bitfield to be passed to vpx_codec_encode(), defining