'DMetrics' gathers statistics about specific tool usage when decoding. Along with tool counting, information about granularity at which use of tools is signaled (CU, TU)and % of impacted pixels in sequence is also provided. Usage of metrics tool can be controlled at command line of the executable, with the following command-line parameters: - metrics file (--MetricFile), where statistic is saved - list of monitored tools (--MetricTools) This software version includes support for two tools "M_AFFINE" and "M_NSST" which gather statistic about 'Affine motion [AFF]' tool and 'Non-separable secondary transform [NSST]' respectively. The tool is activated during runtime using '--MetricTools' command line parameter in form of 'tool_1,tool_2' (e.g. "M_AFFINE,M_NSST"). To use metrics instrumentation it is required to set the following definitions to 'ON' while configuring the project: - SET_ENABLE_TRACING/ENABLE_TRACING - SET_ENABLE_METRICS/ENABLE_METRICS Example: cmake -DCMAKE_BUILD_TYPE=release -DSET_ENABLE_TRACING=ON -DSET_ENABLE_METRICS=ON -DENABLE_METRICS=ON .. At initialization stage, metrics tool parses list of monitored tools (--MetricTools) and sets up the global context. During de-initialization stage, the tool finalizes statistics and saves to output file. This is an example of output file for AFF and NSST tools (M_FRAME counts all pixels in the bitstream): ============================================ M_FRAME: 500 pixels:49920000 M_AFFINE: 16454 M_AFFINE_128x128: 34 pixels: 557056 M_AFFINE_128x16 : 6 pixels: 12288 M_AFFINE_128x32 : 8 pixels: 32768 M_AFFINE_128x4 : 1 pixels: 512 M_AFFINE_128x64 : 8 pixels: 65536 M_AFFINE_128x8 : 3 pixels: 3072 M_AFFINE_16x128 : 10 pixels: 20480 M_AFFINE_16x16 : 4877 pixels: 1248512 M_AFFINE_16x32 : 1606 pixels: 822272 M_AFFINE_16x4 : 296 pixels: 18944 M_AFFINE_16x64 : 335 pixels: 343040 M_AFFINE_16x8 : 555 pixels: 71040 M_AFFINE_32x128 : 23 pixels: 94208 M_AFFINE_32x16 : 823 pixels: 421376 M_AFFINE_32x32 : 2726 pixels: 2791424 M_AFFINE_32x4 : 84 pixels: 10752 M_AFFINE_32x64 : 362 pixels: 741376 M_AFFINE_32x8 : 249 pixels: 63744 M_AFFINE_4x128 : 2 pixels: 1024 M_AFFINE_4x16 : 629 pixels: 40256 M_AFFINE_4x32 : 337 pixels: 43136 M_AFFINE_4x64 : 72 pixels: 18432 M_AFFINE_64x128 : 19 pixels: 155648 M_AFFINE_64x16 : 109 pixels: 111616 M_AFFINE_64x32 : 182 pixels: 372736 M_AFFINE_64x4 : 11 pixels: 2816 M_AFFINE_64x64 : 455 pixels: 1863680 M_AFFINE_64x8 : 27 pixels: 13824 M_AFFINE_8x128 : 2 pixels: 2048 M_AFFINE_8x16 : 981 pixels: 125568 M_AFFINE_8x32 : 798 pixels: 204288 M_AFFINE_8x64 : 98 pixels: 50176 M_AFFINE_8x8 : 726 pixels: 46464 Total impacted pixels % impacted pixels 10370112 20.77% M_NSST: 0 Total impacted pixels % impacted pixels 0 0.00% ============================================ Metrics tool uses simple text back-end (writes to text file) for statistic results. As an experimental extension, ITT (Instrumentation and Tracing Technology) is implemented. ITT back-end could be used to gather information not only about tool usage, but also saves time point and duration of each event (tool appliance) which could be used to define tool's hotspots. See additional details about ITT here https://github.com/intel/IntelSEAPI Known limitations: - Only two tools (AFF, NSST) are supported for now - NSST tool usage is calculated for luma component only Future improvements: - Remove current limitations - Gather statistic about all prediction modes - Profile results on per-frame and/or per-bitstream basis - Instrument other tools