Commit 0955881a authored by Michael Bebenita's avatar Michael Bebenita
Browse files

Add CDEF support to inspection API

Change-Id: I46101bf22f38a642850b875fb333e7c6b9c1d5b8
parent f8abdb03
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
#include "av1/decoder/decoder.h" #include "av1/decoder/decoder.h"
#include "av1/decoder/inspection.h" #include "av1/decoder/inspection.h"
#include "av1/common/enums.h" #include "av1/common/enums.h"
#if CONFIG_CDEF
#include "av1/common/cdef.h"
#endif
void ifd_init(insp_frame_data *fd, int frame_width, int frame_height) { void ifd_init(insp_frame_data *fd, int frame_width, int frame_height) {
fd->mi_cols = ALIGN_POWER_OF_TWO(frame_width, MI_SIZE_LOG2) >> MI_SIZE_LOG2; fd->mi_cols = ALIGN_POWER_OF_TWO(frame_width, MI_SIZE_LOG2) >> MI_SIZE_LOG2;
...@@ -75,8 +78,12 @@ int ifd_inspect(insp_frame_data *fd, void *decoder) { ...@@ -75,8 +78,12 @@ int ifd_inspect(insp_frame_data *fd, void *decoder) {
// Transform // Transform
mi->tx_type = mbmi->tx_type; mi->tx_type = mbmi->tx_type;
mi->tx_size = mbmi->tx_size; mi->tx_size = mbmi->tx_size;
#if CONFIG_CDEF #if CONFIG_CDEF
// TODO(negge): copy per block CDEF data mi->cdef_level = cm->cdef_strengths[mbmi->cdef_strength] / CLPF_STRENGTHS;
mi->cdef_strength =
cm->cdef_strengths[mbmi->cdef_strength] % CLPF_STRENGTHS;
mi->cdef_strength += mi->cdef_strength == 3;
#endif #endif
} }
} }
......
...@@ -41,7 +41,8 @@ struct insp_mi_data { ...@@ -41,7 +41,8 @@ struct insp_mi_data {
int8_t tx_type; int8_t tx_type;
int8_t tx_size; int8_t tx_size;
#if CONFIG_CDEF #if CONFIG_CDEF
// TODO(negge): add per block CDEF data int8_t cdef_level;
int8_t cdef_strength;
#endif #endif
}; };
......
...@@ -434,11 +434,10 @@ void inspect(void *pbi, void *data) { ...@@ -434,11 +434,10 @@ void inspect(void *pbi, void *data) {
buf += put_block_info(buf, NULL, "filter", offsetof(insp_mi_data, filter)); buf += put_block_info(buf, NULL, "filter", offsetof(insp_mi_data, filter));
} }
if (layers & CDEF_LAYER) { if (layers & CDEF_LAYER) {
// buf += put_block_info(buf, NULL, "clpf", buf += put_block_info(buf, NULL, "cdef_level",
// offsetof(insp_mi_data, clpf)); offsetof(insp_mi_data, cdef_level));
// buf += sprintf(buf, " \"clpfStrengthY\": %d,\n", buf += put_block_info(buf, NULL, "cdef_strength",
// frame_data.clpf_strength_y); offsetof(insp_mi_data, cdef_strength));
// buf += sprintf(buf, " \"clpfSize\": %d,\n", frame_data.clpf_size);
} }
if (layers & MOTION_VECTORS_LAYER) { if (layers & MOTION_VECTORS_LAYER) {
buf += put_motion_vectors(buf); buf += put_motion_vectors(buf);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment