Add frame inspection data to the analyzer.
Change-Id: I753b51a1ae9759086198c7433410717296f61c20
This commit is contained in:
Родитель
4d2af5db6c
Коммит
2693ca5283
|
@ -498,13 +498,13 @@ post_process_cmdline() {
|
|||
log_echo "disabling tile_groups"
|
||||
disable_feature tile_groups
|
||||
fi
|
||||
|
||||
# Enable accounting and inspection when building the analyzer
|
||||
if enabled analyzer; then
|
||||
soft_enable accounting
|
||||
soft_enable inspection
|
||||
fi
|
||||
}
|
||||
|
||||
# Enable accounting if building the analyzer
|
||||
enabled analyzer && soft_enable accounting
|
||||
|
||||
|
||||
process_targets() {
|
||||
enabled child || write_common_config_banner
|
||||
write_common_target_config_h ${BUILD_PFX}aom_config.h
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "aom/aomdx.h"
|
||||
#include "av1/common/accounting.h"
|
||||
#include "av1/common/onyxc_int.h"
|
||||
#include "av1/decoder/inspection.h"
|
||||
|
||||
#define OD_SIGNMASK(a) (-((a) < 0))
|
||||
#define OD_FLIPSIGNI(a, b) (((a) + OD_SIGNMASK(b)) ^ OD_SIGNMASK(b))
|
||||
|
@ -39,6 +40,8 @@ class AV1Decoder {
|
|||
const AvxVideoInfo *info;
|
||||
const AvxInterface *decoder;
|
||||
|
||||
insp_frame_data frame_data;
|
||||
|
||||
aom_codec_ctx_t codec;
|
||||
|
||||
public:
|
||||
|
@ -57,8 +60,10 @@ class AV1Decoder {
|
|||
int getWidth() const;
|
||||
int getHeight() const;
|
||||
|
||||
bool setAccountingEnabled(bool enable);
|
||||
bool getAccountingStruct(Accounting **acct);
|
||||
bool setInspectionCallback();
|
||||
|
||||
static void inspect(void *decoder, void *data);
|
||||
};
|
||||
|
||||
AV1Decoder::AV1Decoder()
|
||||
|
@ -84,6 +89,8 @@ bool AV1Decoder::open(const wxString &path) {
|
|||
fprintf(stderr, "Failed to initialize decoder.");
|
||||
return false;
|
||||
}
|
||||
ifd_init(&frame_data, info->frame_width, info->frame_height);
|
||||
setInspectionCallback();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -119,6 +126,19 @@ bool AV1Decoder::getAccountingStruct(Accounting **accounting) {
|
|||
AOM_CODEC_OK;
|
||||
}
|
||||
|
||||
bool AV1Decoder::setInspectionCallback() {
|
||||
aom_inspect_init ii;
|
||||
ii.inspect_cb = AV1Decoder::inspect;
|
||||
ii.inspect_ctx = (void *)this;
|
||||
return aom_codec_control(&codec, AV1_SET_INSPECTION_CALLBACK, &ii) ==
|
||||
AOM_CODEC_OK;
|
||||
}
|
||||
|
||||
void AV1Decoder::inspect(void *pbi, void *data) {
|
||||
AV1Decoder *decoder = (AV1Decoder *)data;
|
||||
ifd_inspect(&decoder->frame_data, pbi);
|
||||
}
|
||||
|
||||
#define MIN_ZOOM (1)
|
||||
#define MAX_ZOOM (4)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче