Nathan E. Egge | 20f9ae1 | 2017-03-02 20:13:17 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017, Alliance for Open Media. All rights reserved |
| 3 | * |
| 4 | * This source code is subject to the terms of the BSD 2 Clause License and |
| 5 | * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License |
| 6 | * was not distributed with this source code in the LICENSE file, you can |
| 7 | * obtain it at www.aomedia.org/license/software. If the Alliance for Open |
| 8 | * Media Patent License 1.0 was not distributed with this source code in the |
| 9 | * PATENTS file, you can obtain it at www.aomedia.org/license/patent. |
| 10 | */ |
James Zern | e1cbb13 | 2018-08-22 14:10:36 -0700 | [diff] [blame] | 11 | #ifndef AOM_AV1_DECODER_INSPECTION_H_ |
| 12 | #define AOM_AV1_DECODER_INSPECTION_H_ |
Nathan E. Egge | 2cf03b1 | 2017-02-22 16:19:59 -0500 | [diff] [blame] | 13 | |
Nathan E. Egge | 74b7338 | 2017-03-02 19:31:44 -0500 | [diff] [blame] | 14 | #ifdef __cplusplus |
| 15 | extern "C" { |
| 16 | #endif // __cplusplus |
| 17 | |
Yaowu Xu | 6496fe9 | 2017-05-15 16:00:38 -0700 | [diff] [blame] | 18 | #include "av1/common/seg_common.h" |
Nathan E. Egge | 2cf03b1 | 2017-02-22 16:19:59 -0500 | [diff] [blame] | 19 | #if CONFIG_ACCOUNTING |
Luc Trudeau | 83fbd57 | 2017-04-21 11:24:34 -0400 | [diff] [blame] | 20 | #include "av1/decoder/accounting.h" |
Nathan E. Egge | 2cf03b1 | 2017-02-22 16:19:59 -0500 | [diff] [blame] | 21 | #endif |
| 22 | |
Jim Bankoski | 8aced4b | 2018-10-01 13:03:41 -0700 | [diff] [blame] | 23 | #ifndef AOM_AOM_AOMDX_H_ |
Nathan E. Egge | 2cf03b1 | 2017-02-22 16:19:59 -0500 | [diff] [blame] | 24 | typedef void (*aom_inspect_cb)(void *decoder, void *data); |
Yushin Cho | f674157 | 2017-10-24 20:07:46 -0700 | [diff] [blame] | 25 | #endif |
Nathan E. Egge | 2cf03b1 | 2017-02-22 16:19:59 -0500 | [diff] [blame] | 26 | |
| 27 | typedef struct insp_mv insp_mv; |
| 28 | |
| 29 | struct insp_mv { |
| 30 | int16_t row; |
| 31 | int16_t col; |
| 32 | }; |
| 33 | |
| 34 | typedef struct insp_mi_data insp_mi_data; |
| 35 | |
| 36 | struct insp_mi_data { |
| 37 | insp_mv mv[2]; |
Yushin Cho | c24351c | 2017-10-24 14:59:08 -0700 | [diff] [blame] | 38 | int16_t ref_frame[2]; |
| 39 | int16_t mode; |
| 40 | int16_t uv_mode; |
chiyotsai | 0f5cd05 | 2020-08-27 14:37:44 -0700 | [diff] [blame] | 41 | int16_t bsize; |
Yushin Cho | c24351c | 2017-10-24 14:59:08 -0700 | [diff] [blame] | 42 | int16_t skip; |
| 43 | int16_t segment_id; |
Yushin Cho | c24351c | 2017-10-24 14:59:08 -0700 | [diff] [blame] | 44 | int16_t dual_filter_type; |
| 45 | int16_t filter[2]; |
Yushin Cho | c24351c | 2017-10-24 14:59:08 -0700 | [diff] [blame] | 46 | int16_t tx_type; |
| 47 | int16_t tx_size; |
Yushin Cho | c24351c | 2017-10-24 14:59:08 -0700 | [diff] [blame] | 48 | int16_t cdef_level; |
| 49 | int16_t cdef_strength; |
Yushin Cho | c24351c | 2017-10-24 14:59:08 -0700 | [diff] [blame] | 50 | int16_t cfl_alpha_idx; |
| 51 | int16_t cfl_alpha_sign; |
Yushin Cho | c24351c | 2017-10-24 14:59:08 -0700 | [diff] [blame] | 52 | int16_t current_qindex; |
Jim Bankoski | 21b68a0 | 2018-10-19 13:28:25 -0700 | [diff] [blame] | 53 | int16_t compound_type; |
| 54 | int16_t motion_mode; |
Hui Su | 83684e1 | 2019-03-19 12:17:34 -0700 | [diff] [blame] | 55 | int16_t intrabc; |
| 56 | int16_t palette; |
| 57 | int16_t uv_palette; |
Nathan E. Egge | 2cf03b1 | 2017-02-22 16:19:59 -0500 | [diff] [blame] | 58 | }; |
| 59 | |
| 60 | typedef struct insp_frame_data insp_frame_data; |
| 61 | |
| 62 | struct insp_frame_data { |
| 63 | #if CONFIG_ACCOUNTING |
| 64 | Accounting *accounting; |
| 65 | #endif |
| 66 | insp_mi_data *mi_grid; |
Jim Bankoski | 21b68a0 | 2018-10-19 13:28:25 -0700 | [diff] [blame] | 67 | int16_t frame_number; |
Nathan E. Egge | 2cf03b1 | 2017-02-22 16:19:59 -0500 | [diff] [blame] | 68 | int show_frame; |
| 69 | int frame_type; |
| 70 | int base_qindex; |
| 71 | int mi_rows; |
| 72 | int mi_cols; |
Michael Bebenita | 2c2e561 | 2017-04-06 22:19:04 -0400 | [diff] [blame] | 73 | int tile_mi_rows; |
| 74 | int tile_mi_cols; |
Nathan E. Egge | 2cf03b1 | 2017-02-22 16:19:59 -0500 | [diff] [blame] | 75 | int16_t y_dequant[MAX_SEGMENTS][2]; |
Yaowu Xu | be42dc7 | 2017-11-08 17:38:24 -0800 | [diff] [blame] | 76 | int16_t u_dequant[MAX_SEGMENTS][2]; |
| 77 | int16_t v_dequant[MAX_SEGMENTS][2]; |
Frederic Barbier | 1aeee2e | 2017-11-10 17:54:22 +0100 | [diff] [blame] | 78 | // TODO(negge): add per frame CDEF data |
Yushin Cho | c24351c | 2017-10-24 14:59:08 -0700 | [diff] [blame] | 79 | int delta_q_present_flag; |
| 80 | int delta_q_res; |
Jim Bankoski | 3f73287 | 2018-10-29 06:54:18 -0700 | [diff] [blame] | 81 | int show_existing_frame; |
Nathan E. Egge | 2cf03b1 | 2017-02-22 16:19:59 -0500 | [diff] [blame] | 82 | }; |
| 83 | |
| 84 | void ifd_init(insp_frame_data *fd, int frame_width, int frame_height); |
| 85 | void ifd_clear(insp_frame_data *fd); |
Jim Bankoski | c04ce61 | 2018-12-20 15:45:33 -0800 | [diff] [blame] | 86 | int ifd_inspect(insp_frame_data *fd, void *decoder, int skip_not_transform); |
Nathan E. Egge | 2cf03b1 | 2017-02-22 16:19:59 -0500 | [diff] [blame] | 87 | |
Nathan E. Egge | 74b7338 | 2017-03-02 19:31:44 -0500 | [diff] [blame] | 88 | #ifdef __cplusplus |
| 89 | } // extern "C" |
| 90 | #endif // __cplusplus |
James Zern | e1cbb13 | 2018-08-22 14:10:36 -0700 | [diff] [blame] | 91 | #endif // AOM_AV1_DECODER_INSPECTION_H_ |