18d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/******************************************************************************
28d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S *
38d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * Copyright (C) 2015 The Android Open Source Project
48d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S *
58d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * Licensed under the Apache License, Version 2.0 (the "License");
68d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * you may not use this file except in compliance with the License.
78d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * You may obtain a copy of the License at:
88d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S *
98d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * http://www.apache.org/licenses/LICENSE-2.0
108d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S *
118d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * Unless required by applicable law or agreed to in writing, software
128d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * distributed under the License is distributed on an "AS IS" BASIS,
138d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
148d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * See the License for the specific language governing permissions and
158d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * limitations under the License.
168d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S *
178d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S *****************************************************************************
188d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
198d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*/
208d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/**
218d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*******************************************************************************
228d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* @file
238d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*  ihevc_typedefs.h
248d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*
258d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* @brief
268d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*  Type definitions used in the code
278d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*
288d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*
298d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* @remarks
308d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*  None
318d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*
328d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*******************************************************************************
338d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*/
348d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#ifndef _IME_STATISTICS_H_
358d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define _IME_STATISTICS_H_
368d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define DEBUG_HISTOGRAM_ENABLE 0
378d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define SAD_EXIT_STATS 0
388d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
398d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
408d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#if SAD_EXIT_STATS
418d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
428d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/**
438d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S******************************************************************************
448d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* @brief  While computing sad, if we want to do a early exit, how often we
458d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* should check if the sad computed till now has exceeded min sad param is
468d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* chosen statistically.
478d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* ******************************************************************************
488d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*/
498d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha Sextern UWORD32 gu4_16x16_sad_ee_stats[16+1];
508d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha Sextern UWORD32 gu4_16x8_sad_ee_stats[8+1];
518d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
528d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/**
538d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S******************************************************************************
548d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*  @brief print sad early exit stats
558d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S******************************************************************************
568d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*/
578d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha Sextern void print_sad_ee_stats(void);
588d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
598d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define GATHER_16x16_SAD_EE_STATS(gu4_16x16_sad_ee_stats, i) \
608d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S                gu4_16x16_sad_ee_stats[i]++;
618d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define GATHER_16x8_SAD_EE_STATS(gu4_16x8_sad_ee_stats, i) \
628d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S                gu4_16x8_sad_ee_stats[i]++;
638d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
648d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#else
658d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
668d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define GATHER_16x16_SAD_EE_STATS(gu4_16x16_sad_ee_stats, i)
678d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define GATHER_16x8_SAD_EE_STATS(gu4_16x8_sad_ee_stats, i)
688d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
698d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#endif
708d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
718d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
728d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#if DEBUG_HISTOGRAM_ENABLE
738d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define DEBUG_HISTOGRAM_INIT() debug_histogram_init()
748d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define DEBUG_HISTOGRAM_DUMP(condition) if(condition) debug_histogram_dump()
758d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define DEBUG_MV_HISTOGRAM_ADD(mv_x, mv_y) debug_mv_histogram_add(mv_x, mv_y)
768d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define DEBUG_SAD_HISTOGRAM_ADD(sad, level) debug_sad_histogram_add(sad, level)
778d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#else
788d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define DEBUG_HISTOGRAM_INIT()
798d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define DEBUG_HISTOGRAM_DUMP(condition)
808d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define DEBUG_MV_HISTOGRAM_ADD(mv_x, mv_y)
818d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define DEBUG_SAD_HISTOGRAM_ADD(sad, level)
828d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#endif
838d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
848d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
858d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
868d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#endif /*_IME_STATISTICS_H_*/
87