1*77c1e3ccSAndroid Build Coastguard Worker /* 2*77c1e3ccSAndroid Build Coastguard Worker * Copyright (c) 2017, Alliance for Open Media. All rights reserved. 3*77c1e3ccSAndroid Build Coastguard Worker * 4*77c1e3ccSAndroid Build Coastguard Worker * This source code is subject to the terms of the BSD 2 Clause License and 5*77c1e3ccSAndroid Build Coastguard Worker * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License 6*77c1e3ccSAndroid Build Coastguard Worker * was not distributed with this source code in the LICENSE file, you can 7*77c1e3ccSAndroid Build Coastguard Worker * obtain it at www.aomedia.org/license/software. If the Alliance for Open 8*77c1e3ccSAndroid Build Coastguard Worker * Media Patent License 1.0 was not distributed with this source code in the 9*77c1e3ccSAndroid Build Coastguard Worker * PATENTS file, you can obtain it at www.aomedia.org/license/patent. 10*77c1e3ccSAndroid Build Coastguard Worker */ 11*77c1e3ccSAndroid Build Coastguard Worker #ifndef AOM_AV1_DECODER_INSPECTION_H_ 12*77c1e3ccSAndroid Build Coastguard Worker #define AOM_AV1_DECODER_INSPECTION_H_ 13*77c1e3ccSAndroid Build Coastguard Worker 14*77c1e3ccSAndroid Build Coastguard Worker #ifdef __cplusplus 15*77c1e3ccSAndroid Build Coastguard Worker extern "C" { 16*77c1e3ccSAndroid Build Coastguard Worker #endif // __cplusplus 17*77c1e3ccSAndroid Build Coastguard Worker 18*77c1e3ccSAndroid Build Coastguard Worker #include "av1/common/seg_common.h" 19*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_ACCOUNTING 20*77c1e3ccSAndroid Build Coastguard Worker #include "av1/decoder/accounting.h" 21*77c1e3ccSAndroid Build Coastguard Worker #endif 22*77c1e3ccSAndroid Build Coastguard Worker 23*77c1e3ccSAndroid Build Coastguard Worker #ifndef AOM_AOM_AOMDX_H_ 24*77c1e3ccSAndroid Build Coastguard Worker typedef void (*aom_inspect_cb)(void *decoder, void *data); 25*77c1e3ccSAndroid Build Coastguard Worker #endif 26*77c1e3ccSAndroid Build Coastguard Worker 27*77c1e3ccSAndroid Build Coastguard Worker typedef struct insp_mv insp_mv; 28*77c1e3ccSAndroid Build Coastguard Worker 29*77c1e3ccSAndroid Build Coastguard Worker struct insp_mv { 30*77c1e3ccSAndroid Build Coastguard Worker int16_t row; 31*77c1e3ccSAndroid Build Coastguard Worker int16_t col; 32*77c1e3ccSAndroid Build Coastguard Worker }; 33*77c1e3ccSAndroid Build Coastguard Worker 34*77c1e3ccSAndroid Build Coastguard Worker typedef struct insp_mi_data insp_mi_data; 35*77c1e3ccSAndroid Build Coastguard Worker 36*77c1e3ccSAndroid Build Coastguard Worker struct insp_mi_data { 37*77c1e3ccSAndroid Build Coastguard Worker insp_mv mv[2]; 38*77c1e3ccSAndroid Build Coastguard Worker int16_t ref_frame[2]; 39*77c1e3ccSAndroid Build Coastguard Worker int16_t mode; 40*77c1e3ccSAndroid Build Coastguard Worker int16_t uv_mode; 41*77c1e3ccSAndroid Build Coastguard Worker int16_t bsize; 42*77c1e3ccSAndroid Build Coastguard Worker int16_t skip; 43*77c1e3ccSAndroid Build Coastguard Worker int16_t segment_id; 44*77c1e3ccSAndroid Build Coastguard Worker int16_t dual_filter_type; 45*77c1e3ccSAndroid Build Coastguard Worker int16_t filter[2]; 46*77c1e3ccSAndroid Build Coastguard Worker int16_t tx_type; 47*77c1e3ccSAndroid Build Coastguard Worker int16_t tx_size; 48*77c1e3ccSAndroid Build Coastguard Worker int16_t cdef_level; 49*77c1e3ccSAndroid Build Coastguard Worker int16_t cdef_strength; 50*77c1e3ccSAndroid Build Coastguard Worker int16_t cfl_alpha_idx; 51*77c1e3ccSAndroid Build Coastguard Worker int16_t cfl_alpha_sign; 52*77c1e3ccSAndroid Build Coastguard Worker int16_t current_qindex; 53*77c1e3ccSAndroid Build Coastguard Worker int16_t compound_type; 54*77c1e3ccSAndroid Build Coastguard Worker int16_t motion_mode; 55*77c1e3ccSAndroid Build Coastguard Worker int16_t intrabc; 56*77c1e3ccSAndroid Build Coastguard Worker int16_t palette; 57*77c1e3ccSAndroid Build Coastguard Worker int16_t uv_palette; 58*77c1e3ccSAndroid Build Coastguard Worker }; 59*77c1e3ccSAndroid Build Coastguard Worker 60*77c1e3ccSAndroid Build Coastguard Worker typedef struct insp_frame_data insp_frame_data; 61*77c1e3ccSAndroid Build Coastguard Worker 62*77c1e3ccSAndroid Build Coastguard Worker struct insp_frame_data { 63*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_ACCOUNTING 64*77c1e3ccSAndroid Build Coastguard Worker Accounting *accounting; 65*77c1e3ccSAndroid Build Coastguard Worker #endif 66*77c1e3ccSAndroid Build Coastguard Worker insp_mi_data *mi_grid; 67*77c1e3ccSAndroid Build Coastguard Worker int16_t frame_number; 68*77c1e3ccSAndroid Build Coastguard Worker int show_frame; 69*77c1e3ccSAndroid Build Coastguard Worker int frame_type; 70*77c1e3ccSAndroid Build Coastguard Worker int base_qindex; 71*77c1e3ccSAndroid Build Coastguard Worker int mi_rows; 72*77c1e3ccSAndroid Build Coastguard Worker int mi_cols; 73*77c1e3ccSAndroid Build Coastguard Worker int tile_mi_rows; 74*77c1e3ccSAndroid Build Coastguard Worker int tile_mi_cols; 75*77c1e3ccSAndroid Build Coastguard Worker int16_t y_dequant[MAX_SEGMENTS][2]; 76*77c1e3ccSAndroid Build Coastguard Worker int16_t u_dequant[MAX_SEGMENTS][2]; 77*77c1e3ccSAndroid Build Coastguard Worker int16_t v_dequant[MAX_SEGMENTS][2]; 78*77c1e3ccSAndroid Build Coastguard Worker // TODO(negge): add per frame CDEF data 79*77c1e3ccSAndroid Build Coastguard Worker int delta_q_present_flag; 80*77c1e3ccSAndroid Build Coastguard Worker int delta_q_res; 81*77c1e3ccSAndroid Build Coastguard Worker int show_existing_frame; 82*77c1e3ccSAndroid Build Coastguard Worker }; 83*77c1e3ccSAndroid Build Coastguard Worker 84*77c1e3ccSAndroid Build Coastguard Worker void ifd_init(insp_frame_data *fd, int frame_width, int frame_height); 85*77c1e3ccSAndroid Build Coastguard Worker void ifd_clear(insp_frame_data *fd); 86*77c1e3ccSAndroid Build Coastguard Worker int ifd_inspect(insp_frame_data *fd, void *decoder, int skip_not_transform); 87*77c1e3ccSAndroid Build Coastguard Worker 88*77c1e3ccSAndroid Build Coastguard Worker #ifdef __cplusplus 89*77c1e3ccSAndroid Build Coastguard Worker } // extern "C" 90*77c1e3ccSAndroid Build Coastguard Worker #endif // __cplusplus 91*77c1e3ccSAndroid Build Coastguard Worker #endif // AOM_AV1_DECODER_INSPECTION_H_ 92