Index: source/libvpx/vp9/encoder/vp9_encoder.h |
diff --git a/source/libvpx/vp9/encoder/vp9_encoder.h b/source/libvpx/vp9/encoder/vp9_encoder.h |
index 914080c6f2ac2b0e9cd7675c589b79636d3e4f34..41f1c13d493d710ea3ff7efb245836af76e6bdbc 100644 |
--- a/source/libvpx/vp9/encoder/vp9_encoder.h |
+++ b/source/libvpx/vp9/encoder/vp9_encoder.h |
@@ -34,6 +34,9 @@ |
#include "vp9/encoder/vp9_quantize.h" |
#include "vp9/encoder/vp9_ratectrl.h" |
#include "vp9/encoder/vp9_rd.h" |
+#if CONFIG_INTERNAL_STATS |
+#include "vp9/encoder/vp9_ssim.h" |
+#endif |
#include "vp9/encoder/vp9_speed_features.h" |
#include "vp9/encoder/vp9_svc_layercontext.h" |
#include "vp9/encoder/vp9_tokenize.h" |
@@ -272,6 +275,18 @@ typedef struct ActiveMap { |
unsigned char *map; |
} ActiveMap; |
+typedef enum { |
+ Y, |
+ U, |
+ V, |
+ ALL |
+} STAT_TYPE; |
+ |
+typedef struct IMAGE_STAT { |
+ double stat[ALL+1]; |
+ double worst; |
+} ImageStat; |
+ |
typedef struct VP9_COMP { |
QUANTS quants; |
ThreadData td; |
@@ -388,19 +403,16 @@ typedef struct VP9_COMP { |
unsigned int mode_chosen_counts[MAX_MODES]; |
int count; |
- double total_y; |
- double total_u; |
- double total_v; |
- double total; |
uint64_t total_sq_error; |
uint64_t total_samples; |
+ ImageStat psnr; |
- double totalp_y; |
- double totalp_u; |
- double totalp_v; |
- double totalp; |
uint64_t totalp_sq_error; |
uint64_t totalp_samples; |
+ ImageStat psnrp; |
+ |
+ double total_blockiness; |
+ double worst_blockiness; |
int bytes; |
double summed_quality; |
@@ -408,14 +420,21 @@ typedef struct VP9_COMP { |
double summedp_quality; |
double summedp_weights; |
unsigned int tot_recode_hits; |
+ double worst_ssim; |
- |
- double total_ssimg_y; |
- double total_ssimg_u; |
- double total_ssimg_v; |
- double total_ssimg_all; |
+ ImageStat ssimg; |
+ ImageStat fastssim; |
+ ImageStat psnrhvs; |
int b_calculate_ssimg; |
+ int b_calculate_blockiness; |
+ |
+ int b_calculate_consistency; |
+ |
+ double total_inconsistency; |
+ double worst_consistency; |
+ Ssimv *ssim_vars; |
+ Metrics metrics; |
#endif |
int b_calculate_psnr; |
@@ -460,10 +479,11 @@ typedef struct VP9_COMP { |
int resize_pending; |
// VAR_BASED_PARTITION thresholds |
- int64_t vbp_threshold; |
- int64_t vbp_threshold_bsize_min; |
- int64_t vbp_threshold_bsize_max; |
- int64_t vbp_threshold_16x16; |
+ // 0 - threshold_64x64; 1 - threshold_32x32; |
+ // 2 - threshold_16x16; 3 - vbp_threshold_8x8; |
+ int64_t vbp_thresholds[4]; |
+ int64_t vbp_threshold_minmax; |
+ int64_t vbp_threshold_sad; |
BLOCK_SIZE vbp_bsize_min; |
// Multi-threading |
@@ -508,6 +528,8 @@ int vp9_update_entropy(VP9_COMP *cpi, int update); |
int vp9_set_active_map(VP9_COMP *cpi, unsigned char *map, int rows, int cols); |
+int vp9_get_active_map(VP9_COMP *cpi, unsigned char *map, int rows, int cols); |
+ |
int vp9_set_internal_size(VP9_COMP *cpi, |
VPX_SCALING horiz_mode, VPX_SCALING vert_mode); |