[FFmpeg-devel] [PATCH] avformat/framehash: Add more information to the output

wm4 nfxjfg at googlemail.com
Wed Mar 30 23:16:05 CEST 2016


On Wed, 30 Mar 2016 22:54:50 +0200
Michael Niedermayer <michael at niedermayer.cc> wrote:

> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>  libavformat/framehash.c                            |   13 +++++++++++++
>  tests/ref/fate/4xm-1                               |    4 ++++
>  tests/ref/fate/4xm-2                               |    4 ++++
>  tests/ref/fate/8bps                                |    8 ++++++++
>  tests/ref/fate/aasc                                |    4 ++++
>  tests/ref/fate/adpcm-4xm                           |    4 ++++
>  tests/ref/fate/adpcm-afc                           |    4 ++++
>  tests/ref/fate/adpcm-dtk                           |    4 ++++
>  tests/ref/fate/adpcm-ea-1                          |    4 ++++
>  tests/ref/fate/adpcm-ea-2                          |    4 ++++
>  tests/ref/fate/adpcm-ea-maxis-xa                   |    4 ++++
>  tests/ref/fate/adpcm-ea-r1                         |    4 ++++
>  tests/ref/fate/adpcm-ima-amv                       |    4 ++++
>  tests/ref/fate/adpcm-ima-ea-eacs                   |    4 ++++
>  tests/ref/fate/adpcm-ima-ea-sead                   |    4 ++++
>  tests/ref/fate/adpcm-ima-smjpeg                    |    4 ++++
>  tests/ref/fate/adpcm-ima-ws                        |    4 ++++
>  tests/ref/fate/adpcm-ms-mono                       |    4 ++++
>  tests/ref/fate/adpcm-thp                           |    4 ++++
>  tests/ref/fate/adpcm-vima                          |    4 ++++
>  tests/ref/fate/adpcm-xa                            |    4 ++++
>  tests/ref/fate/aic                                 |    4 ++++
>  tests/ref/fate/aic-oddsize                         |    4 ++++
>  tests/ref/fate/alg-mm                              |    4 ++++
>  tests/ref/fate/aliaspix-bgr                        |    4 ++++
>  tests/ref/fate/aliaspix-gray                       |    4 ++++
>  tests/ref/fate/amv                                 |    4 ++++
>  tests/ref/fate/ansi                                |    4 ++++
>  tests/ref/fate/ansi256                             |    4 ++++
>  tests/ref/fate/armovie-escape124                   |    8 ++++++++
>  tests/ref/fate/armovie-escape130                   |    4 ++++
>  tests/ref/fate/asf-repldata                        |    4 ++++
>  tests/ref/fate/auravision-v1                       |    4 ++++
>  tests/ref/fate/auravision-v2                       |    4 ++++
>  tests/ref/fate/avio-direct                         |    4 ++++
>  tests/ref/fate/bethsoft-vid                        |    8 ++++++++
>  tests/ref/fate/bfi                                 |    8 ++++++++
>  tests/ref/fate/bink-video-b                        |    4 ++++
>  tests/ref/fate/bink-video-f                        |    4 ++++
>  tests/ref/fate/bink-video-i                        |    4 ++++
>  tests/ref/fate/bmp-15bit                           |    4 ++++
>  tests/ref/fate/bmp-15bit-mask                      |    4 ++++
>  tests/ref/fate/bmp-16bit-mask                      |    4 ++++
>  tests/ref/fate/bmp-1bit                            |    4 ++++
>  tests/ref/fate/bmp-24bit                           |    4 ++++
>  tests/ref/fate/bmp-32bit                           |    4 ++++
>  tests/ref/fate/bmp-32bit-mask                      |    4 ++++
>  tests/ref/fate/bmp-4bit                            |    4 ++++
>  tests/ref/fate/bmp-4bit-os2                        |    4 ++++
>  tests/ref/fate/bmp-8bit                            |    4 ++++
>  tests/ref/fate/bmp-8bit-os2                        |    4 ++++
>  tests/ref/fate/bmp-rle4                            |    4 ++++
>  tests/ref/fate/bmp-rle8                            |    4 ++++
>  tests/ref/fate/bmpparser                           |    4 ++++
>  tests/ref/fate/bmv-audio                           |    4 ++++
>  tests/ref/fate/bmv-video                           |    4 ++++
>  tests/ref/fate/brenderpix-24                       |    4 ++++
>  tests/ref/fate/brenderpix-565                      |    4 ++++
>  tests/ref/fate/brenderpix-defpal                   |    4 ++++
>  tests/ref/fate/brenderpix-intpal                   |    4 ++++
>  tests/ref/fate/brenderpix-y400a                    |    4 ++++
>  tests/ref/fate/canopus-cllc-argb                   |    4 ++++
>  tests/ref/fate/canopus-cllc-rgb                    |    4 ++++
>  tests/ref/fate/canopus-cllc-yuy2-noblock           |    4 ++++
>  tests/ref/fate/canopus-hq_hqa-hq                   |    4 ++++
>  tests/ref/fate/canopus-hq_hqa-hqa                  |    4 ++++
>  tests/ref/fate/canopus-hq_hqa-inter                |    4 ++++
>  tests/ref/fate/canopus-hqx422                      |    4 ++++
>  tests/ref/fate/canopus-hqx422a                     |    4 ++++
>  tests/ref/fate/cavs                                |    4 ++++
>  tests/ref/fate/cdgraphics                          |    4 ++++
>  tests/ref/fate/cdxl-bitline-ham6                   |    4 ++++
>  tests/ref/fate/cdxl-demux                          |    8 ++++++++
>  tests/ref/fate/cdxl-ham6                           |    4 ++++
>  tests/ref/fate/cdxl-ham8                           |    4 ++++
>  tests/ref/fate/cdxl-pal8                           |    4 ++++
>  tests/ref/fate/cdxl-pal8-small                     |    4 ++++
>  tests/ref/fate/cljr                                |    4 ++++
>  tests/ref/fate/corepng                             |    8 ++++++++
>  tests/ref/fate/creatureshock-avs                   |    8 ++++++++
>  tests/ref/fate/cscd                                |    4 ++++
>  tests/ref/fate/cvid-grayscale                      |    4 ++++
>  tests/ref/fate/cvid-palette                        |    4 ++++
>  tests/ref/fate/cvid-partial                        |    4 ++++
>  tests/ref/fate/cyberia-c93                         |    8 ++++++++
>  tests/ref/fate/cyuv                                |    4 ++++
>  tests/ref/fate/d-cinema-demux                      |    4 ++++
>  tests/ref/fate/d-eavp6-demux                       |    8 ++++++++
>  tests/ref/fate/dca-xll_51_16_192_768_0             |    4 ++++
>  tests/ref/fate/dca-xll_51_16_192_768_0-dmix_2      |    4 ++++
>  tests/ref/fate/dca-xll_51_16_192_768_0-dmix_6      |    4 ++++
>  tests/ref/fate/dca-xll_51_16_192_768_1             |    4 ++++
>  tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2      |    4 ++++
>  tests/ref/fate/dca-xll_51_16_192_768_1-dmix_6      |    4 ++++
>  tests/ref/fate/dca-xll_51_24_48_768                |    4 ++++
>  tests/ref/fate/dca-xll_51_24_48_768-dmix_2         |    4 ++++
>  tests/ref/fate/dca-xll_51_24_48_768-dmix_6         |    4 ++++
>  tests/ref/fate/dca-xll_51_24_48_none               |    4 ++++
>  tests/ref/fate/dca-xll_51_24_48_none-dmix_2        |    4 ++++
>  tests/ref/fate/dca-xll_51_24_48_none-dmix_6        |    4 ++++
>  tests/ref/fate/dca-xll_71_24_48_768_0              |    4 ++++
>  tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2       |    4 ++++
>  tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6       |    4 ++++
>  tests/ref/fate/dca-xll_71_24_48_768_1              |    4 ++++
>  tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2       |    4 ++++
>  tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6       |    4 ++++
>  tests/ref/fate/dca-xll_71_24_96_768                |    4 ++++
>  tests/ref/fate/dca-xll_71_24_96_768-dmix_2         |    4 ++++
>  tests/ref/fate/dca-xll_71_24_96_768-dmix_6         |    4 ++++
>  tests/ref/fate/dca-xll_x96_51_24_96_1509           |    4 ++++
>  tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_2    |    4 ++++
>  tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_6    |    4 ++++
>  tests/ref/fate/dca-xll_xch_61_24_48_768            |    4 ++++
>  tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_2     |    4 ++++
>  tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_6     |    4 ++++
>  tests/ref/fate/dcinema-encode                      |    4 ++++
>  tests/ref/fate/dds-argb                            |    4 ++++
>  tests/ref/fate/dds-argb-aexp                       |    4 ++++
>  tests/ref/fate/dds-dx10-bc1                        |    4 ++++
>  tests/ref/fate/dds-dx10-bc1a                       |    4 ++++
>  tests/ref/fate/dds-dx10-bc2                        |    4 ++++
>  tests/ref/fate/dds-dx10-bc3                        |    4 ++++
>  tests/ref/fate/dds-dx10-bc4                        |    4 ++++
>  tests/ref/fate/dds-dx10-bc5                        |    4 ++++
>  tests/ref/fate/dds-dxt1                            |    4 ++++
>  tests/ref/fate/dds-dxt1-normalmap                  |    4 ++++
>  tests/ref/fate/dds-dxt1a                           |    4 ++++
>  tests/ref/fate/dds-dxt2                            |    4 ++++
>  tests/ref/fate/dds-dxt3                            |    4 ++++
>  tests/ref/fate/dds-dxt4                            |    4 ++++
>  tests/ref/fate/dds-dxt5                            |    4 ++++
>  tests/ref/fate/dds-dxt5-aexp                       |    4 ++++
>  tests/ref/fate/dds-dxt5-normalmap                  |    4 ++++
>  tests/ref/fate/dds-dxt5-normalmap-ati              |    4 ++++
>  tests/ref/fate/dds-dxt5-rbxg                       |    4 ++++
>  tests/ref/fate/dds-dxt5-rgxb                       |    4 ++++
>  tests/ref/fate/dds-dxt5-rxbg                       |    4 ++++
>  tests/ref/fate/dds-dxt5-rxgb                       |    4 ++++
>  tests/ref/fate/dds-dxt5-xgbr                       |    4 ++++
>  tests/ref/fate/dds-dxt5-xgxr                       |    4 ++++
>  tests/ref/fate/dds-dxt5-xrbg                       |    4 ++++
>  tests/ref/fate/dds-dxt5-ycocg                      |    4 ++++
>  tests/ref/fate/dds-dxt5-ycocg-scaled               |    4 ++++
>  tests/ref/fate/dds-pal                             |    4 ++++
>  tests/ref/fate/dds-pal-ati                         |    4 ++++
>  tests/ref/fate/dds-rgb16                           |    4 ++++
>  tests/ref/fate/dds-rgb24                           |    4 ++++
>  tests/ref/fate/dds-rgba                            |    4 ++++
>  tests/ref/fate/dds-rgtc1s                          |    4 ++++
>  tests/ref/fate/dds-rgtc1u                          |    4 ++++
>  tests/ref/fate/dds-rgtc2s                          |    4 ++++
>  tests/ref/fate/dds-rgtc2u                          |    4 ++++
>  tests/ref/fate/dds-rgtc2u-xy                       |    4 ++++
>  tests/ref/fate/dds-uyvy                            |    4 ++++
>  tests/ref/fate/dds-xbgr                            |    4 ++++
>  tests/ref/fate/dds-xrgb                            |    4 ++++
>  tests/ref/fate/dds-y                               |    4 ++++
>  tests/ref/fate/dds-ya                              |    4 ++++
>  tests/ref/fate/dds-ycocg                           |    4 ++++
>  tests/ref/fate/dds-yuyv                            |    4 ++++
>  tests/ref/fate/delphine-cin-audio                  |    4 ++++
>  tests/ref/fate/delphine-cin-video                  |    4 ++++
>  tests/ref/fate/deluxepaint-anm                     |    4 ++++
>  tests/ref/fate/dfa1                                |    4 ++++
>  tests/ref/fate/dfa10                               |    4 ++++
>  tests/ref/fate/dfa11                               |    4 ++++
>  tests/ref/fate/dfa2                                |    4 ++++
>  tests/ref/fate/dfa3                                |    4 ++++
>  tests/ref/fate/dfa4                                |    4 ++++
>  tests/ref/fate/dfa5                                |    4 ++++
>  tests/ref/fate/dfa6                                |    4 ++++
>  tests/ref/fate/dfa7                                |    4 ++++
>  tests/ref/fate/dfa8                                |    4 ++++
>  tests/ref/fate/dfa9                                |    4 ++++
>  tests/ref/fate/dirac                               |    4 ++++
>  tests/ref/fate/dnxhd-mbaff                         |    4 ++++
>  tests/ref/fate/dnxhr-444                           |    4 ++++
>  tests/ref/fate/dnxhr-parse                         |    4 ++++
>  tests/ref/fate/dpcm-idroq                          |    4 ++++
>  tests/ref/fate/dpcm-interplay                      |    4 ++++
>  tests/ref/fate/dpx                                 |    4 ++++
>  tests/ref/fate/dpxparser                           |    4 ++++
>  tests/ref/fate/dss-lp                              |    4 ++++
>  tests/ref/fate/dss-sp                              |    4 ++++
>  tests/ref/fate/dxa-feeble                          |    4 ++++
>  tests/ref/fate/dxa-scummvm                         |    4 ++++
>  tests/ref/fate/dxtory                              |    8 ++++++++
>  tests/ref/fate/dxv-dxt1                            |    4 ++++
>  tests/ref/fate/dxv-dxt5                            |    4 ++++
>  tests/ref/fate/dxv3-dxt1                           |    4 ++++
>  tests/ref/fate/dxv3-dxt5                           |    4 ++++
>  tests/ref/fate/ea-cmv                              |    4 ++++
>  tests/ref/fate/ea-mad                              |    4 ++++
>  tests/ref/fate/ea-tgq                              |    4 ++++
>  tests/ref/fate/ea-tgv-1                            |    4 ++++
>  tests/ref/fate/ea-tgv-2                            |    4 ++++
>  tests/ref/fate/ea-tqi                              |    4 ++++
>  tests/ref/fate/exr-slice-pxr24                     |    4 ++++
>  tests/ref/fate/exr-slice-raw                       |    4 ++++
>  tests/ref/fate/exr-slice-rle                       |    4 ++++
>  tests/ref/fate/exr-slice-zip1                      |    4 ++++
>  tests/ref/fate/exr-slice-zip16                     |    4 ++++
>  tests/ref/fate/ffmpeg-filter_colorkey              |    8 ++++++++
>  tests/ref/fate/ffmpeg-filter_complex               |    4 ++++
>  tests/ref/fate/ffmpeg-lavfi                        |    4 ++++
>  tests/ref/fate/fic-avi                             |    4 ++++
>  tests/ref/fate/film-cvid                           |    4 ++++
>  tests/ref/fate/filter-2xbr                         |    4 ++++
>  tests/ref/fate/filter-3xbr                         |    4 ++++
>  tests/ref/fate/filter-4xbr                         |    4 ++++
>  tests/ref/fate/filter-adelay                       |    4 ++++
>  tests/ref/fate/filter-alphaextract_alphamerge_rgb  |    4 ++++
>  tests/ref/fate/filter-alphaextract_alphamerge_yuv  |    4 ++++
>  tests/ref/fate/filter-atrim-duration               |    4 ++++
>  tests/ref/fate/filter-atrim-mixed                  |    4 ++++
>  tests/ref/fate/filter-atrim-samples                |    4 ++++
>  tests/ref/fate/filter-atrim-time                   |    4 ++++
>  tests/ref/fate/filter-boxblur                      |    4 ++++
>  tests/ref/fate/filter-codecview-mvs                |    4 ++++
>  tests/ref/fate/filter-colorchannelmixer            |    4 ++++
>  tests/ref/fate/filter-concat                       |    8 ++++++++
>  tests/ref/fate/filter-curves                       |    4 ++++
>  tests/ref/fate/filter-delogo                       |    4 ++++
>  tests/ref/fate/filter-drawbox                      |    4 ++++
>  tests/ref/fate/filter-fade                         |    4 ++++
>  tests/ref/fate/filter-fieldorder                   |    4 ++++
>  tests/ref/fate/filter-fps                          |    4 ++++
>  tests/ref/fate/filter-fps-cfr                      |    4 ++++
>  tests/ref/fate/filter-fps-r                        |    4 ++++
>  tests/ref/fate/filter-framepack-columns            |    4 ++++
>  tests/ref/fate/filter-framepack-frameseq           |    4 ++++
>  tests/ref/fate/filter-framepack-lines              |    4 ++++
>  tests/ref/fate/filter-framepack-sbs                |    4 ++++
>  tests/ref/fate/filter-framepack-tab                |    4 ++++
>  tests/ref/fate/filter-gradfun                      |    4 ++++
>  tests/ref/fate/filter-gradfun-sample               |    4 ++++
>  tests/ref/fate/filter-histogram-levels             |    4 ++++
>  tests/ref/fate/filter-hls                          |    4 ++++
>  tests/ref/fate/filter-hq2x                         |    4 ++++
>  tests/ref/fate/filter-hq3x                         |    4 ++++
>  tests/ref/fate/filter-hq4x                         |    4 ++++
>  tests/ref/fate/filter-hqdn3d                       |    4 ++++
>  tests/ref/fate/filter-hqdn3d-sample                |    4 ++++
>  tests/ref/fate/filter-idet                         |    4 ++++
>  tests/ref/fate/filter-interlace                    |    4 ++++
>  tests/ref/fate/filter-lavd-life                    |    4 ++++
>  tests/ref/fate/filter-lavd-scalenorm               |    4 ++++
>  tests/ref/fate/filter-lavd-testsrc                 |    4 ++++
>  tests/ref/fate/filter-mcdeint-fast                 |    4 ++++
>  tests/ref/fate/filter-mcdeint-medium               |    4 ++++
>  tests/ref/fate/filter-mergeplanes                  |    4 ++++
>  tests/ref/fate/filter-mpdecimate                   |    4 ++++
>  tests/ref/fate/filter-negate                       |    4 ++++
>  tests/ref/fate/filter-overlay                      |    4 ++++
>  tests/ref/fate/filter-overlay_rgb                  |    4 ++++
>  tests/ref/fate/filter-overlay_yuv420               |    4 ++++
>  tests/ref/fate/filter-overlay_yuv422               |    4 ++++
>  tests/ref/fate/filter-overlay_yuv444               |    4 ++++
>  tests/ref/fate/filter-palettegen-1                 |    4 ++++
>  tests/ref/fate/filter-palettegen-2                 |    4 ++++
>  tests/ref/fate/filter-paletteuse-bayer             |    4 ++++
>  tests/ref/fate/filter-paletteuse-nodither          |    4 ++++
>  tests/ref/fate/filter-paletteuse-sierra2_4a        |    4 ++++
>  tests/ref/fate/filter-phase                        |    4 ++++
>  tests/ref/fate/filter-pp                           |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-00          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-01          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-02          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-03          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-04          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-05          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-06          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-07          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-08          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-09          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-10          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-11          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-12          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-13          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-14          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-15          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-16          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-17          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-18          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-19          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-20          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-21          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-22          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-23          |    4 ++++
>  tests/ref/fate/filter-removegrain-mode-24          |    4 ++++
>  tests/ref/fate/filter-scalechroma                  |    4 ++++
>  tests/ref/fate/filter-select                       |    4 ++++
>  tests/ref/fate/filter-select-alternate             |    4 ++++
>  tests/ref/fate/filter-separatefields               |    4 ++++
>  tests/ref/fate/filter-setpts                       |    4 ++++
>  tests/ref/fate/filter-showpalette                  |    4 ++++
>  tests/ref/fate/filter-shuffleplanes-dup-luma       |    4 ++++
>  tests/ref/fate/filter-shuffleplanes-swapuv         |    4 ++++
>  tests/ref/fate/filter-stereo3d-abr-ml              |    4 ++++
>  tests/ref/fate/filter-stereo3d-abr-mr              |    4 ++++
>  tests/ref/fate/filter-stereo3d-al-sbsl             |    4 ++++
>  tests/ref/fate/filter-stereo3d-ar-abl              |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-abl            |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-abr            |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-agmc           |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-agmd           |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-agmg           |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-agmh           |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-al             |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-arbg           |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-arcc           |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-arcd           |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-arcg           |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-arch           |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-argg           |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-aybc           |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-aybd           |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-aybg           |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-aybh           |    4 ++++
>  tests/ref/fate/filter-stereo3d-sbsl-sbsr           |    4 ++++
>  tests/ref/fate/filter-tblend                       |    4 ++++
>  tests/ref/fate/filter-telecine                     |    4 ++++
>  tests/ref/fate/filter-testsrc2-rgb24               |    4 ++++
>  tests/ref/fate/filter-testsrc2-yuv420p             |    4 ++++
>  tests/ref/fate/filter-testsrc2-yuv444p             |    4 ++++
>  tests/ref/fate/filter-transpose                    |    4 ++++
>  tests/ref/fate/filter-trim-duration                |    4 ++++
>  tests/ref/fate/filter-trim-frame                   |    4 ++++
>  tests/ref/fate/filter-trim-mixed                   |    4 ++++
>  tests/ref/fate/filter-trim-time                    |    4 ++++
>  tests/ref/fate/filter-unsharp                      |    4 ++++
>  tests/ref/fate/filter-vectorscope_color            |    4 ++++
>  tests/ref/fate/filter-vectorscope_color2           |    4 ++++
>  tests/ref/fate/filter-vectorscope_color3           |    4 ++++
>  tests/ref/fate/filter-vectorscope_color4           |    4 ++++
>  tests/ref/fate/filter-vectorscope_gray             |    4 ++++
>  tests/ref/fate/filter-vectorscope_xy               |    4 ++++
>  tests/ref/fate/filter-w3fdif-complex               |    4 ++++
>  tests/ref/fate/filter-w3fdif-simple                |    4 ++++
>  tests/ref/fate/filter-waveform_column              |    4 ++++
>  tests/ref/fate/filter-waveform_envelope            |    4 ++++
>  tests/ref/fate/filter-waveform_row                 |    4 ++++
>  tests/ref/fate/filter-waveform_uv                  |    4 ++++
>  tests/ref/fate/filter-yadif-mode0                  |    4 ++++
>  tests/ref/fate/filter-yadif-mode1                  |    4 ++++
>  tests/ref/fate/filter-yadif10                      |    4 ++++
>  tests/ref/fate/filter-yadif16                      |    4 ++++
>  tests/ref/fate/flic-af11-palette-change            |    4 ++++
>  tests/ref/fate/flic-af12                           |    4 ++++
>  tests/ref/fate/flic-magiccarpet                    |    4 ++++
>  tests/ref/fate/force_key_frames                    |    4 ++--
>  tests/ref/fate/fraps-v0                            |    4 ++++
>  tests/ref/fate/fraps-v1                            |    4 ++++
>  tests/ref/fate/fraps-v2                            |    4 ++++
>  tests/ref/fate/fraps-v3                            |    4 ++++
>  tests/ref/fate/fraps-v4                            |    4 ++++
>  tests/ref/fate/fraps-v5                            |    4 ++++
>  tests/ref/fate/frwu                                |    4 ++++
>  tests/ref/fate/g2m2                                |    4 ++++
>  tests/ref/fate/g2m3                                |    4 ++++
>  tests/ref/fate/g2m4                                |    4 ++++
>  tests/ref/fate/g722-encode                         |    4 ++++
>  tests/ref/fate/g722dec-1                           |    4 ++++
>  tests/ref/fate/g723_1-dec-1                        |    4 ++++
>  tests/ref/fate/g723_1-dec-2                        |    4 ++++
>  tests/ref/fate/g723_1-dec-3                        |    4 ++++
>  tests/ref/fate/g723_1-dec-4                        |    4 ++++
>  tests/ref/fate/g723_1-dec-5                        |    4 ++++
>  tests/ref/fate/g723_1-dec-6                        |    4 ++++
>  tests/ref/fate/g723_1-dec-7                        |    4 ++++
>  tests/ref/fate/g723_1-dec-8                        |    4 ++++
>  tests/ref/fate/g726-encode-2bit                    |    4 ++++
>  tests/ref/fate/g726-encode-3bit                    |    4 ++++
>  tests/ref/fate/g726-encode-4bit                    |    4 ++++
>  tests/ref/fate/g726-encode-5bit                    |    4 ++++
>  tests/ref/fate/gapless-mp3                         |    6 +++---
>  tests/ref/fate/gif-color                           |    4 ++++
>  tests/ref/fate/gif-deal                            |    4 ++++
>  tests/ref/fate/gif-demux                           |    4 ++++
>  tests/ref/fate/gif-disposal-background             |    4 ++++
>  tests/ref/fate/gif-disposal-restore                |    4 ++++
>  tests/ref/fate/gif-gray                            |    4 ++++
>  tests/ref/fate/gifenc-bgr4_byte                    |    4 ++++
>  tests/ref/fate/gifenc-bgr8                         |    4 ++++
>  tests/ref/fate/gifenc-gray                         |    4 ++++
>  tests/ref/fate/gifenc-pal8                         |    4 ++++
>  tests/ref/fate/gifenc-rgb4_byte                    |    4 ++++
>  tests/ref/fate/gifenc-rgb8                         |    4 ++++
>  tests/ref/fate/gsm-ms                              |    4 ++++
>  tests/ref/fate/gsm-toast                           |    4 ++++
>  tests/ref/fate/h264-conformance-aud_mw_e           |    4 ++++
>  tests/ref/fate/h264-conformance-ba1_ft_c           |    4 ++++
>  tests/ref/fate/h264-conformance-ba1_sony_d         |    4 ++++
>  tests/ref/fate/h264-conformance-ba2_sony_f         |    4 ++++
>  tests/ref/fate/h264-conformance-ba3_sva_c          |    4 ++++
>  tests/ref/fate/h264-conformance-ba_mw_d            |    4 ++++
>  tests/ref/fate/h264-conformance-bamq1_jvc_c        |    4 ++++
>  tests/ref/fate/h264-conformance-bamq2_jvc_c        |    4 ++++
>  tests/ref/fate/h264-conformance-banm_mw_d          |    4 ++++
>  tests/ref/fate/h264-conformance-basqp1_sony_c      |    4 ++++
>  tests/ref/fate/h264-conformance-caba1_sony_d       |    4 ++++
>  tests/ref/fate/h264-conformance-caba1_sva_b        |    4 ++++
>  tests/ref/fate/h264-conformance-caba2_sony_e       |    4 ++++
>  tests/ref/fate/h264-conformance-caba2_sva_b        |    4 ++++
>  tests/ref/fate/h264-conformance-caba3_sony_c       |    4 ++++
>  tests/ref/fate/h264-conformance-caba3_sva_b        |    4 ++++
>  tests/ref/fate/h264-conformance-caba3_toshiba_e    |    4 ++++
>  .../ref/fate/h264-conformance-cabac_mot_fld0_full  |    4 ++++
>  .../ref/fate/h264-conformance-cabac_mot_frm0_full  |    4 ++++
>  .../fate/h264-conformance-cabac_mot_mbaff0_full    |    4 ++++
>  .../fate/h264-conformance-cabac_mot_picaff0_full   |    4 ++++
>  tests/ref/fate/h264-conformance-cabaci3_sony_b     |    4 ++++
>  tests/ref/fate/h264-conformance-cabast3_sony_e     |    4 ++++
>  tests/ref/fate/h264-conformance-cabastbr3_sony_b   |    4 ++++
>  tests/ref/fate/h264-conformance-cabref3_sand_d     |    4 ++++
>  tests/ref/fate/h264-conformance-cacqp3_sony_d      |    4 ++++
>  tests/ref/fate/h264-conformance-cafi1_sva_c        |    4 ++++
>  tests/ref/fate/h264-conformance-cama1_sony_c       |    4 ++++
>  tests/ref/fate/h264-conformance-cama1_toshiba_b    |    4 ++++
>  tests/ref/fate/h264-conformance-cama1_vtc_c        |    4 ++++
>  tests/ref/fate/h264-conformance-cama2_vtc_b        |    4 ++++
>  tests/ref/fate/h264-conformance-cama3_sand_e       |    4 ++++
>  tests/ref/fate/h264-conformance-cama3_vtc_b        |    4 ++++
>  tests/ref/fate/h264-conformance-camaci3_sony_c     |    4 ++++
>  tests/ref/fate/h264-conformance-camanl1_toshiba_b  |    4 ++++
>  tests/ref/fate/h264-conformance-camanl2_toshiba_b  |    4 ++++
>  tests/ref/fate/h264-conformance-camanl3_sand_e     |    4 ++++
>  tests/ref/fate/h264-conformance-camasl3_sony_b     |    4 ++++
>  tests/ref/fate/h264-conformance-camp_mot_mbaff_l30 |    4 ++++
>  tests/ref/fate/h264-conformance-camp_mot_mbaff_l31 |    4 ++++
>  tests/ref/fate/h264-conformance-canl1_sony_e       |    4 ++++
>  tests/ref/fate/h264-conformance-canl1_sva_b        |    4 ++++
>  tests/ref/fate/h264-conformance-canl1_toshiba_g    |    4 ++++
>  tests/ref/fate/h264-conformance-canl2_sony_e       |    4 ++++
>  tests/ref/fate/h264-conformance-canl2_sva_b        |    4 ++++
>  tests/ref/fate/h264-conformance-canl3_sony_c       |    4 ++++
>  tests/ref/fate/h264-conformance-canl3_sva_b        |    4 ++++
>  tests/ref/fate/h264-conformance-canl4_sva_b        |    4 ++++
>  tests/ref/fate/h264-conformance-canlma2_sony_c     |    4 ++++
>  tests/ref/fate/h264-conformance-canlma3_sony_c     |    4 ++++
>  tests/ref/fate/h264-conformance-capa1_toshiba_b    |    4 ++++
>  tests/ref/fate/h264-conformance-capama3_sand_f     |    4 ++++
>  tests/ref/fate/h264-conformance-capcm1_sand_e      |    4 ++++
>  tests/ref/fate/h264-conformance-capcmnl1_sand_e    |    4 ++++
>  tests/ref/fate/h264-conformance-capm3_sony_d       |    4 ++++
>  tests/ref/fate/h264-conformance-caqp1_sony_b       |    4 ++++
>  .../fate/h264-conformance-cavlc_mot_fld0_full_b    |    4 ++++
>  .../fate/h264-conformance-cavlc_mot_frm0_full_b    |    4 ++++
>  .../fate/h264-conformance-cavlc_mot_mbaff0_full_b  |    4 ++++
>  .../fate/h264-conformance-cavlc_mot_picaff0_full_b |    4 ++++
>  tests/ref/fate/h264-conformance-cawp1_toshiba_e    |    4 ++++
>  tests/ref/fate/h264-conformance-cawp5_toshiba_e    |    4 ++++
>  tests/ref/fate/h264-conformance-ci1_ft_b           |    4 ++++
>  tests/ref/fate/h264-conformance-ci_mw_d            |    4 ++++
>  tests/ref/fate/h264-conformance-cvbs3_sony_c       |    4 ++++
>  tests/ref/fate/h264-conformance-cvcanlma2_sony_c   |    4 ++++
>  tests/ref/fate/h264-conformance-cvfc1_sony_c       |    4 ++++
>  tests/ref/fate/h264-conformance-cvfi1_sony_d       |    4 ++++
>  tests/ref/fate/h264-conformance-cvfi1_sva_c        |    4 ++++
>  tests/ref/fate/h264-conformance-cvfi2_sony_h       |    4 ++++
>  tests/ref/fate/h264-conformance-cvfi2_sva_c        |    4 ++++
>  tests/ref/fate/h264-conformance-cvma1_sony_d       |    4 ++++
>  tests/ref/fate/h264-conformance-cvma1_toshiba_b    |    4 ++++
>  tests/ref/fate/h264-conformance-cvmanl1_toshiba_b  |    4 ++++
>  tests/ref/fate/h264-conformance-cvmanl2_toshiba_b  |    4 ++++
>  tests/ref/fate/h264-conformance-cvmapaqp3_sony_e   |    4 ++++
>  tests/ref/fate/h264-conformance-cvmaqp2_sony_g     |    4 ++++
>  tests/ref/fate/h264-conformance-cvmaqp3_sony_d     |    4 ++++
>  tests/ref/fate/h264-conformance-cvmp_mot_fld_l30_b |    4 ++++
>  tests/ref/fate/h264-conformance-cvmp_mot_frm_l31_b |    4 ++++
>  tests/ref/fate/h264-conformance-cvnlfi1_sony_c     |    4 ++++
>  tests/ref/fate/h264-conformance-cvnlfi2_sony_h     |    4 ++++
>  tests/ref/fate/h264-conformance-cvpa1_toshiba_b    |    4 ++++
>  tests/ref/fate/h264-conformance-cvpcmnl1_sva_c     |    4 ++++
>  tests/ref/fate/h264-conformance-cvpcmnl2_sva_c     |    4 ++++
>  tests/ref/fate/h264-conformance-cvwp1_toshiba_e    |    4 ++++
>  tests/ref/fate/h264-conformance-cvwp2_toshiba_e    |    4 ++++
>  tests/ref/fate/h264-conformance-cvwp3_toshiba_e    |    4 ++++
>  tests/ref/fate/h264-conformance-cvwp5_toshiba_e    |    4 ++++
>  tests/ref/fate/h264-conformance-fi1_sony_e         |    4 ++++
>  .../fate/h264-conformance-frext-alphaconformanceg  |    4 ++++
>  tests/ref/fate/h264-conformance-frext-bcrm_freh10  |    4 ++++
>  tests/ref/fate/h264-conformance-frext-brcm_freh11  |    4 ++++
>  tests/ref/fate/h264-conformance-frext-brcm_freh3   |    4 ++++
>  tests/ref/fate/h264-conformance-frext-brcm_freh4   |    4 ++++
>  tests/ref/fate/h264-conformance-frext-brcm_freh5   |    4 ++++
>  tests/ref/fate/h264-conformance-frext-brcm_freh8   |    4 ++++
>  tests/ref/fate/h264-conformance-frext-brcm_freh9   |    4 ++++
>  tests/ref/fate/h264-conformance-frext-freh12_b     |    4 ++++
>  tests/ref/fate/h264-conformance-frext-freh1_b      |    4 ++++
>  tests/ref/fate/h264-conformance-frext-freh2_b      |    4 ++++
>  tests/ref/fate/h264-conformance-frext-freh6        |    4 ++++
>  tests/ref/fate/h264-conformance-frext-freh7_b      |    4 ++++
>  .../ref/fate/h264-conformance-frext-frext01_jvc_d  |    4 ++++
>  .../ref/fate/h264-conformance-frext-frext02_jvc_c  |    4 ++++
>  .../fate/h264-conformance-frext-frext1_panasonic_c |    4 ++++
>  .../fate/h264-conformance-frext-frext2_panasonic_b |    4 ++++
>  .../fate/h264-conformance-frext-frext3_panasonic_d |    4 ++++
>  .../fate/h264-conformance-frext-frext4_panasonic_a |    4 ++++
>  .../fate/h264-conformance-frext-frext_mmco4_sony_b |    4 ++++
>  tests/ref/fate/h264-conformance-frext-hcaff1_hhi_b |    4 ++++
>  tests/ref/fate/h264-conformance-frext-hcafr1_hhi_c |    4 ++++
>  tests/ref/fate/h264-conformance-frext-hcafr2_hhi_a |    4 ++++
>  tests/ref/fate/h264-conformance-frext-hcafr3_hhi_a |    4 ++++
>  tests/ref/fate/h264-conformance-frext-hcafr4_hhi_a |    4 ++++
>  .../ref/fate/h264-conformance-frext-hcamff1_hhi_b  |    4 ++++
>  .../fate/h264-conformance-frext-hi422fr10_sony_b   |    4 ++++
>  .../fate/h264-conformance-frext-hi422fr13_sony_b   |    4 ++++
>  .../fate/h264-conformance-frext-hi422fr1_sony_a    |    4 ++++
>  .../fate/h264-conformance-frext-hi422fr6_sony_a    |    4 ++++
>  tests/ref/fate/h264-conformance-frext-hpca_brcm_c  |    4 ++++
>  .../ref/fate/h264-conformance-frext-hpcadq_brcm_b  |    4 ++++
>  .../ref/fate/h264-conformance-frext-hpcafl_bcrm_c  |    4 ++++
>  .../fate/h264-conformance-frext-hpcaflnl_bcrm_c    |    4 ++++
>  .../ref/fate/h264-conformance-frext-hpcalq_brcm_b  |    4 ++++
>  .../fate/h264-conformance-frext-hpcamapalq_bcrm_b  |    4 ++++
>  .../fate/h264-conformance-frext-hpcamolq_brcm_b    |    4 ++++
>  .../ref/fate/h264-conformance-frext-hpcanl_brcm_c  |    4 ++++
>  .../fate/h264-conformance-frext-hpcaq2lq_brcm_b    |    4 ++++
>  tests/ref/fate/h264-conformance-frext-hpcv_brcm_a  |    4 ++++
>  .../ref/fate/h264-conformance-frext-hpcvfl_bcrm_a  |    4 ++++
>  .../fate/h264-conformance-frext-hpcvflnl_bcrm_a    |    4 ++++
>  .../fate/h264-conformance-frext-hpcvmolq_brcm_b    |    4 ++++
>  .../ref/fate/h264-conformance-frext-hpcvnl_brcm_a  |    4 ++++
>  .../h264-conformance-frext-pph10i1_panasonic_a     |    4 ++++
>  .../h264-conformance-frext-pph10i2_panasonic_a     |    4 ++++
>  .../h264-conformance-frext-pph10i3_panasonic_a     |    4 ++++
>  .../h264-conformance-frext-pph10i4_panasonic_a     |    4 ++++
>  .../h264-conformance-frext-pph10i5_panasonic_a     |    4 ++++
>  .../h264-conformance-frext-pph10i6_panasonic_a     |    4 ++++
>  .../h264-conformance-frext-pph10i7_panasonic_a     |    4 ++++
>  .../h264-conformance-frext-pph422i1_panasonic_a    |    4 ++++
>  .../h264-conformance-frext-pph422i2_panasonic_a    |    4 ++++
>  .../h264-conformance-frext-pph422i3_panasonic_a    |    4 ++++
>  .../h264-conformance-frext-pph422i4_panasonic_a    |    4 ++++
>  .../h264-conformance-frext-pph422i5_panasonic_a    |    4 ++++
>  .../h264-conformance-frext-pph422i6_panasonic_a    |    4 ++++
>  .../h264-conformance-frext-pph422i7_panasonic_a    |    4 ++++
>  tests/ref/fate/h264-conformance-hcbp2_hhi_a        |    4 ++++
>  tests/ref/fate/h264-conformance-hcmp1_hhi_a        |    4 ++++
>  tests/ref/fate/h264-conformance-ls_sva_d           |    4 ++++
>  tests/ref/fate/h264-conformance-midr_mw_d          |    4 ++++
>  tests/ref/fate/h264-conformance-mps_mw_a           |    4 ++++
>  tests/ref/fate/h264-conformance-mr1_bt_a           |    4 ++++
>  tests/ref/fate/h264-conformance-mr1_mw_a           |    4 ++++
>  tests/ref/fate/h264-conformance-mr2_mw_a           |    4 ++++
>  tests/ref/fate/h264-conformance-mr2_tandberg_e     |    4 ++++
>  tests/ref/fate/h264-conformance-mr3_tandberg_b     |    4 ++++
>  tests/ref/fate/h264-conformance-mr4_tandberg_c     |    4 ++++
>  tests/ref/fate/h264-conformance-mr5_tandberg_c     |    4 ++++
>  tests/ref/fate/h264-conformance-mr6_bt_b           |    4 ++++
>  tests/ref/fate/h264-conformance-mr7_bt_b           |    4 ++++
>  tests/ref/fate/h264-conformance-mr8_bt_b           |    4 ++++
>  tests/ref/fate/h264-conformance-mr9_bt_b           |    4 ++++
>  tests/ref/fate/h264-conformance-mv1_brcm_d         |    4 ++++
>  tests/ref/fate/h264-conformance-nl1_sony_d         |    4 ++++
>  tests/ref/fate/h264-conformance-nl2_sony_h         |    4 ++++
>  tests/ref/fate/h264-conformance-nl3_sva_e          |    4 ++++
>  tests/ref/fate/h264-conformance-nlmq1_jvc_c        |    4 ++++
>  tests/ref/fate/h264-conformance-nlmq2_jvc_c        |    4 ++++
>  tests/ref/fate/h264-conformance-nrf_mw_e           |    4 ++++
>  tests/ref/fate/h264-conformance-sharp_mp_field_1_b |    4 ++++
>  tests/ref/fate/h264-conformance-sharp_mp_field_2_b |    4 ++++
>  tests/ref/fate/h264-conformance-sharp_mp_field_3_b |    4 ++++
>  tests/ref/fate/h264-conformance-sharp_mp_paff_1r2  |    4 ++++
>  tests/ref/fate/h264-conformance-sharp_mp_paff_2r   |    4 ++++
>  tests/ref/fate/h264-conformance-sl1_sva_b          |    4 ++++
>  tests/ref/fate/h264-conformance-sva_ba1_b          |    4 ++++
>  tests/ref/fate/h264-conformance-sva_ba2_d          |    4 ++++
>  tests/ref/fate/h264-conformance-sva_base_b         |    4 ++++
>  tests/ref/fate/h264-conformance-sva_cl1_e          |    4 ++++
>  tests/ref/fate/h264-conformance-sva_fm1_e          |    4 ++++
>  tests/ref/fate/h264-conformance-sva_nl1_b          |    4 ++++
>  tests/ref/fate/h264-conformance-sva_nl2_e          |    4 ++++
>  tests/ref/fate/h264-crop-to-container              |    4 ++++
>  tests/ref/fate/h264-direct-bff                     |    4 ++++
>  tests/ref/fate/h264-extreme-plane-pred             |    4 ++++
>  tests/ref/fate/h264-interlace-crop                 |    4 ++++
>  tests/ref/fate/h264-lossless                       |    4 ++++
>  .../fate/h264-reinit-large_420_8-to-small_420_8    |    4 ++++
>  .../fate/h264-reinit-small_420_8-to-large_444_10   |    4 ++++
>  .../fate/h264-reinit-small_420_9-to-small_420_8    |    4 ++++
>  .../fate/h264-reinit-small_422_9-to-small_420_9    |    4 ++++
>  tests/ref/fate/hap-chunk                           |    4 ++++
>  tests/ref/fate/hap1                                |    4 ++++
>  tests/ref/fate/hap5                                |    4 ++++
>  tests/ref/fate/hapy                                |    4 ++++
>  ...formance-ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1 |    4 ++++
>  tests/ref/fate/hevc-conformance-AMP_A_Samsung_4    |    4 ++++
>  tests/ref/fate/hevc-conformance-AMP_A_Samsung_6    |    4 ++++
>  tests/ref/fate/hevc-conformance-AMP_B_Samsung_4    |    4 ++++
>  tests/ref/fate/hevc-conformance-AMP_B_Samsung_6    |    4 ++++
>  tests/ref/fate/hevc-conformance-AMP_D_Hisilicon    |    4 ++++
>  tests/ref/fate/hevc-conformance-AMP_E_Hisilicon    |    4 ++++
>  tests/ref/fate/hevc-conformance-AMP_F_Hisilicon_3  |    4 ++++
>  tests/ref/fate/hevc-conformance-AMVP_A_MTK_4       |    4 ++++
>  tests/ref/fate/hevc-conformance-AMVP_B_MTK_4       |    4 ++++
>  tests/ref/fate/hevc-conformance-AMVP_C_Samsung_4   |    4 ++++
>  tests/ref/fate/hevc-conformance-AMVP_C_Samsung_6   |    4 ++++
>  .../ref/fate/hevc-conformance-BUMPING_A_ericsson_1 |    4 ++++
>  tests/ref/fate/hevc-conformance-CAINIT_A_SHARP_4   |    4 ++++
>  tests/ref/fate/hevc-conformance-CAINIT_B_SHARP_4   |    4 ++++
>  tests/ref/fate/hevc-conformance-CAINIT_C_SHARP_3   |    4 ++++
>  tests/ref/fate/hevc-conformance-CAINIT_D_SHARP_3   |    4 ++++
>  tests/ref/fate/hevc-conformance-CAINIT_E_SHARP_3   |    4 ++++
>  tests/ref/fate/hevc-conformance-CAINIT_F_SHARP_3   |    4 ++++
>  tests/ref/fate/hevc-conformance-CAINIT_G_SHARP_3   |    4 ++++
>  tests/ref/fate/hevc-conformance-CAINIT_H_SHARP_3   |    4 ++++
>  tests/ref/fate/hevc-conformance-CIP_A_Panasonic_3  |    4 ++++
>  tests/ref/fate/hevc-conformance-CIP_C_Panasonic_2  |    4 ++++
>  tests/ref/fate/hevc-conformance-CONFWIN_A_Sony_1   |    4 ++++
>  .../ref/fate/hevc-conformance-DBLK_A_MAIN10_VIXS_3 |    4 ++++
>  tests/ref/fate/hevc-conformance-DBLK_A_SONY_3      |    4 ++++
>  tests/ref/fate/hevc-conformance-DBLK_B_SONY_3      |    4 ++++
>  tests/ref/fate/hevc-conformance-DBLK_C_SONY_3      |    4 ++++
>  tests/ref/fate/hevc-conformance-DBLK_D_VIXS_2      |    4 ++++
>  tests/ref/fate/hevc-conformance-DBLK_E_VIXS_2      |    4 ++++
>  tests/ref/fate/hevc-conformance-DBLK_F_VIXS_2      |    4 ++++
>  tests/ref/fate/hevc-conformance-DBLK_G_VIXS_2      |    4 ++++
>  tests/ref/fate/hevc-conformance-DELTAQP_A_BRCM_4   |    4 ++++
>  tests/ref/fate/hevc-conformance-DELTAQP_B_SONY_3   |    4 ++++
>  tests/ref/fate/hevc-conformance-DELTAQP_C_SONY_3   |    4 ++++
>  tests/ref/fate/hevc-conformance-DSLICE_A_HHI_5     |    4 ++++
>  tests/ref/fate/hevc-conformance-DSLICE_B_HHI_5     |    4 ++++
>  tests/ref/fate/hevc-conformance-DSLICE_C_HHI_5     |    4 ++++
>  tests/ref/fate/hevc-conformance-ENTP_A_Qualcomm_1  |    4 ++++
>  tests/ref/fate/hevc-conformance-ENTP_B_Qualcomm_1  |    4 ++++
>  tests/ref/fate/hevc-conformance-ENTP_C_Qualcomm_1  |    4 ++++
>  tests/ref/fate/hevc-conformance-EXT_A_ericsson_4   |    4 ++++
>  tests/ref/fate/hevc-conformance-FILLER_A_Sony_1    |    4 ++++
>  tests/ref/fate/hevc-conformance-HRD_A_Fujitsu_2    |    4 ++++
>  tests/ref/fate/hevc-conformance-HRD_A_Fujitsu_3    |    4 ++++
>  tests/ref/fate/hevc-conformance-INITQP_A_Sony_1    |    4 ++++
>  tests/ref/fate/hevc-conformance-INITQP_B_Sony_1    |    4 ++++
>  tests/ref/fate/hevc-conformance-IPCM_A_RExt_NEC    |    4 ++++
>  tests/ref/fate/hevc-conformance-IPCM_B_RExt_NEC    |    4 ++++
>  tests/ref/fate/hevc-conformance-IPRED_A_docomo_2   |    4 ++++
>  tests/ref/fate/hevc-conformance-IPRED_B_Nokia_3    |    4 ++++
>  .../ref/fate/hevc-conformance-IPRED_C_Mitsubishi_3 |    4 ++++
>  tests/ref/fate/hevc-conformance-LS_A_Orange_2      |    4 ++++
>  tests/ref/fate/hevc-conformance-LS_B_ORANGE_4      |    4 ++++
>  .../ref/fate/hevc-conformance-LTRPSPS_A_Qualcomm_1 |    4 ++++
>  tests/ref/fate/hevc-conformance-MAXBINS_A_TI_4     |    4 ++++
>  tests/ref/fate/hevc-conformance-MAXBINS_B_TI_4     |    4 ++++
>  tests/ref/fate/hevc-conformance-MAXBINS_C_TI_4     |    4 ++++
>  tests/ref/fate/hevc-conformance-MERGE_A_TI_3       |    4 ++++
>  tests/ref/fate/hevc-conformance-MERGE_B_TI_3       |    4 ++++
>  tests/ref/fate/hevc-conformance-MERGE_C_TI_3       |    4 ++++
>  tests/ref/fate/hevc-conformance-MERGE_D_TI_3       |    4 ++++
>  tests/ref/fate/hevc-conformance-MERGE_E_TI_3       |    4 ++++
>  tests/ref/fate/hevc-conformance-MERGE_F_MTK_4      |    4 ++++
>  tests/ref/fate/hevc-conformance-MERGE_G_HHI_4      |    4 ++++
>  .../ref/fate/hevc-conformance-MVCLIP_A_qualcomm_3  |    4 ++++
>  .../ref/fate/hevc-conformance-MVDL1ZERO_A_docomo_3 |    4 ++++
>  .../ref/fate/hevc-conformance-MVEDGE_A_qualcomm_3  |    4 ++++
>  .../hevc-conformance-Main_422_10_A_RExt_Sony_1     |    4 ++++
>  .../hevc-conformance-Main_422_10_B_RExt_Sony_1     |    4 ++++
>  tests/ref/fate/hevc-conformance-NUT_A_ericsson_5   |    4 ++++
>  .../fate/hevc-conformance-NoOutPrior_A_Qualcomm_1  |    4 ++++
>  .../fate/hevc-conformance-NoOutPrior_B_Qualcomm_1  |    4 ++++
>  .../ref/fate/hevc-conformance-OPFLAG_A_Qualcomm_1  |    4 ++++
>  .../ref/fate/hevc-conformance-OPFLAG_B_Qualcomm_1  |    4 ++++
>  .../ref/fate/hevc-conformance-OPFLAG_C_Qualcomm_1  |    4 ++++
>  .../hevc-conformance-PERSIST_RPARAM_A_RExt_Sony_1  |    4 ++++
>  tests/ref/fate/hevc-conformance-PICSIZE_A_Bossen_1 |    4 ++++
>  tests/ref/fate/hevc-conformance-PICSIZE_B_Bossen_1 |    4 ++++
>  tests/ref/fate/hevc-conformance-PICSIZE_C_Bossen_1 |    4 ++++
>  tests/ref/fate/hevc-conformance-PICSIZE_D_Bossen_1 |    4 ++++
>  tests/ref/fate/hevc-conformance-PMERGE_A_TI_3      |    4 ++++
>  tests/ref/fate/hevc-conformance-PMERGE_B_TI_3      |    4 ++++
>  tests/ref/fate/hevc-conformance-PMERGE_C_TI_3      |    4 ++++
>  tests/ref/fate/hevc-conformance-PMERGE_D_TI_3      |    4 ++++
>  tests/ref/fate/hevc-conformance-PMERGE_E_TI_3      |    4 ++++
>  tests/ref/fate/hevc-conformance-POC_A_Bossen_3     |    4 ++++
>  tests/ref/fate/hevc-conformance-PPS_A_qualcomm_7   |    4 ++++
>  tests/ref/fate/hevc-conformance-PS_A_VIDYO_3       |    4 ++++
>  tests/ref/fate/hevc-conformance-PS_B_VIDYO_3       |    4 ++++
>  .../fate/hevc-conformance-QMATRIX_A_RExt_Sony_1    |    4 ++++
>  tests/ref/fate/hevc-conformance-RAP_A_docomo_4     |    4 ++++
>  tests/ref/fate/hevc-conformance-RAP_B_Bossen_1     |    4 ++++
>  tests/ref/fate/hevc-conformance-RPLM_A_qualcomm_4  |    4 ++++
>  tests/ref/fate/hevc-conformance-RPLM_B_qualcomm_4  |    4 ++++
>  tests/ref/fate/hevc-conformance-RPS_A_docomo_4     |    4 ++++
>  tests/ref/fate/hevc-conformance-RPS_B_qualcomm_5   |    4 ++++
>  tests/ref/fate/hevc-conformance-RPS_C_ericsson_5   |    4 ++++
>  tests/ref/fate/hevc-conformance-RPS_D_ericsson_6   |    4 ++++
>  tests/ref/fate/hevc-conformance-RPS_E_qualcomm_5   |    4 ++++
>  tests/ref/fate/hevc-conformance-RPS_F_docomo_1     |    4 ++++
>  tests/ref/fate/hevc-conformance-RQT_A_HHI_4        |    4 ++++
>  tests/ref/fate/hevc-conformance-RQT_B_HHI_4        |    4 ++++
>  tests/ref/fate/hevc-conformance-RQT_C_HHI_4        |    4 ++++
>  tests/ref/fate/hevc-conformance-RQT_D_HHI_4        |    4 ++++
>  tests/ref/fate/hevc-conformance-RQT_E_HHI_4        |    4 ++++
>  tests/ref/fate/hevc-conformance-RQT_F_HHI_4        |    4 ++++
>  tests/ref/fate/hevc-conformance-RQT_G_HHI_4        |    4 ++++
>  tests/ref/fate/hevc-conformance-SAO_A_MediaTek_4   |    4 ++++
>  .../fate/hevc-conformance-SAO_A_RExt_MediaTek_1    |    4 ++++
>  tests/ref/fate/hevc-conformance-SAO_B_MediaTek_5   |    4 ++++
>  tests/ref/fate/hevc-conformance-SAO_C_Samsung_4    |    4 ++++
>  tests/ref/fate/hevc-conformance-SAO_C_Samsung_5    |    4 ++++
>  tests/ref/fate/hevc-conformance-SAO_D_Samsung_4    |    4 ++++
>  tests/ref/fate/hevc-conformance-SAO_D_Samsung_5    |    4 ++++
>  tests/ref/fate/hevc-conformance-SAO_E_Canon_4      |    4 ++++
>  tests/ref/fate/hevc-conformance-SAO_F_Canon_3      |    4 ++++
>  tests/ref/fate/hevc-conformance-SAO_G_Canon_3      |    4 ++++
>  tests/ref/fate/hevc-conformance-SDH_A_Orange_3     |    4 ++++
>  tests/ref/fate/hevc-conformance-SLICES_A_Rovi_3    |    4 ++++
>  tests/ref/fate/hevc-conformance-SLIST_A_Sony_4     |    4 ++++
>  tests/ref/fate/hevc-conformance-SLIST_B_Sony_8     |    4 ++++
>  tests/ref/fate/hevc-conformance-SLIST_C_Sony_3     |    4 ++++
>  tests/ref/fate/hevc-conformance-SLIST_D_Sony_9     |    4 ++++
>  tests/ref/fate/hevc-conformance-SLPPLP_A_VIDYO_1   |    4 ++++
>  tests/ref/fate/hevc-conformance-SLPPLP_A_VIDYO_2   |    4 ++++
>  tests/ref/fate/hevc-conformance-STRUCT_A_Samsung_5 |    4 ++++
>  tests/ref/fate/hevc-conformance-STRUCT_B_Samsung_4 |    4 ++++
>  tests/ref/fate/hevc-conformance-STRUCT_B_Samsung_6 |    4 ++++
>  tests/ref/fate/hevc-conformance-TILES_A_Cisco_2    |    4 ++++
>  tests/ref/fate/hevc-conformance-TILES_B_Cisco_1    |    4 ++++
>  tests/ref/fate/hevc-conformance-TMVP_A_MS_3        |    4 ++++
>  tests/ref/fate/hevc-conformance-TSCL_A_VIDYO_5     |    4 ++++
>  tests/ref/fate/hevc-conformance-TSCL_B_VIDYO_4     |    4 ++++
>  tests/ref/fate/hevc-conformance-TSKIP_A_MS_3       |    4 ++++
>  tests/ref/fate/hevc-conformance-TUSIZE_A_Samsung_1 |    4 ++++
>  tests/ref/fate/hevc-conformance-VPSID_A_VIDYO_1    |    4 ++++
>  tests/ref/fate/hevc-conformance-VPSID_A_VIDYO_2    |    4 ++++
>  .../fate/hevc-conformance-WPP_A_ericsson_MAIN10_2  |    4 ++++
>  .../fate/hevc-conformance-WPP_A_ericsson_MAIN_2    |    4 ++++
>  .../fate/hevc-conformance-WPP_B_ericsson_MAIN10_2  |    4 ++++
>  .../fate/hevc-conformance-WPP_B_ericsson_MAIN_2    |    4 ++++
>  .../fate/hevc-conformance-WPP_C_ericsson_MAIN10_2  |    4 ++++
>  .../fate/hevc-conformance-WPP_C_ericsson_MAIN_2    |    4 ++++
>  .../fate/hevc-conformance-WPP_D_ericsson_MAIN10_2  |    4 ++++
>  .../fate/hevc-conformance-WPP_D_ericsson_MAIN_2    |    4 ++++
>  .../fate/hevc-conformance-WPP_E_ericsson_MAIN10_2  |    4 ++++
>  .../fate/hevc-conformance-WPP_E_ericsson_MAIN_2    |    4 ++++
>  .../fate/hevc-conformance-WPP_F_ericsson_MAIN10_2  |    4 ++++
>  .../fate/hevc-conformance-WPP_F_ericsson_MAIN_2    |    4 ++++
>  .../fate/hevc-conformance-WP_A_MAIN10_Toshiba_3    |    4 ++++
>  tests/ref/fate/hevc-conformance-WP_A_Toshiba_3     |    4 ++++
>  tests/ref/fate/hevc-conformance-WP_B_Toshiba_3     |    4 ++++
>  .../fate/hevc-conformance-WP_MAIN10_B_Toshiba_3    |    4 ++++
>  tests/ref/fate/hevc-conformance-cip_B_NEC_3        |    4 ++++
>  tests/ref/fate/hevc-conformance-ipcm_A_NEC_3       |    4 ++++
>  tests/ref/fate/hevc-conformance-ipcm_B_NEC_3       |    4 ++++
>  tests/ref/fate/hevc-conformance-ipcm_C_NEC_3       |    4 ++++
>  tests/ref/fate/hevc-conformance-ipcm_D_NEC_3       |    4 ++++
>  tests/ref/fate/hevc-conformance-ipcm_E_NEC_2       |    4 ++++
>  tests/ref/fate/hevc-paramchange-yuv420p-yuv420p10  |    4 ++++
>  tests/ref/fate/id-cin-video                        |    8 ++++++++
>  tests/ref/fate/iff-byterun1                        |    4 ++++
>  tests/ref/fate/iff-ilbm                            |    4 ++++
>  tests/ref/fate/indeo2                              |    4 ++++
>  tests/ref/fate/indeo3                              |    4 ++++
>  tests/ref/fate/indeo3-2                            |    4 ++++
>  tests/ref/fate/indeo4                              |    4 ++++
>  tests/ref/fate/indeo5                              |    4 ++++
>  tests/ref/fate/interplay-mve-16bit                 |    4 ++++
>  tests/ref/fate/interplay-mve-8bit                  |    4 ++++
>  tests/ref/fate/iv8-demux                           |    4 ++++
>  tests/ref/fate/jpeg2000-dcinema                    |    4 ++++
>  tests/ref/fate/jv                                  |    4 ++++
>  tests/ref/fate/jv-demux                            |    8 ++++++++
>  tests/ref/fate/kgv1                                |    4 ++++
>  tests/ref/fate/kmvc                                |    4 ++++
>  tests/ref/fate/lagarith-red                        |    4 ++++
>  tests/ref/fate/lagarith-rgb24                      |    4 ++++
>  tests/ref/fate/lagarith-rgb32                      |    4 ++++
>  tests/ref/fate/lagarith-ticket4119                 |    4 ++++
>  tests/ref/fate/lagarith-ticket4119-cfr             |    4 ++++
>  tests/ref/fate/lagarith-ticket4119-drop            |    4 ++++
>  tests/ref/fate/lagarith-ticket4119-pass            |    4 ++++
>  tests/ref/fate/lagarith-ticket4119-vfr             |    4 ++++
>  tests/ref/fate/lagarith-yuy2                       |    4 ++++
>  tests/ref/fate/lagarith-yv12                       |    4 ++++
>  tests/ref/fate/lmlm4-demux                         |    8 ++++++++
>  tests/ref/fate/loco-rgb                            |    4 ++++
>  tests/ref/fate/loco-yuy2                           |    4 ++++
>  tests/ref/fate/m4v                                 |    4 ++++
>  tests/ref/fate/m4v-cfr                             |    4 ++++
>  tests/ref/fate/maxis-xa                            |    4 ++++
>  tests/ref/fate/mdec                                |    4 ++++
>  tests/ref/fate/mdec-v3                             |    4 ++++
>  tests/ref/fate/mimic                               |    4 ++++
>  tests/ref/fate/mjpegb                              |    4 ++++
>  tests/ref/fate/mkv                                 |    8 ++++++++
>  tests/ref/fate/mkv-1242                            |    8 ++++++++
>  tests/ref/fate/motionpixels                        |    4 ++++
>  tests/ref/fate/mov-mp3-demux                       |    4 ++++
>  tests/ref/fate/mpeg2-field-enc                     |    4 ++++
>  tests/ref/fate/mpeg4-packed                        |    4 ++++
>  tests/ref/fate/mpeg4-resolution-change-down-down   |    4 ++++
>  tests/ref/fate/mpeg4-resolution-change-down-up     |    4 ++++
>  tests/ref/fate/mpeg4-resolution-change-up-down     |    4 ++++
>  tests/ref/fate/mpeg4-resolution-change-up-up       |    4 ++++
>  tests/ref/fate/msmpeg4v1                           |    4 ++++
>  tests/ref/fate/msrle-8bit                          |    4 ++++
>  tests/ref/fate/mss2-pal                            |    4 ++++
>  tests/ref/fate/mss2-pals                           |    4 ++++
>  tests/ref/fate/mss2-rgb555                         |    4 ++++
>  tests/ref/fate/mss2-rgb555s                        |    4 ++++
>  tests/ref/fate/mss2-wmv                            |    4 ++++
>  tests/ref/fate/msvideo1-16bit                      |    4 ++++
>  tests/ref/fate/msvideo1-8bit                       |    4 ++++
>  tests/ref/fate/mszh                                |    4 ++++
>  tests/ref/fate/mtv                                 |    8 ++++++++
>  tests/ref/fate/mv-mvc1                             |    4 ++++
>  tests/ref/fate/mv-mvc2                             |    4 ++++
>  tests/ref/fate/mv-sgirle                           |    4 ++++
>  tests/ref/fate/mxf-demux                           |    8 ++++++++
>  tests/ref/fate/mxf-essencegroup-demux              |    4 ++++
>  tests/ref/fate/mxpeg                               |    4 ++++
>  tests/ref/fate/nc-demux                            |    4 ++++
>  tests/ref/fate/nsv-demux                           |    8 ++++++++
>  tests/ref/fate/nuv-rtjpeg                          |    4 ++++
>  tests/ref/fate/nuv-rtjpeg-fh                       |    4 ++++
>  tests/ref/fate/oggvp8-demux                        |    4 ++++
>  tests/ref/fate/on2avc                              |    4 ++++
>  tests/ref/fate/paf-audio                           |    4 ++++
>  tests/ref/fate/paf-demux                           |    8 ++++++++
>  tests/ref/fate/paf-video                           |    4 ++++
>  tests/ref/fate/pcm-planar                          |    4 ++++
>  tests/ref/fate/pcm_dvd                             |    4 ++++
>  tests/ref/fate/pict                                |    4 ++++
>  tests/ref/fate/pictor                              |    4 ++++
>  tests/ref/fate/pmp-demux                           |    4 ++++
>  tests/ref/fate/png-gray16                          |    4 ++++
>  tests/ref/fate/png-gray8                           |    4 ++++
>  tests/ref/fate/png-rgb24                           |    4 ++++
>  tests/ref/fate/png-rgb48                           |    4 ++++
>  tests/ref/fate/png-rgba                            |    4 ++++
>  tests/ref/fate/png-ya16                            |    4 ++++
>  tests/ref/fate/png-ya8                             |    4 ++++
>  tests/ref/fate/pngparser                           |    4 ++++
>  tests/ref/fate/prores-422                          |    4 ++++
>  tests/ref/fate/prores-422_hq                       |    4 ++++
>  tests/ref/fate/prores-422_lt                       |    4 ++++
>  tests/ref/fate/prores-422_proxy                    |    4 ++++
>  tests/ref/fate/prores-alpha                        |    4 ++++
>  tests/ref/fate/prores-alpha_skip                   |    4 ++++
>  tests/ref/fate/prores-transparency                 |    8 ++++++++
>  tests/ref/fate/prores-transparency_skip            |    8 ++++++++
>  tests/ref/fate/psx-str-demux                       |    8 ++++++++
>  tests/ref/fate/ptx                                 |    4 ++++
>  tests/ref/fate/pva-demux                           |    8 ++++++++
>  tests/ref/fate/qpeg                                |    4 ++++
>  tests/ref/fate/qtrle-16bit                         |    4 ++++
>  tests/ref/fate/qtrle-1bit                          |    4 ++++
>  tests/ref/fate/qtrle-24bit                         |    4 ++++
>  tests/ref/fate/qtrle-2bit                          |    4 ++++
>  tests/ref/fate/qtrle-32bit                         |    4 ++++
>  tests/ref/fate/qtrle-4bit                          |    4 ++++
>  tests/ref/fate/qtrle-8bit                          |    4 ++++
>  tests/ref/fate/quickdraw                           |    4 ++++
>  tests/ref/fate/r210                                |    4 ++++
>  tests/ref/fate/ra3-144                             |    4 ++++
>  tests/ref/fate/redcode-demux                       |    8 ++++++++
>  tests/ref/fate/rl2                                 |    4 ++++
>  tests/ref/fate/roqvideo                            |    4 ++++
>  tests/ref/fate/rpza                                |    4 ++++
>  tests/ref/fate/rscc                                |    4 ++++
>  tests/ref/fate/rv30                                |    4 ++++
>  tests/ref/fate/rv40                                |    4 ++++
>  tests/ref/fate/sanm                                |    4 ++++
>  tests/ref/fate/screenpresso                        |    4 ++++
>  tests/ref/fate/sgi-gray16                          |    4 ++++
>  tests/ref/fate/sgi-gray16-rle                      |    4 ++++
>  tests/ref/fate/sgi-gray8                           |    4 ++++
>  tests/ref/fate/sgi-gray8-rle                       |    4 ++++
>  tests/ref/fate/sgi-rgb24                           |    4 ++++
>  tests/ref/fate/sgi-rgb24-rle                       |    4 ++++
>  tests/ref/fate/sgi-rgb48                           |    4 ++++
>  tests/ref/fate/sgi-rgb48-rle                       |    4 ++++
>  tests/ref/fate/sgi-rgba                            |    4 ++++
>  tests/ref/fate/sgi-rgba-rle                        |    4 ++++
>  tests/ref/fate/sgi-rgba64                          |    4 ++++
>  tests/ref/fate/sgi-rgba64-rle                      |    4 ++++
>  tests/ref/fate/sierra-vmd-audio                    |    4 ++++
>  tests/ref/fate/sierra-vmd-video                    |    4 ++++
>  tests/ref/fate/siff-demux                          |    8 ++++++++
>  tests/ref/fate/smacker-audio                       |    4 ++++
>  tests/ref/fate/smacker-video                       |    4 ++++
>  tests/ref/fate/smc                                 |    4 ++++
>  tests/ref/fate/smjpeg-demux                        |    8 ++++++++
>  tests/ref/fate/smvjpeg                             |    4 ++++
>  tests/ref/fate/sp5x                                |    8 ++++++++
>  tests/ref/fate/sub2video                           |    6 ++++++
>  tests/ref/fate/sunraster-1bit-raw                  |    4 ++++
>  tests/ref/fate/sunraster-1bit-rle                  |    4 ++++
>  tests/ref/fate/sunraster-24bit-raw                 |    4 ++++
>  tests/ref/fate/sunraster-24bit-rle                 |    4 ++++
>  tests/ref/fate/sunraster-8bit-raw                  |    4 ++++
>  tests/ref/fate/sunraster-8bit-rle                  |    4 ++++
>  tests/ref/fate/sunraster-8bit_gray-raw             |    4 ++++
>  tests/ref/fate/svq1                                |    4 ++++
>  tests/ref/fate/svq1-headerswap                     |    4 ++++
>  tests/ref/fate/svq3                                |    4 ++++
>  tests/ref/fate/targa-conformance-CBW8              |    4 ++++
>  tests/ref/fate/targa-conformance-CCM8              |    4 ++++
>  tests/ref/fate/targa-conformance-CTC16             |    4 ++++
>  tests/ref/fate/targa-conformance-CTC24             |    4 ++++
>  tests/ref/fate/targa-conformance-CTC32             |    4 ++++
>  tests/ref/fate/targa-conformance-UBW8              |    4 ++++
>  tests/ref/fate/targa-conformance-UCM8              |    4 ++++
>  tests/ref/fate/targa-conformance-UTC16             |    4 ++++
>  tests/ref/fate/targa-conformance-UTC24             |    4 ++++
>  tests/ref/fate/targa-conformance-UTC32             |    4 ++++
>  tests/ref/fate/targa-top-to-bottom                 |    4 ++++
>  tests/ref/fate/tdsc                                |    4 ++++
>  tests/ref/fate/theora-coeff-level64                |    4 ++++
>  tests/ref/fate/theora-offset                       |    4 ++++
>  tests/ref/fate/thp                                 |    4 ++++
>  tests/ref/fate/tiertex-seq                         |    8 ++++++++
>  tests/ref/fate/tiff-fax-g3                         |    4 ++++
>  tests/ref/fate/tiff-fax-g3s                        |    4 ++++
>  tests/ref/fate/tmv                                 |    8 ++++++++
>  tests/ref/fate/truemotion1-15                      |    4 ++++
>  tests/ref/fate/truemotion1-24                      |    4 ++++
>  tests/ref/fate/truemotion2                         |    4 ++++
>  tests/ref/fate/tscc-15bit                          |    8 ++++++++
>  tests/ref/fate/tscc-32bit                          |    4 ++++
>  tests/ref/fate/tscc2-avi                           |    4 ++++
>  tests/ref/fate/tscc2-mov                           |    4 ++++
>  tests/ref/fate/txd-16bpp                           |    4 ++++
>  tests/ref/fate/txd-odd                             |    4 ++++
>  tests/ref/fate/txd-pal8                            |    4 ++++
>  tests/ref/fate/ulti                                |    4 ++++
>  tests/ref/fate/utvideo_rgb_left                    |    4 ++++
>  tests/ref/fate/utvideo_rgb_median                  |    4 ++++
>  tests/ref/fate/utvideo_rgba_left                   |    4 ++++
>  tests/ref/fate/utvideo_rgba_median                 |    4 ++++
>  tests/ref/fate/utvideo_rgba_single_symbol          |    4 ++++
>  tests/ref/fate/utvideo_yuv420_left                 |    4 ++++
>  tests/ref/fate/utvideo_yuv420_median               |    4 ++++
>  tests/ref/fate/utvideo_yuv422_left                 |    4 ++++
>  tests/ref/fate/utvideo_yuv422_median               |    4 ++++
>  tests/ref/fate/utvideoenc_rgb_left                 |    4 ++++
>  tests/ref/fate/utvideoenc_rgb_median               |    4 ++++
>  tests/ref/fate/utvideoenc_rgb_none                 |    4 ++++
>  tests/ref/fate/utvideoenc_rgba_left                |    4 ++++
>  tests/ref/fate/utvideoenc_rgba_median              |    4 ++++
>  tests/ref/fate/utvideoenc_rgba_none                |    4 ++++
>  tests/ref/fate/utvideoenc_yuv420_left              |    4 ++++
>  tests/ref/fate/utvideoenc_yuv420_median            |    4 ++++
>  tests/ref/fate/utvideoenc_yuv420_none              |    4 ++++
>  tests/ref/fate/utvideoenc_yuv422_left              |    4 ++++
>  tests/ref/fate/utvideoenc_yuv422_median            |    4 ++++
>  tests/ref/fate/utvideoenc_yuv422_none              |    4 ++++
>  tests/ref/fate/v210                                |    4 ++++
>  tests/ref/fate/v410dec                             |    4 ++++
>  tests/ref/fate/vb                                  |    4 ++++
>  tests/ref/fate/vble                                |    4 ++++
>  tests/ref/fate/vc1-ism                             |    4 ++++
>  tests/ref/fate/vc1_ilaced_twomv                    |    4 ++++
>  tests/ref/fate/vc1_sa00040                         |    4 ++++
>  tests/ref/fate/vc1_sa00050                         |    4 ++++
>  tests/ref/fate/vc1_sa10091                         |    4 ++++
>  tests/ref/fate/vc1_sa10143                         |    4 ++++
>  tests/ref/fate/vc1_sa20021                         |    4 ++++
>  tests/ref/fate/vcr1                                |    4 ++++
>  tests/ref/fate/vcr2                                |    4 ++++
>  tests/ref/fate/videoxl                             |    4 ++++
>  tests/ref/fate/vmnc-16bit                          |    4 ++++
>  tests/ref/fate/vmnc-32bit                          |    4 ++++
>  tests/ref/fate/vp31                                |    4 ++++
>  tests/ref/fate/vp5                                 |    4 ++++
>  tests/ref/fate/vp60                                |    4 ++++
>  tests/ref/fate/vp61                                |    4 ++++
>  tests/ref/fate/vp6a                                |    4 ++++
>  tests/ref/fate/vp6a-skip_alpha                     |    4 ++++
>  tests/ref/fate/vp6f                                |    4 ++++
>  tests/ref/fate/vp7                                 |    4 ++++
>  tests/ref/fate/vp8-2451                            |    4 ++++
>  tests/ref/fate/vp8-alpha                           |    4 ++++
>  tests/ref/fate/vp8-sign-bias                       |    4 ++++
>  tests/ref/fate/vp8-size-change                     |    4 ++++
>  tests/ref/fate/vp8-test-vector-001                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-002                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-003                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-004                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-005                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-006                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-007                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-008                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-009                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-010                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-011                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-012                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-013                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-014                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-015                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-016                 |    4 ++++
>  tests/ref/fate/vp8-test-vector-017                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-00                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-01                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-02                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-03                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-04                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-05                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-06                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-07                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-08                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-09                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-10                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-11                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-12                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-13                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-14                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-15                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-16                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-17                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-18                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-19                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-20                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-21                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-22                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-23                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-24                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-25                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-26                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-27                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-28                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-29                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-30                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-31                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-32                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-33                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-34                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-35                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-36                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-37                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-38                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-39                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-40                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-41                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-42                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-43                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-44                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-45                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-46                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-47                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-48                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-49                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-50                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-51                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-52                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-53                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-54                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-55                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-56                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-57                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-58                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-59                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-60                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-61                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-62                 |    4 ++++
>  tests/ref/fate/vp9-00-quantizer-63                 |    4 ++++
>  tests/ref/fate/vp9-01-sharpness-1                  |    4 ++++
>  tests/ref/fate/vp9-01-sharpness-2                  |    4 ++++
>  tests/ref/fate/vp9-01-sharpness-3                  |    4 ++++
>  tests/ref/fate/vp9-01-sharpness-4                  |    4 ++++
>  tests/ref/fate/vp9-01-sharpness-5                  |    4 ++++
>  tests/ref/fate/vp9-01-sharpness-6                  |    4 ++++
>  tests/ref/fate/vp9-01-sharpness-7                  |    4 ++++
>  tests/ref/fate/vp9-02-size-08x08                   |    4 ++++
>  tests/ref/fate/vp9-02-size-08x10                   |    4 ++++
>  tests/ref/fate/vp9-02-size-08x16                   |    4 ++++
>  tests/ref/fate/vp9-02-size-08x18                   |    4 ++++
>  tests/ref/fate/vp9-02-size-08x32                   |    4 ++++
>  tests/ref/fate/vp9-02-size-08x34                   |    4 ++++
>  tests/ref/fate/vp9-02-size-08x64                   |    4 ++++
>  tests/ref/fate/vp9-02-size-08x66                   |    4 ++++
>  tests/ref/fate/vp9-02-size-10x08                   |    4 ++++
>  tests/ref/fate/vp9-02-size-10x10                   |    4 ++++
>  tests/ref/fate/vp9-02-size-10x16                   |    4 ++++
>  tests/ref/fate/vp9-02-size-10x18                   |    4 ++++
>  tests/ref/fate/vp9-02-size-10x32                   |    4 ++++
>  tests/ref/fate/vp9-02-size-10x34                   |    4 ++++
>  tests/ref/fate/vp9-02-size-10x64                   |    4 ++++
>  tests/ref/fate/vp9-02-size-10x66                   |    4 ++++
>  tests/ref/fate/vp9-02-size-16x08                   |    4 ++++
>  tests/ref/fate/vp9-02-size-16x10                   |    4 ++++
>  tests/ref/fate/vp9-02-size-16x16                   |    4 ++++
>  tests/ref/fate/vp9-02-size-16x18                   |    4 ++++
>  tests/ref/fate/vp9-02-size-16x32                   |    4 ++++
>  tests/ref/fate/vp9-02-size-16x34                   |    4 ++++
>  tests/ref/fate/vp9-02-size-16x64                   |    4 ++++
>  tests/ref/fate/vp9-02-size-16x66                   |    4 ++++
>  tests/ref/fate/vp9-02-size-18x08                   |    4 ++++
>  tests/ref/fate/vp9-02-size-18x10                   |    4 ++++
>  tests/ref/fate/vp9-02-size-18x16                   |    4 ++++
>  tests/ref/fate/vp9-02-size-18x18                   |    4 ++++
>  tests/ref/fate/vp9-02-size-18x32                   |    4 ++++
>  tests/ref/fate/vp9-02-size-18x34                   |    4 ++++
>  tests/ref/fate/vp9-02-size-18x64                   |    4 ++++
>  tests/ref/fate/vp9-02-size-18x66                   |    4 ++++
>  tests/ref/fate/vp9-02-size-32x08                   |    4 ++++
>  tests/ref/fate/vp9-02-size-32x10                   |    4 ++++
>  tests/ref/fate/vp9-02-size-32x16                   |    4 ++++
>  tests/ref/fate/vp9-02-size-32x18                   |    4 ++++
>  tests/ref/fate/vp9-02-size-32x32                   |    4 ++++
>  tests/ref/fate/vp9-02-size-32x34                   |    4 ++++
>  tests/ref/fate/vp9-02-size-32x64                   |    4 ++++
>  tests/ref/fate/vp9-02-size-32x66                   |    4 ++++
>  tests/ref/fate/vp9-02-size-34x08                   |    4 ++++
>  tests/ref/fate/vp9-02-size-34x10                   |    4 ++++
>  tests/ref/fate/vp9-02-size-34x16                   |    4 ++++
>  tests/ref/fate/vp9-02-size-34x18                   |    4 ++++
>  tests/ref/fate/vp9-02-size-34x32                   |    4 ++++
>  tests/ref/fate/vp9-02-size-34x34                   |    4 ++++
>  tests/ref/fate/vp9-02-size-34x64                   |    4 ++++
>  tests/ref/fate/vp9-02-size-34x66                   |    4 ++++
>  tests/ref/fate/vp9-02-size-64x08                   |    4 ++++
>  tests/ref/fate/vp9-02-size-64x10                   |    4 ++++
>  tests/ref/fate/vp9-02-size-64x16                   |    4 ++++
>  tests/ref/fate/vp9-02-size-64x18                   |    4 ++++
>  tests/ref/fate/vp9-02-size-64x32                   |    4 ++++
>  tests/ref/fate/vp9-02-size-64x34                   |    4 ++++
>  tests/ref/fate/vp9-02-size-64x64                   |    4 ++++
>  tests/ref/fate/vp9-02-size-64x66                   |    4 ++++
>  tests/ref/fate/vp9-02-size-66x08                   |    4 ++++
>  tests/ref/fate/vp9-02-size-66x10                   |    4 ++++
>  tests/ref/fate/vp9-02-size-66x16                   |    4 ++++
>  tests/ref/fate/vp9-02-size-66x18                   |    4 ++++
>  tests/ref/fate/vp9-02-size-66x32                   |    4 ++++
>  tests/ref/fate/vp9-02-size-66x34                   |    4 ++++
>  tests/ref/fate/vp9-02-size-66x64                   |    4 ++++
>  tests/ref/fate/vp9-02-size-66x66                   |    4 ++++
>  tests/ref/fate/vp9-03-deltaq                       |    4 ++++
>  tests/ref/fate/vp9-03-size-196x196                 |    4 ++++
>  tests/ref/fate/vp9-03-size-196x198                 |    4 ++++
>  tests/ref/fate/vp9-03-size-196x200                 |    4 ++++
>  tests/ref/fate/vp9-03-size-196x202                 |    4 ++++
>  tests/ref/fate/vp9-03-size-196x208                 |    4 ++++
>  tests/ref/fate/vp9-03-size-196x210                 |    4 ++++
>  tests/ref/fate/vp9-03-size-196x224                 |    4 ++++
>  tests/ref/fate/vp9-03-size-196x226                 |    4 ++++
>  tests/ref/fate/vp9-03-size-198x196                 |    4 ++++
>  tests/ref/fate/vp9-03-size-198x198                 |    4 ++++
>  tests/ref/fate/vp9-03-size-198x200                 |    4 ++++
>  tests/ref/fate/vp9-03-size-198x202                 |    4 ++++
>  tests/ref/fate/vp9-03-size-198x208                 |    4 ++++
>  tests/ref/fate/vp9-03-size-198x210                 |    4 ++++
>  tests/ref/fate/vp9-03-size-198x224                 |    4 ++++
>  tests/ref/fate/vp9-03-size-198x226                 |    4 ++++
>  tests/ref/fate/vp9-03-size-200x196                 |    4 ++++
>  tests/ref/fate/vp9-03-size-200x198                 |    4 ++++
>  tests/ref/fate/vp9-03-size-200x200                 |    4 ++++
>  tests/ref/fate/vp9-03-size-200x202                 |    4 ++++
>  tests/ref/fate/vp9-03-size-200x208                 |    4 ++++
>  tests/ref/fate/vp9-03-size-200x210                 |    4 ++++
>  tests/ref/fate/vp9-03-size-200x224                 |    4 ++++
>  tests/ref/fate/vp9-03-size-200x226                 |    4 ++++
>  tests/ref/fate/vp9-03-size-202x196                 |    4 ++++
>  tests/ref/fate/vp9-03-size-202x198                 |    4 ++++
>  tests/ref/fate/vp9-03-size-202x200                 |    4 ++++
>  tests/ref/fate/vp9-03-size-202x202                 |    4 ++++
>  tests/ref/fate/vp9-03-size-202x208                 |    4 ++++
>  tests/ref/fate/vp9-03-size-202x210                 |    4 ++++
>  tests/ref/fate/vp9-03-size-202x224                 |    4 ++++
>  tests/ref/fate/vp9-03-size-202x226                 |    4 ++++
>  tests/ref/fate/vp9-03-size-208x196                 |    4 ++++
>  tests/ref/fate/vp9-03-size-208x198                 |    4 ++++
>  tests/ref/fate/vp9-03-size-208x200                 |    4 ++++
>  tests/ref/fate/vp9-03-size-208x202                 |    4 ++++
>  tests/ref/fate/vp9-03-size-208x208                 |    4 ++++
>  tests/ref/fate/vp9-03-size-208x210                 |    4 ++++
>  tests/ref/fate/vp9-03-size-208x224                 |    4 ++++
>  tests/ref/fate/vp9-03-size-208x226                 |    4 ++++
>  tests/ref/fate/vp9-03-size-210x196                 |    4 ++++
>  tests/ref/fate/vp9-03-size-210x198                 |    4 ++++
>  tests/ref/fate/vp9-03-size-210x200                 |    4 ++++
>  tests/ref/fate/vp9-03-size-210x202                 |    4 ++++
>  tests/ref/fate/vp9-03-size-210x208                 |    4 ++++
>  tests/ref/fate/vp9-03-size-210x210                 |    4 ++++
>  tests/ref/fate/vp9-03-size-210x224                 |    4 ++++
>  tests/ref/fate/vp9-03-size-210x226                 |    4 ++++
>  tests/ref/fate/vp9-03-size-224x196                 |    4 ++++
>  tests/ref/fate/vp9-03-size-224x198                 |    4 ++++
>  tests/ref/fate/vp9-03-size-224x200                 |    4 ++++
>  tests/ref/fate/vp9-03-size-224x202                 |    4 ++++
>  tests/ref/fate/vp9-03-size-224x208                 |    4 ++++
>  tests/ref/fate/vp9-03-size-224x210                 |    4 ++++
>  tests/ref/fate/vp9-03-size-224x224                 |    4 ++++
>  tests/ref/fate/vp9-03-size-224x226                 |    4 ++++
>  tests/ref/fate/vp9-03-size-226x196                 |    4 ++++
>  tests/ref/fate/vp9-03-size-226x198                 |    4 ++++
>  tests/ref/fate/vp9-03-size-226x200                 |    4 ++++
>  tests/ref/fate/vp9-03-size-226x202                 |    4 ++++
>  tests/ref/fate/vp9-03-size-226x208                 |    4 ++++
>  tests/ref/fate/vp9-03-size-226x210                 |    4 ++++
>  tests/ref/fate/vp9-03-size-226x224                 |    4 ++++
>  tests/ref/fate/vp9-03-size-226x226                 |    4 ++++
>  tests/ref/fate/vp9-05-resize                       |    4 ++++
>  tests/ref/fate/vp9-06-bilinear                     |    4 ++++
>  tests/ref/fate/vp9-09-lf_deltas                    |    4 ++++
>  tests/ref/fate/vp9-10-show-existing-frame          |    4 ++++
>  tests/ref/fate/vp9-10-show-existing-frame2         |    4 ++++
>  tests/ref/fate/vp9-15-segkey_adpq                  |    4 ++++
>  tests/ref/fate/vp9-16-intra-only                   |    4 ++++
>  tests/ref/fate/vp9-2pass-akiyo                     |    4 ++++
>  tests/ref/fate/vp9-parallelmode-akiyo              |    4 ++++
>  tests/ref/fate/vp9-segmentation-aq-akiyo           |    4 ++++
>  tests/ref/fate/vp9-segmentation-sf-akiyo           |    4 ++++
>  tests/ref/fate/vp9-tiling-pedestrian               |    4 ++++
>  tests/ref/fate/vp9-trac3849                        |    4 ++++
>  tests/ref/fate/vp9-trac4359                        |    4 ++++
>  tests/ref/fate/vp9p1-04-yuv422                     |    4 ++++
>  tests/ref/fate/vp9p1-04-yuv440                     |    4 ++++
>  tests/ref/fate/vp9p1-04-yuv444                     |    4 ++++
>  tests/ref/fate/vp9p2-20-10bit-yuv420               |    4 ++++
>  tests/ref/fate/vp9p2-20-12bit-yuv420               |    4 ++++
>  tests/ref/fate/vp9p3-20-10bit-yuv422               |    4 ++++
>  tests/ref/fate/vp9p3-20-10bit-yuv440               |    4 ++++
>  tests/ref/fate/vp9p3-20-10bit-yuv444               |    4 ++++
>  tests/ref/fate/vp9p3-20-12bit-yuv422               |    4 ++++
>  tests/ref/fate/vp9p3-20-12bit-yuv440               |    4 ++++
>  tests/ref/fate/vp9p3-20-12bit-yuv444               |    4 ++++
>  tests/ref/fate/vqa-cc                              |    4 ++++
>  tests/ref/fate/vqf-demux                           |    2 +-
>  tests/ref/fate/wc3movie-xan                        |    8 ++++++++
>  tests/ref/fate/westwood-aud                        |    4 ++++
>  tests/ref/fate/wmv8-drm                            |    4 ++++
>  tests/ref/fate/wmv8-drm-nodec                      |    8 ++++++++
>  tests/ref/fate/wnv1                                |    4 ++++
>  tests/ref/fate/wtv-demux                           |    8 ++++++++
>  tests/ref/fate/xbm10                               |    4 ++++
>  tests/ref/fate/xbm11                               |    4 ++++
>  tests/ref/fate/xface                               |    4 ++++
>  tests/ref/fate/xmv-demux                           |    8 ++++++++
>  tests/ref/fate/xvid-custom-matrix                  |    4 ++++
>  tests/ref/fate/xvid-idct                           |    4 ++++
>  tests/ref/fate/xxan-wc4                            |    4 ++++
>  tests/ref/fate/yop                                 |    4 ++++
>  tests/ref/fate/zerocodec                           |    4 ++++
>  tests/ref/fate/zlib                                |    4 ++++
>  tests/ref/fate/zmbv-15bit                          |    4 ++++
>  tests/ref/fate/zmbv-16bit                          |    4 ++++
>  tests/ref/fate/zmbv-32bit                          |    4 ++++
>  tests/ref/fate/zmbv-8bit                           |    4 ++++
>  1239 files changed, 5105 insertions(+), 6 deletions(-)
> 
> diff --git a/libavformat/framehash.c b/libavformat/framehash.c
> index a8357b0..1afc749 100644
> --- a/libavformat/framehash.c
> +++ b/libavformat/framehash.c
> @@ -28,7 +28,20 @@ int ff_framehash_write_header(AVFormatContext *s)
>          avio_printf(s->pb, "#software: %s\n", LIBAVFORMAT_IDENT);
>      for (i = 0; i < s->nb_streams; i++) {
>          AVStream *st = s->streams[i];
> +        AVCodecContext *avctx = st->codec;
>          avio_printf(s->pb, "#tb %d: %d/%d\n", i, st->time_base.num, st->time_base.den);
> +        avio_printf(s->pb, "#media_type %d: %s\n", i, av_get_media_type_string(avctx->codec_type));
> +        avio_printf(s->pb, "#codec_id %d: %s\n", i, avcodec_get_name(avctx->codec_id));
> +        switch (avctx->codec_type) {
> +        case AVMEDIA_TYPE_AUDIO:
> +            avio_printf(s->pb, "#sample_rate %d: %d\n", i,avctx->sample_rate);
> +            avio_printf(s->pb, "#channel_layout %d: %"PRIx64"\n", i,avctx->channel_layout);
> +            break;
> +        case AVMEDIA_TYPE_VIDEO:
> +            avio_printf(s->pb, "#dimensions %d: %dx%d\n", i, avctx->width, avctx->height);
> +            avio_printf(s->pb, "#sar %d: %d/%d\n", i, st->sample_aspect_ratio.num, st->sample_aspect_ratio.den);
> +            break;
> +        }
>          avio_flush(s->pb);
>      }
>      return 0;
> diff --git a/tests/ref/fate/4xm-1 b/tests/ref/fate/4xm-1
> index 37371aa..96f3539 100644
> --- a/tests/ref/fate/4xm-1
> +++ b/tests/ref/fate/4xm-1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   921600, 0xd82e4d57
>  0,          1,          1,        1,   921600, 0x83f2349c
>  0,          2,          2,        1,   921600, 0x70d87db0
> diff --git a/tests/ref/fate/4xm-2 b/tests/ref/fate/4xm-2
> index 6895d12..c28dc14 100644
> --- a/tests/ref/fate/4xm-2
> +++ b/tests/ref/fate/4xm-2
> @@ -1,4 +1,8 @@
>  #tb 0: 4/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 240x112
> +#sar 0: 0/1
>  0,          0,          0,        1,    80640, 0x00000000
>  0,          1,          1,        1,    80640, 0x3a942680
>  0,          2,          2,        1,    80640, 0x3a942680
> diff --git a/tests/ref/fate/8bps b/tests/ref/fate/8bps
> index 9db9430..c6287ff 100644
> --- a/tests/ref/fate/8bps
> +++ b/tests/ref/fate/8bps
> @@ -1,5 +1,13 @@
>  #tb 0: 2/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 360x240
> +#sar 0: 9/10
>  #tb 1: 1/22050
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 22050
> +#channel_layout 1: 4
>  0,          0,          0,        1,   259200, 0x7e91df07
>  1,          0,          0,     1024,     2048, 0x3d042426
>  1,       1024,       1024,     1024,     2048, 0x5bcae456
> diff --git a/tests/ref/fate/aasc b/tests/ref/fate/aasc
> index 83f83b9..f69376e 100644
> --- a/tests/ref/fate/aasc
> +++ b/tests/ref/fate/aasc
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x175
> +#sar 0: 0/1
>  0,          0,          0,        1,   168000, 0x00000000
>  0,          1,          1,        1,   168000, 0x00000000
>  0,          2,          2,        1,   168000, 0x00000000
> diff --git a/tests/ref/fate/adpcm-4xm b/tests/ref/fate/adpcm-4xm
> index eb5cfe6..cb725e5 100644
> --- a/tests/ref/fate/adpcm-4xm
> +++ b/tests/ref/fate/adpcm-4xm
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 3
>  0,          0,          0,     1472,     5888, 0x9086e310
>  0,       1476,       1476,     1472,     5888, 0xac8491f5
>  0,       2952,       2952,     1472,     5888, 0xc9a08b6b
> diff --git a/tests/ref/fate/adpcm-afc b/tests/ref/fate/adpcm-afc
> index d1a1c36..0cf61a9 100644
> --- a/tests/ref/fate/adpcm-afc
> +++ b/tests/ref/fate/adpcm-afc
> @@ -1,4 +1,8 @@
>  #tb 0: 1/44100
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 44100
> +#channel_layout 0: 3
>  0,          0,          0,    17920,    71680, 0x52373bc9
>  0,      17920,      17920,    17920,    71680, 0x1f854b27
>  0,      35840,      35840,    17920,    71680, 0x3d265a6d
> diff --git a/tests/ref/fate/adpcm-dtk b/tests/ref/fate/adpcm-dtk
> index 3640e1c..acdf033 100644
> --- a/tests/ref/fate/adpcm-dtk
> +++ b/tests/ref/fate/adpcm-dtk
> @@ -1,4 +1,8 @@
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 48000
> +#channel_layout 0: 3
>  0,          0,          0,      896,     3584, 0xdae789d5
>  0,        896,        896,      896,     3584, 0x168ed9b6
>  0,       1792,       1792,      896,     3584, 0x8920c8d5
> diff --git a/tests/ref/fate/adpcm-ea-1 b/tests/ref/fate/adpcm-ea-1
> index f5a33df..fa9906c 100644
> --- a/tests/ref/fate/adpcm-ea-1
> +++ b/tests/ref/fate/adpcm-ea-1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 3
>  0,          0,          0,     1484,     5936, 0x00000000
>  0,       1484,       1484,     1456,     5824, 0x00000000
>  0,       2940,       2940,     1484,     5936, 0x00000000
> diff --git a/tests/ref/fate/adpcm-ea-2 b/tests/ref/fate/adpcm-ea-2
> index f58d9a0..4743e3d 100644
> --- a/tests/ref/fate/adpcm-ea-2
> +++ b/tests/ref/fate/adpcm-ea-2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 3
>  0,          0,          0,     1484,     5936, 0xea261a29
>  0,       1484,       1484,     1456,     5824, 0x253df061
>  0,       2940,       2940,     1484,     5936, 0x603a5bd7
> diff --git a/tests/ref/fate/adpcm-ea-maxis-xa b/tests/ref/fate/adpcm-ea-maxis-xa
> index 5d6b5c0..b300c32 100644
> --- a/tests/ref/fate/adpcm-ea-maxis-xa
> +++ b/tests/ref/fate/adpcm-ea-maxis-xa
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 3
>  0,          0,          0,       28,      112, 0x291d1be4
>  0,         28,         28,       28,      112, 0xf08d33cc
>  0,         56,         56,       28,      112, 0x5b1521de
> diff --git a/tests/ref/fate/adpcm-ea-r1 b/tests/ref/fate/adpcm-ea-r1
> index 74d15c6..2208eb0 100644
> --- a/tests/ref/fate/adpcm-ea-r1
> +++ b/tests/ref/fate/adpcm-ea-r1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 48000
> +#channel_layout 0: 3
>  0,          0,          0,     1624,     6496, 0x00000000
>  0,       1624,       1624,     1596,     6384, 0x00000000
>  0,       3220,       3220,     1596,     6384, 0x00000000
> diff --git a/tests/ref/fate/adpcm-ima-amv b/tests/ref/fate/adpcm-ima-amv
> index 4bd22af..def9279 100644
> --- a/tests/ref/fate/adpcm-ima-amv
> +++ b/tests/ref/fate/adpcm-ima-amv
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 4
>  0,          0,          0,     1378,     2756, 0x0af35034
>  0,       1378,       1378,     1378,     2756, 0x8462443f
>  0,       2756,       2756,     1378,     2756, 0x9f493ba6
> diff --git a/tests/ref/fate/adpcm-ima-ea-eacs b/tests/ref/fate/adpcm-ima-ea-eacs
> index 9887296..d5ea2e5 100644
> --- a/tests/ref/fate/adpcm-ima-ea-eacs
> +++ b/tests/ref/fate/adpcm-ima-ea-eacs
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 3
>  0,          0,          0,     1468,     5872, 0x00000000
>  0,       1468,       1468,     1468,     5872, 0x00000000
>  0,       2936,       2936,     1468,     5872, 0x00000000
> diff --git a/tests/ref/fate/adpcm-ima-ea-sead b/tests/ref/fate/adpcm-ima-ea-sead
> index 17c1087..563bb49 100644
> --- a/tests/ref/fate/adpcm-ima-ea-sead
> +++ b/tests/ref/fate/adpcm-ima-ea-sead
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 3
>  0,          0,          0,      736,     2944, 0x00000000
>  0,        736,        736,     1472,     5888, 0x5ae3c2a4
>  0,       2208,       2208,     1472,     5888, 0x158fbcb4
> diff --git a/tests/ref/fate/adpcm-ima-smjpeg b/tests/ref/fate/adpcm-ima-smjpeg
> index 3a746b6..f88520d 100644
> --- a/tests/ref/fate/adpcm-ima-smjpeg
> +++ b/tests/ref/fate/adpcm-ima-smjpeg
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 4
>  0,          0,          0,      512,     1024, 0x00000000
>  0,        512,        512,      512,     1024, 0x00000000
>  0,       1024,       1024,      512,     1024, 0xed2d3f6b
> diff --git a/tests/ref/fate/adpcm-ima-ws b/tests/ref/fate/adpcm-ima-ws
> index 61e0def..0e41e1e 100644
> --- a/tests/ref/fate/adpcm-ima-ws
> +++ b/tests/ref/fate/adpcm-ima-ws
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 4
>  0,          0,          0,    11024,    22048, 0x0665d7f4
>  0,      11024,      11024,     1470,     2940, 0x0f3c64cb
>  0,      12494,      12494,     1470,     2940, 0xc90b9e78
> diff --git a/tests/ref/fate/adpcm-ms-mono b/tests/ref/fate/adpcm-ms-mono
> index c456708..254dc8a 100644
> --- a/tests/ref/fate/adpcm-ms-mono
> +++ b/tests/ref/fate/adpcm-ms-mono
> @@ -1,4 +1,8 @@
>  #tb 0: 1/11025
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 11025
> +#channel_layout 0: 4
>  0,          0,          0,      500,     1000, 0x64cd9403
>  0,        500,        500,      500,     1000, 0xa4ef8a9d
>  0,       1000,       1000,      500,     1000, 0x75c19868
> diff --git a/tests/ref/fate/adpcm-thp b/tests/ref/fate/adpcm-thp
> index 0063b6c..ff49303 100644
> --- a/tests/ref/fate/adpcm-thp
> +++ b/tests/ref/fate/adpcm-thp
> @@ -1,4 +1,8 @@
>  #tb 0: 1/32000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 32000
> +#channel_layout 0: 3
>  0,          0,          0,     1078,     4312, 0x469714f6
>  0,       1078,       1078,     1064,     4256, 0x6ca28f25
>  0,       2142,       2142,     1078,     4312, 0xd466f806
> diff --git a/tests/ref/fate/adpcm-vima b/tests/ref/fate/adpcm-vima
> index 6984c5d..5bc62c3 100644
> --- a/tests/ref/fate/adpcm-vima
> +++ b/tests/ref/fate/adpcm-vima
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 3
>  0,          0,          0,    73500,   294000, 0x37d439ee
>  0,      73500,      73500,     1470,     5880, 0xe524b177
>  0,      74970,      74970,     1470,     5880, 0x9e784af1
> diff --git a/tests/ref/fate/adpcm-xa b/tests/ref/fate/adpcm-xa
> index 04be2b9..e365227 100644
> --- a/tests/ref/fate/adpcm-xa
> +++ b/tests/ref/fate/adpcm-xa
> @@ -1,4 +1,8 @@
>  #tb 0: 1/37800
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 37800
> +#channel_layout 0: 3
>  0,          0,          0,     2016,     8064, 0xa307ed8c
>  0,       2016,       2016,     2016,     8064, 0xd2551927
>  0,       4032,       4032,     2016,     8064, 0x3264a799
> diff --git a/tests/ref/fate/aic b/tests/ref/fate/aic
> index 90692f1..1f50350 100644
> --- a/tests/ref/fate/aic
> +++ b/tests/ref/fate/aic
> @@ -1,4 +1,8 @@
>  #tb 0: 100/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1440x1080
> +#sar 0: 4/3
>  0,          0,          0,        1,  2332800, 0xd941b42f
>  0,          1,          1,        1,  2332800, 0xd941b42f
>  0,          2,          2,        1,  2332800, 0xae0f5983
> diff --git a/tests/ref/fate/aic-oddsize b/tests/ref/fate/aic-oddsize
> index 9183089..3763e32 100644
> --- a/tests/ref/fate/aic-oddsize
> +++ b/tests/ref/fate/aic-oddsize
> @@ -1,4 +1,8 @@
>  #tb 0: 1000/14587
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 481x241
> +#sar 0: 0/1
>  0,          0,          0,        1,   174243, 0xa40491e1
>  0,          1,          1,        1,   174243, 0xa12cbb56
>  0,          2,          2,        1,   174243, 0xa12cbb56
> diff --git a/tests/ref/fate/alg-mm b/tests/ref/fate/alg-mm
> index 5d97de9..5788012 100644
> --- a/tests/ref/fate/alg-mm
> +++ b/tests/ref/fate/alg-mm
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x160
> +#sar 0: 0/1
>  0,          0,          0,        1,   122880, 0x4ed8123f
>  0,          1,          1,        1,   122880, 0xc4c35304
>  0,          2,          2,        1,   122880, 0xbd3015fd
> diff --git a/tests/ref/fate/aliaspix-bgr b/tests/ref/fate/aliaspix-bgr
> index 8671d3e..f5c6b7d 100644
> --- a/tests/ref/fate/aliaspix-bgr
> +++ b/tests/ref/fate/aliaspix-bgr
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 201x79
> +#sar 0: 0/1
>  0,          0,          0,        1,    47637, 0xcb77368f
> diff --git a/tests/ref/fate/aliaspix-gray b/tests/ref/fate/aliaspix-gray
> index 0433a36..aa7b464 100644
> --- a/tests/ref/fate/aliaspix-gray
> +++ b/tests/ref/fate/aliaspix-gray
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 199x81
> +#sar 0: 0/1
>  0,          0,          0,        1,    16119, 0x3d0785f5
> diff --git a/tests/ref/fate/amv b/tests/ref/fate/amv
> index 407f077..4b2c168 100644
> --- a/tests/ref/fate/amv
> +++ b/tests/ref/fate/amv
> @@ -1,4 +1,8 @@
>  #tb 0: 1/16
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x120
> +#sar 0: 0/1
>  0,          0,          0,        1,    28800, 0x026058a9
>  0,          1,          1,        1,    28800, 0x5dc728de
>  0,          2,          2,        1,    28800, 0x83e19a2c
> diff --git a/tests/ref/fate/ansi b/tests/ref/fate/ansi
> index 78e853f..5cf6ff9 100644
> --- a/tests/ref/fate/ansi
> +++ b/tests/ref/fate/ansi
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x400
> +#sar 0: 0/1
>  0,          0,          0,        1,   768000, 0x772dd3d0
>  0,          1,          1,        1,   768000, 0xd7dab1d1
>  0,          2,          2,        1,   768000, 0x0e56f2d3
> diff --git a/tests/ref/fate/ansi256 b/tests/ref/fate/ansi256
> index 94acd45..f68a0d1 100644
> --- a/tests/ref/fate/ansi256
> +++ b/tests/ref/fate/ansi256
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x400
> +#sar 0: 0/1
>  0,          0,          0,        1,   768000, 0x4dfbb6d0
>  0,          1,          1,        1,   768000, 0x22652a22
>  0,          2,          2,        1,   768000, 0x6c613e8c
> diff --git a/tests/ref/fate/armovie-escape124 b/tests/ref/fate/armovie-escape124
> index 83614c2..5c8f051 100644
> --- a/tests/ref/fate/armovie-escape124
> +++ b/tests/ref/fate/armovie-escape124
> @@ -1,5 +1,13 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  #tb 1: 1/44100
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 44100
> +#channel_layout 1: 3
>  0,          0,          0,        1,   230400, 0xd133e177
>  1,          0,          0,    44100,   176400, 0xdd61578c
>  0,          1,          1,        1,   230400, 0xe3501bb2
> diff --git a/tests/ref/fate/armovie-escape130 b/tests/ref/fate/armovie-escape130
> index ee4ec26..6925a48 100644
> --- a/tests/ref/fate/armovie-escape130
> +++ b/tests/ref/fate/armovie-escape130
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x160
> +#sar 0: 0/1
>  0,          0,          0,        1,    76800, 0x860502ee
>  0,          1,          1,        1,    76800, 0x055da755
>  0,          2,          2,        1,    76800, 0x67969220
> diff --git a/tests/ref/fate/asf-repldata b/tests/ref/fate/asf-repldata
> index ff12ff0..9474456 100644
> --- a/tests/ref/fate/asf-repldata
> +++ b/tests/ref/fate/asf-repldata
> @@ -1,4 +1,8 @@
>  #tb 0: 1/1000
> +#media_type 0: video
> +#codec_id 0: msmpeg4v3
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        0,    23374, 0x8725b3b8
>  0,        122,        122,        0,    13732, 0x3ac8531a, F=0x0
>  0,        245,        245,        0,      615, 0xd31641b4, F=0x0
> diff --git a/tests/ref/fate/auravision-v1 b/tests/ref/fate/auravision-v1
> index 456f399..25a15ce 100644
> --- a/tests/ref/fate/auravision-v1
> +++ b/tests/ref/fate/auravision-v1
> @@ -1,4 +1,8 @@
>  #tb 0: 33339/500000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x120
> +#sar 0: 0/1
>  0,          0,          0,        1,    28800, 0x4a4efbbc
>  0,          1,          1,        1,    28800, 0xc6c7e26a
>  0,          2,          2,        1,    28800, 0x6cd40913
> diff --git a/tests/ref/fate/auravision-v2 b/tests/ref/fate/auravision-v2
> index f1e8e3a..498944a 100644
> --- a/tests/ref/fate/auravision-v2
> +++ b/tests/ref/fate/auravision-v2
> @@ -1,3 +1,7 @@
>  #tb 0: 33333/1000000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x180
> +#sar 0: 0/1
>  0,          0,          0,        1,   115200, 0x2f247f66
>  0,          1,          1,        1,   115200, 0xf492929e
> diff --git a/tests/ref/fate/avio-direct b/tests/ref/fate/avio-direct
> index 599683a..c0628e9 100644
> --- a/tests/ref/fate/avio-direct
> +++ b/tests/ref/fate/avio-direct
> @@ -1,4 +1,8 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 288x168
> +#sar 0: 0/1
>  0,          0,          0,        1,   145152, 0x8458d4cb
>  0,          1,          1,        1,   145152, 0xa694d7c7
>  0,          2,          2,        1,   145152, 0x2bd4bfc9
> diff --git a/tests/ref/fate/bethsoft-vid b/tests/ref/fate/bethsoft-vid
> index 9f96da1..ccb0d37 100644
> --- a/tests/ref/fate/bethsoft-vid
> +++ b/tests/ref/fate/bethsoft-vid
> @@ -1,5 +1,13 @@
>  #tb 0: 1/14
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  #tb 1: 1/11111
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 11111
> +#channel_layout 1: 4
>  0,          0,          0,        1,   192000, 0x00000000
>  1,          0,          0,      740,     1480, 0x00000000
>  1,        740,        740,      740,     1480, 0x20a92bd4
> diff --git a/tests/ref/fate/bfi b/tests/ref/fate/bfi
> index 0d3d8f2..807615c 100644
> --- a/tests/ref/fate/bfi
> +++ b/tests/ref/fate/bfi
> @@ -1,5 +1,13 @@
>  #tb 0: 1/9
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x140
> +#sar 0: 0/1
>  #tb 1: 1/11025
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 11025
> +#channel_layout 1: 4
>  0,          0,          0,        1,   134400, 0xc218b00c
>  1,          0,          0,     8884,    17768, 0x07df135c
>  0,          1,          1,        1,   134400, 0x114daf7c
> diff --git a/tests/ref/fate/bink-video-b b/tests/ref/fate/bink-video-b
> index c772eda..663457a 100644
> --- a/tests/ref/fate/bink-video-b
> +++ b/tests/ref/fate/bink-video-b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 200x116
> +#sar 0: 0/1
>  0,          0,          0,        1,    34800, 0x4fd0a8e4
>  0,          1,          1,        1,    34800, 0xd381a7b7
>  0,          2,          2,        1,    34800, 0x688ca315
> diff --git a/tests/ref/fate/bink-video-f b/tests/ref/fate/bink-video-f
> index 40bc5a9..912ceed 100644
> --- a/tests/ref/fate/bink-video-f
> +++ b/tests/ref/fate/bink-video-f
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   460800, 0xb06f7841
>  0,          1,          1,        1,   460800, 0x7ed06412
>  0,          2,          2,        1,   460800, 0xe82b5c3d
> diff --git a/tests/ref/fate/bink-video-i b/tests/ref/fate/bink-video-i
> index 32c5e10..0d67e98 100644
> --- a/tests/ref/fate/bink-video-i
> +++ b/tests/ref/fate/bink-video-i
> @@ -1,4 +1,8 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   460800, 0xaef133d9
>  0,          1,          1,        1,   460800, 0x2da1248b
>  0,          2,          2,        1,   460800, 0x3d7945b4
> diff --git a/tests/ref/fate/bmp-15bit b/tests/ref/fate/bmp-15bit
> index a0f3bbf..29b6335 100644
> --- a/tests/ref/fate/bmp-15bit
> +++ b/tests/ref/fate/bmp-15bit
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 127x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16256, 0xdbcf881d
> diff --git a/tests/ref/fate/bmp-15bit-mask b/tests/ref/fate/bmp-15bit-mask
> index a0f3bbf..29b6335 100644
> --- a/tests/ref/fate/bmp-15bit-mask
> +++ b/tests/ref/fate/bmp-15bit-mask
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 127x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16256, 0xdbcf881d
> diff --git a/tests/ref/fate/bmp-16bit-mask b/tests/ref/fate/bmp-16bit-mask
> index afa5ab4..8760ff8 100644
> --- a/tests/ref/fate/bmp-16bit-mask
> +++ b/tests/ref/fate/bmp-16bit-mask
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 127x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16256, 0x44675948
> diff --git a/tests/ref/fate/bmp-1bit b/tests/ref/fate/bmp-1bit
> index 1c825b1..a40328f 100644
> --- a/tests/ref/fate/bmp-1bit
> +++ b/tests/ref/fate/bmp-1bit
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 127x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    24384, 0x4c968301
> diff --git a/tests/ref/fate/bmp-24bit b/tests/ref/fate/bmp-24bit
> index 8f1a615..6394d2f 100644
> --- a/tests/ref/fate/bmp-24bit
> +++ b/tests/ref/fate/bmp-24bit
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 127x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    24384, 0x325dd8d9
> diff --git a/tests/ref/fate/bmp-32bit b/tests/ref/fate/bmp-32bit
> index 8f1a615..6394d2f 100644
> --- a/tests/ref/fate/bmp-32bit
> +++ b/tests/ref/fate/bmp-32bit
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 127x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    24384, 0x325dd8d9
> diff --git a/tests/ref/fate/bmp-32bit-mask b/tests/ref/fate/bmp-32bit-mask
> index 8f1a615..6394d2f 100644
> --- a/tests/ref/fate/bmp-32bit-mask
> +++ b/tests/ref/fate/bmp-32bit-mask
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 127x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    24384, 0x325dd8d9
> diff --git a/tests/ref/fate/bmp-4bit b/tests/ref/fate/bmp-4bit
> index c0eedf1..b4262c9 100644
> --- a/tests/ref/fate/bmp-4bit
> +++ b/tests/ref/fate/bmp-4bit
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 127x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    24384, 0x322d81f4
> diff --git a/tests/ref/fate/bmp-4bit-os2 b/tests/ref/fate/bmp-4bit-os2
> index 8a5f658..9cf9cf0 100644
> --- a/tests/ref/fate/bmp-4bit-os2
> +++ b/tests/ref/fate/bmp-4bit-os2
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 300x22
> +#sar 0: 0/1
>  0,          0,          0,        1,    19800, 0x563b599a
> diff --git a/tests/ref/fate/bmp-8bit b/tests/ref/fate/bmp-8bit
> index 887113c..3ecea53 100644
> --- a/tests/ref/fate/bmp-8bit
> +++ b/tests/ref/fate/bmp-8bit
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 127x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    24384, 0xa7aa6b9b
> diff --git a/tests/ref/fate/bmp-8bit-os2 b/tests/ref/fate/bmp-8bit-os2
> index 887113c..3ecea53 100644
> --- a/tests/ref/fate/bmp-8bit-os2
> +++ b/tests/ref/fate/bmp-8bit-os2
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 127x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    24384, 0xa7aa6b9b
> diff --git a/tests/ref/fate/bmp-rle4 b/tests/ref/fate/bmp-rle4
> index c0eedf1..b4262c9 100644
> --- a/tests/ref/fate/bmp-rle4
> +++ b/tests/ref/fate/bmp-rle4
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 127x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    24384, 0x322d81f4
> diff --git a/tests/ref/fate/bmp-rle8 b/tests/ref/fate/bmp-rle8
> index 887113c..3ecea53 100644
> --- a/tests/ref/fate/bmp-rle8
> +++ b/tests/ref/fate/bmp-rle8
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 127x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    24384, 0xa7aa6b9b
> diff --git a/tests/ref/fate/bmpparser b/tests/ref/fate/bmpparser
> index 3cdd986..9340743 100644
> --- a/tests/ref/fate/bmpparser
> +++ b/tests/ref/fate/bmpparser
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 40x30
> +#sar 0: 0/1
>  0,          0,          0,        1,     3600, 0xd3a7c583
>  0,          1,          1,        1,     3600, 0x4602bbf9
>  0,          2,          2,        1,     3600, 0x3a96b8f8
> diff --git a/tests/ref/fate/bmv-audio b/tests/ref/fate/bmv-audio
> index 746bb0c..62f9c5e 100644
> --- a/tests/ref/fate/bmv-audio
> +++ b/tests/ref/fate/bmv-audio
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 3
>  0,          0,          0,     1856,     7424, 0x18540b36
>  0,       1856,       1856,     1824,     7296, 0x5acd2484
>  0,       3680,       3680,     1856,     7424, 0xa1bc5c5a
> diff --git a/tests/ref/fate/bmv-video b/tests/ref/fate/bmv-video
> index f19cd45..d360d58 100644
> --- a/tests/ref/fate/bmv-video
> +++ b/tests/ref/fate/bmv-video
> @@ -1,4 +1,8 @@
>  #tb 0: 1/12
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x429
> +#sar 0: 0/1
>  0,          0,          0,        1,   823680, 0xddb8a306
>  0,          1,          1,        1,   823680, 0xa95375c8
>  0,          2,          2,        1,   823680, 0xa95375c8
> diff --git a/tests/ref/fate/brenderpix-24 b/tests/ref/fate/brenderpix-24
> index 32b29a0..be81fc2 100644
> --- a/tests/ref/fate/brenderpix-24
> +++ b/tests/ref/fate/brenderpix-24
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    32768, 0x18bc6caa
> diff --git a/tests/ref/fate/brenderpix-565 b/tests/ref/fate/brenderpix-565
> index c243a4c..bc92766 100644
> --- a/tests/ref/fate/brenderpix-565
> +++ b/tests/ref/fate/brenderpix-565
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    32768, 0xfd855dda
> diff --git a/tests/ref/fate/brenderpix-defpal b/tests/ref/fate/brenderpix-defpal
> index 6c55740..c5632ae 100644
> --- a/tests/ref/fate/brenderpix-defpal
> +++ b/tests/ref/fate/brenderpix-defpal
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   196608, 0xada11d14
> diff --git a/tests/ref/fate/brenderpix-intpal b/tests/ref/fate/brenderpix-intpal
> index 473b153..789c87d 100644
> --- a/tests/ref/fate/brenderpix-intpal
> +++ b/tests/ref/fate/brenderpix-intpal
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   196608, 0x9662f917
> diff --git a/tests/ref/fate/brenderpix-y400a b/tests/ref/fate/brenderpix-y400a
> index 00e1540..1f7c8db 100644
> --- a/tests/ref/fate/brenderpix-y400a
> +++ b/tests/ref/fate/brenderpix-y400a
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 16x96
> +#sar 0: 0/1
>  0,          0,          0,        1,     3072, 0x48280456
> diff --git a/tests/ref/fate/canopus-cllc-argb b/tests/ref/fate/canopus-cllc-argb
> index 4a5dce5..bab7ed7 100644
> --- a/tests/ref/fate/canopus-cllc-argb
> +++ b/tests/ref/fate/canopus-cllc-argb
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/24000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 1/1
>  0,          0,          0,        1,  3686400, 0xb37a6e69
>  0,          1,          1,        1,  3686400, 0x66a45032
>  0,          2,          2,        1,  3686400, 0xdf0c861f
> diff --git a/tests/ref/fate/canopus-cllc-rgb b/tests/ref/fate/canopus-cllc-rgb
> index b4ca055..e9f54d1 100644
> --- a/tests/ref/fate/canopus-cllc-rgb
> +++ b/tests/ref/fate/canopus-cllc-rgb
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 1/1
>  0,          0,          0,        1,   921600, 0x82e44cb9
>  0,          1,          1,        1,   921600, 0x6ecc8a6c
>  0,          2,          2,        1,   921600, 0x0dc31839
> diff --git a/tests/ref/fate/canopus-cllc-yuy2-noblock b/tests/ref/fate/canopus-cllc-yuy2-noblock
> index 6ad59d5..6242a82 100644
> --- a/tests/ref/fate/canopus-cllc-yuy2-noblock
> +++ b/tests/ref/fate/canopus-cllc-yuy2-noblock
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 1/1
>  0,          0,          0,        1,   614400, 0x088c51de
>  0,          1,          1,        1,   614400, 0x93fff662
>  0,          2,          2,        1,   614400, 0x90ba6c28
> diff --git a/tests/ref/fate/canopus-hq_hqa-hq b/tests/ref/fate/canopus-hq_hqa-hq
> index ca376dc..657e1e1 100644
> --- a/tests/ref/fate/canopus-hq_hqa-hq
> +++ b/tests/ref/fate/canopus-hq_hqa-hq
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 64/45
>  0,          0,          0,        1,   829440, 0x8b6b2f6d
>  0,          1,          1,        1,   829440, 0x70382bf0
>  0,          2,          2,        1,   829440, 0xbfdf1f8d
> diff --git a/tests/ref/fate/canopus-hq_hqa-hqa b/tests/ref/fate/canopus-hq_hqa-hqa
> index 0996500..1fd5bf7 100644
> --- a/tests/ref/fate/canopus-hq_hqa-hqa
> +++ b/tests/ref/fate/canopus-hq_hqa-hqa
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 1/1
>  0,          0,          0,        1,  6220800, 0x2b2b17cc
> diff --git a/tests/ref/fate/canopus-hq_hqa-inter b/tests/ref/fate/canopus-hq_hqa-inter
> index 2880c95..e4bbb5e 100644
> --- a/tests/ref/fate/canopus-hq_hqa-inter
> +++ b/tests/ref/fate/canopus-hq_hqa-inter
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 1/1
>  0,          0,          0,        1,  4147200, 0x418ecfe5
> diff --git a/tests/ref/fate/canopus-hqx422 b/tests/ref/fate/canopus-hqx422
> index 2e1fdf1..5501abd 100644
> --- a/tests/ref/fate/canopus-hqx422
> +++ b/tests/ref/fate/canopus-hqx422
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 64/45
>  0,          0,          0,        1,  1658880, 0x823fcbac
> diff --git a/tests/ref/fate/canopus-hqx422a b/tests/ref/fate/canopus-hqx422a
> index 0fd2577..e22af12 100644
> --- a/tests/ref/fate/canopus-hqx422a
> +++ b/tests/ref/fate/canopus-hqx422a
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 1/1
>  0,          0,          0,        1,  8294400, 0x9a22bebf
> diff --git a/tests/ref/fate/cavs b/tests/ref/fate/cavs
> index 87cf9ca..31b9d29 100644
> --- a/tests/ref/fate/cavs
> +++ b/tests/ref/fate/cavs
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 0/1
>  0,          0,          0,        1,   622080, 0x2276bc78
>  0,          1,          1,        1,   622080, 0xda1f698a
>  0,          2,          2,        1,   622080, 0xb9907023
> diff --git a/tests/ref/fate/cdgraphics b/tests/ref/fate/cdgraphics
> index ee02f5d..f079bd4 100644
> --- a/tests/ref/fate/cdgraphics
> +++ b/tests/ref/fate/cdgraphics
> @@ -1,4 +1,8 @@
>  #tb 0: 1/300
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 300x216
> +#sar 0: 0/1
>  0,          0,          0,        1,   259200, 0x29aeb27e
>  0,          1,          1,        1,   259200, 0x29aeb27e
>  0,          2,          2,        1,   259200, 0x6779f55d
> diff --git a/tests/ref/fate/cdxl-bitline-ham6 b/tests/ref/fate/cdxl-bitline-ham6
> index 9ba7404..37c1459 100644
> --- a/tests/ref/fate/cdxl-bitline-ham6
> +++ b/tests/ref/fate/cdxl-bitline-ham6
> @@ -1,4 +1,8 @@
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 162x130
> +#sar 0: 0/1
>  0,          0,          0,        1,    63180, 0xcda82c16
>  0,          1,          1,        1,    63180, 0xa6097bf9
>  0,          2,          2,        1,    63180, 0x4c2fb091
> diff --git a/tests/ref/fate/cdxl-demux b/tests/ref/fate/cdxl-demux
> index 7e4c4c8..828b2c9 100644
> --- a/tests/ref/fate/cdxl-demux
> +++ b/tests/ref/fate/cdxl-demux
> @@ -1,5 +1,13 @@
>  #tb 0: 1/11025
> +#media_type 0: video
> +#codec_id 0: cdxl
> +#dimensions 0: 176x128
> +#sar 0: 0/1
>  #tb 1: 1/11025
> +#media_type 1: audio
> +#codec_id 1: pcm_s8
> +#sample_rate 1: 11025
> +#channel_layout 1: 4
>  0,          0,          0,     1884,    22688, 0xc954a244
>  1,          0,          0,     1884,     1884, 0x06925e3e
>  0,       1884,       1884,     1884,    22688, 0x3ee4a304
> diff --git a/tests/ref/fate/cdxl-ham6 b/tests/ref/fate/cdxl-ham6
> index 6426d45..1602c8a 100644
> --- a/tests/ref/fate/cdxl-ham6
> +++ b/tests/ref/fate/cdxl-ham6
> @@ -1,4 +1,8 @@
>  #tb 0: 52/525
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x120
> +#sar 0: 0/1
>  0,          0,          0,        1,    57600, 0x87887a7b
>  0,          1,          1,        1,    57600, 0x10c301d2
>  0,          2,          2,        1,    57600, 0xd1a6f910
> diff --git a/tests/ref/fate/cdxl-ham8 b/tests/ref/fate/cdxl-ham8
> index 1eebea3..ab1f76a 100644
> --- a/tests/ref/fate/cdxl-ham8
> +++ b/tests/ref/fate/cdxl-ham8
> @@ -1,2 +1,6 @@
>  #tb 0: 12/281
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    67584, 0xce0cade5
> diff --git a/tests/ref/fate/cdxl-pal8 b/tests/ref/fate/cdxl-pal8
> index b2fb045..a242b0c 100644
> --- a/tests/ref/fate/cdxl-pal8
> +++ b/tests/ref/fate/cdxl-pal8
> @@ -1,4 +1,8 @@
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    67584, 0x5eae629b
>  0,          1,          1,        1,    67584, 0x32591227
>  0,          2,          2,        1,    67584, 0x4e4424c7
> diff --git a/tests/ref/fate/cdxl-pal8-small b/tests/ref/fate/cdxl-pal8-small
> index f7a1a46..326eef7 100644
> --- a/tests/ref/fate/cdxl-pal8-small
> +++ b/tests/ref/fate/cdxl-pal8-small
> @@ -1,4 +1,8 @@
>  #tb 0: 368/11025
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x80
> +#sar 0: 0/1
>  0,          0,          0,        1,    30720, 0x0d552cfd
>  0,          1,          1,        1,    30720, 0x3cf93291
>  0,          2,          2,        1,    30720, 0xe45b2868
> diff --git a/tests/ref/fate/cljr b/tests/ref/fate/cljr
> index 5842541..ad4388d 100644
> --- a/tests/ref/fate/cljr
> +++ b/tests/ref/fate/cljr
> @@ -1,4 +1,8 @@
>  #tb 0: 3521/100000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 240x180
> +#sar 0: 0/1
>  0,          0,          0,        1,    64800, 0x63132a60
>  0,          1,          1,        1,    64800, 0xb3c729a3
>  0,          2,          2,        1,    64800, 0xa27b1e0e
> diff --git a/tests/ref/fate/corepng b/tests/ref/fate/corepng
> index e200714..4c106ed 100644
> --- a/tests/ref/fate/corepng
> +++ b/tests/ref/fate/corepng
> @@ -1,5 +1,13 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  #tb 1: 1/11025
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 11025
> +#channel_layout 1: 4
>  0,          0,          0,        1,   230400, 0x03e25ead
>  1,          0,          0,     5513,    11026, 0x27ad637c
>  0,          1,          1,        1,   230400, 0x0a520ffd
> diff --git a/tests/ref/fate/creatureshock-avs b/tests/ref/fate/creatureshock-avs
> index 4c721d8..82460b2 100644
> --- a/tests/ref/fate/creatureshock-avs
> +++ b/tests/ref/fate/creatureshock-avs
> @@ -1,5 +1,13 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 318x198
> +#sar 0: 0/1
>  #tb 1: 1/22222
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 22222
> +#channel_layout 1: 4
>  0,          0,          0,        1,   188892, 0x9f47a5ec
>  1,          0,          0,     8186,    16372, 0xfaaab59d
>  0,          1,          1,        1,   188892, 0xdece0269
> diff --git a/tests/ref/fate/cscd b/tests/ref/fate/cscd
> index 74fe94e..9af7b2f 100644
> --- a/tests/ref/fate/cscd
> +++ b/tests/ref/fate/cscd
> @@ -1,4 +1,8 @@
>  #tb 0: 1/200
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 300x300
> +#sar 0: 0/1
>  0,          0,          0,        1,   270000, 0xf90015d8
>  0,          9,          9,        1,   270000, 0xf90015d8
>  0,         15,         15,        1,   270000, 0xf90015d8
> diff --git a/tests/ref/fate/cvid-grayscale b/tests/ref/fate/cvid-grayscale
> index 1b586b3..a4f8dde 100644
> --- a/tests/ref/fate/cvid-grayscale
> +++ b/tests/ref/fate/cvid-grayscale
> @@ -1,4 +1,8 @@
>  #tb 0: 99561/500000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 100x75
> +#sar 0: 0/1
>  0,          0,          0,        1,    22500, 0x0f8e562e
>  0,          1,          1,        1,    22500, 0x507aef06
>  0,          2,          2,        1,    22500, 0x059d6137
> diff --git a/tests/ref/fate/cvid-palette b/tests/ref/fate/cvid-palette
> index 49de1c1..eae4161 100644
> --- a/tests/ref/fate/cvid-palette
> +++ b/tests/ref/fate/cvid-palette
> @@ -1,4 +1,8 @@
>  #tb 0: 200/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x120
> +#sar 0: 0/1
>  0,          0,          0,        1,    57600, 0x1f5c89b7
>  0,          1,          1,        1,    57600, 0xd2055aaf
>  0,          2,          2,        1,    57600, 0x22336052
> diff --git a/tests/ref/fate/cvid-partial b/tests/ref/fate/cvid-partial
> index bb368a1..990939d 100644
> --- a/tests/ref/fate/cvid-partial
> +++ b/tests/ref/fate/cvid-partial
> @@ -1,4 +1,8 @@
>  #tb 0: 1/12
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 400x187
> +#sar 0: 0/1
>  0,          0,          0,        1,   224400, 0xd8f2f310
>  0,          1,          1,        1,   224400, 0xe38676c2
>  0,          2,          2,        1,   224400, 0x7163b6ad
> diff --git a/tests/ref/fate/cyberia-c93 b/tests/ref/fate/cyberia-c93
> index f02435c..5eb4336 100644
> --- a/tests/ref/fate/cyberia-c93
> +++ b/tests/ref/fate/cyberia-c93
> @@ -1,5 +1,13 @@
>  #tb 0: 2/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x192
> +#sar 0: 5/6
>  #tb 1: 1/16129
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 16129
> +#channel_layout 1: 4
>  0,          0,          0,        1,   184320, 0x8433f0f8
>  1,          0,          0,    14184,    28368, 0xaacc96a5
>  0,          1,          1,        1,   184320, 0xd0d480f7
> diff --git a/tests/ref/fate/cyuv b/tests/ref/fate/cyuv
> index 37bdd2f..18caeb8 100644
> --- a/tests/ref/fate/cyuv
> +++ b/tests/ref/fate/cyuv
> @@ -1,4 +1,8 @@
>  #tb 0: 33333/1000000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x501e6abe
>  0,          1,          1,        1,    38016, 0x84976f13
>  0,          2,          2,        1,    38016, 0x8c487acb
> diff --git a/tests/ref/fate/d-cinema-demux b/tests/ref/fate/d-cinema-demux
> index 2f28e46..8e747de 100644
> --- a/tests/ref/fate/d-cinema-demux
> +++ b/tests/ref/fate/d-cinema-demux
> @@ -1,4 +1,8 @@
>  #tb 0: 1/90000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24daud
> +#sample_rate 0: 96000
> +#channel_layout 0: 60f
>  0,          0,          0,     1875,    36000, 0xd592781d
>  0,       1875,       1875,     1875,    36000, 0xd592781d
>  0,       3750,       3750,     1875,    36000, 0xd592781d
> diff --git a/tests/ref/fate/d-eavp6-demux b/tests/ref/fate/d-eavp6-demux
> index 3587a08..7cc13cf 100644
> --- a/tests/ref/fate/d-eavp6-demux
> +++ b/tests/ref/fate/d-eavp6-demux
> @@ -1,5 +1,13 @@
>  #tb 0: 32767/982027
> +#media_type 0: video
> +#codec_id 0: vp6
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  #tb 1: 32767/982027
> +#media_type 1: video
> +#codec_id 1: vp6
> +#dimensions 1: 64x64
> +#sar 1: 0/1
>  0,          0,          0,        1,     1860, 0xbd548c4c
>  1,          0,          0,        1,     1748, 0x96046284
>  0,          1,          1,        1,     1044, 0x814efc86, F=0x0
> diff --git a/tests/ref/fate/dca-xll_51_16_192_768_0 b/tests/ref/fate/dca-xll_51_16_192_768_0
> index 0e22d5d..ce43bfe 100644
> --- a/tests/ref/fate/dca-xll_51_16_192_768_0
> +++ b/tests/ref/fate/dca-xll_51_16_192_768_0
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/192000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 192000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     2048,    24576, 91ff0dac5df86e798bfef5e573536b08
>  0,       2048,       2048,     2048,    24576, 91ff0dac5df86e798bfef5e573536b08
> diff --git a/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_2 b/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_2
> index 0e22d5d..ce43bfe 100644
> --- a/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_2
> +++ b/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_2
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/192000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 192000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     2048,    24576, 91ff0dac5df86e798bfef5e573536b08
>  0,       2048,       2048,     2048,    24576, 91ff0dac5df86e798bfef5e573536b08
> diff --git a/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_6 b/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_6
> index 0e22d5d..ce43bfe 100644
> --- a/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_6
> +++ b/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_6
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/192000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 192000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     2048,    24576, 91ff0dac5df86e798bfef5e573536b08
>  0,       2048,       2048,     2048,    24576, 91ff0dac5df86e798bfef5e573536b08
> diff --git a/tests/ref/fate/dca-xll_51_16_192_768_1 b/tests/ref/fate/dca-xll_51_16_192_768_1
> index 0e22d5d..ce43bfe 100644
> --- a/tests/ref/fate/dca-xll_51_16_192_768_1
> +++ b/tests/ref/fate/dca-xll_51_16_192_768_1
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/192000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 192000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     2048,    24576, 91ff0dac5df86e798bfef5e573536b08
>  0,       2048,       2048,     2048,    24576, 91ff0dac5df86e798bfef5e573536b08
> diff --git a/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2 b/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2
> index d97ad2f..aff7b60 100644
> --- a/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2
> +++ b/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/192000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 192000
> +#channel_layout 0: 3
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     2048,     8192, 0829f71740aab1ab98b33eae21dee122
>  0,       2048,       2048,     2048,     8192, c8ca1cff44674809d464ec39cf1bd1e9
> diff --git a/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_6 b/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_6
> index 0e22d5d..ce43bfe 100644
> --- a/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_6
> +++ b/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_6
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/192000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 192000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     2048,    24576, 91ff0dac5df86e798bfef5e573536b08
>  0,       2048,       2048,     2048,    24576, 91ff0dac5df86e798bfef5e573536b08
> diff --git a/tests/ref/fate/dca-xll_51_24_48_768 b/tests/ref/fate/dca-xll_51_24_48_768
> index 47a62ec..0bc72ea 100644
> --- a/tests/ref/fate/dca-xll_51_24_48_768
> +++ b/tests/ref/fate/dca-xll_51_24_48_768
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 48000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,      512,     9216, 13a95890b5f0947d6f058ca9c30a3e01
>  0,        512,        512,      512,     9216, 13a95890b5f0947d6f058ca9c30a3e01
> diff --git a/tests/ref/fate/dca-xll_51_24_48_768-dmix_2 b/tests/ref/fate/dca-xll_51_24_48_768-dmix_2
> index 1a736cf..458fde0 100644
> --- a/tests/ref/fate/dca-xll_51_24_48_768-dmix_2
> +++ b/tests/ref/fate/dca-xll_51_24_48_768-dmix_2
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 48000
> +#channel_layout 0: 3
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,      512,     3072, d2a70550489de356a2cd6bfc40711204
>  0,        512,        512,      512,     3072, d2a70550489de356a2cd6bfc40711204
> diff --git a/tests/ref/fate/dca-xll_51_24_48_768-dmix_6 b/tests/ref/fate/dca-xll_51_24_48_768-dmix_6
> index 47a62ec..0bc72ea 100644
> --- a/tests/ref/fate/dca-xll_51_24_48_768-dmix_6
> +++ b/tests/ref/fate/dca-xll_51_24_48_768-dmix_6
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 48000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,      512,     9216, 13a95890b5f0947d6f058ca9c30a3e01
>  0,        512,        512,      512,     9216, 13a95890b5f0947d6f058ca9c30a3e01
> diff --git a/tests/ref/fate/dca-xll_51_24_48_none b/tests/ref/fate/dca-xll_51_24_48_none
> index dffc587..fb0cc5b 100644
> --- a/tests/ref/fate/dca-xll_51_24_48_none
> +++ b/tests/ref/fate/dca-xll_51_24_48_none
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 48000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     1024,    18432, f9debe3f07be68533bf0295e3d2ba68a
>  0,       1024,       1024,     1024,    18432, 6707daa7724fdc552869e522a7936f26
> diff --git a/tests/ref/fate/dca-xll_51_24_48_none-dmix_2 b/tests/ref/fate/dca-xll_51_24_48_none-dmix_2
> index dffc587..fb0cc5b 100644
> --- a/tests/ref/fate/dca-xll_51_24_48_none-dmix_2
> +++ b/tests/ref/fate/dca-xll_51_24_48_none-dmix_2
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 48000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     1024,    18432, f9debe3f07be68533bf0295e3d2ba68a
>  0,       1024,       1024,     1024,    18432, 6707daa7724fdc552869e522a7936f26
> diff --git a/tests/ref/fate/dca-xll_51_24_48_none-dmix_6 b/tests/ref/fate/dca-xll_51_24_48_none-dmix_6
> index dffc587..fb0cc5b 100644
> --- a/tests/ref/fate/dca-xll_51_24_48_none-dmix_6
> +++ b/tests/ref/fate/dca-xll_51_24_48_none-dmix_6
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 48000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     1024,    18432, f9debe3f07be68533bf0295e3d2ba68a
>  0,       1024,       1024,     1024,    18432, 6707daa7724fdc552869e522a7936f26
> diff --git a/tests/ref/fate/dca-xll_71_24_48_768_0 b/tests/ref/fate/dca-xll_71_24_48_768_0
> index c122c6a..b2072ef 100644
> --- a/tests/ref/fate/dca-xll_71_24_48_768_0
> +++ b/tests/ref/fate/dca-xll_71_24_48_768_0
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 48000
> +#channel_layout 0: 63f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,      512,    12288, ca9f8c8eb1b9b311cb79999fa376c7f0
>  0,        512,        512,      512,    12288, 4072783b8efb99a9e5817067d68f61c6
> diff --git a/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2 b/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2
> index d653af8..8612db1 100644
> --- a/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2
> +++ b/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 48000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,      512,     9216, a2b724b146069938f0e2cb82490dea54
>  0,        512,        512,      512,     9216, 13a95890b5f0947d6f058ca9c30a3e01
> diff --git a/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6 b/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6
> index d653af8..8612db1 100644
> --- a/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6
> +++ b/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 48000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,      512,     9216, a2b724b146069938f0e2cb82490dea54
>  0,        512,        512,      512,     9216, 13a95890b5f0947d6f058ca9c30a3e01
> diff --git a/tests/ref/fate/dca-xll_71_24_48_768_1 b/tests/ref/fate/dca-xll_71_24_48_768_1
> index c122c6a..b2072ef 100644
> --- a/tests/ref/fate/dca-xll_71_24_48_768_1
> +++ b/tests/ref/fate/dca-xll_71_24_48_768_1
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 48000
> +#channel_layout 0: 63f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,      512,    12288, ca9f8c8eb1b9b311cb79999fa376c7f0
>  0,        512,        512,      512,    12288, 4072783b8efb99a9e5817067d68f61c6
> diff --git a/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2 b/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2
> index 58c381c..3ef1cc9 100644
> --- a/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2
> +++ b/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 48000
> +#channel_layout 0: 3
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,      512,     3072, d2a70550489de356a2cd6bfc40711204
>  0,        512,        512,      512,     3072, d2a70550489de356a2cd6bfc40711204
> diff --git a/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6 b/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6
> index d61048c..2b967bf 100644
> --- a/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6
> +++ b/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 48000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,      512,     9216, a2b724b146069938f0e2cb82490dea54
>  0,        512,        512,      512,     9216, 13a95890b5f0947d6f058ca9c30a3e01
> diff --git a/tests/ref/fate/dca-xll_71_24_96_768 b/tests/ref/fate/dca-xll_71_24_96_768
> index 72da526..52fb249 100644
> --- a/tests/ref/fate/dca-xll_71_24_96_768
> +++ b/tests/ref/fate/dca-xll_71_24_96_768
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/96000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 96000
> +#channel_layout 0: 63f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     1024,    24576, 0b24a527d66f2b0cab97f37e4cd79987
>  0,       1024,       1024,     1024,    24576, 91ff0dac5df86e798bfef5e573536b08
> diff --git a/tests/ref/fate/dca-xll_71_24_96_768-dmix_2 b/tests/ref/fate/dca-xll_71_24_96_768-dmix_2
> index b24c717..83f65c4 100644
> --- a/tests/ref/fate/dca-xll_71_24_96_768-dmix_2
> +++ b/tests/ref/fate/dca-xll_71_24_96_768-dmix_2
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/96000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 96000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     1024,    18432, 0a675f172b0e1a171c46dfaa4f1d0f00
>  0,       1024,       1024,     1024,    18432, f9debe3f07be68533bf0295e3d2ba68a
> diff --git a/tests/ref/fate/dca-xll_71_24_96_768-dmix_6 b/tests/ref/fate/dca-xll_71_24_96_768-dmix_6
> index b24c717..83f65c4 100644
> --- a/tests/ref/fate/dca-xll_71_24_96_768-dmix_6
> +++ b/tests/ref/fate/dca-xll_71_24_96_768-dmix_6
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/96000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 96000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     1024,    18432, 0a675f172b0e1a171c46dfaa4f1d0f00
>  0,       1024,       1024,     1024,    18432, f9debe3f07be68533bf0295e3d2ba68a
> diff --git a/tests/ref/fate/dca-xll_x96_51_24_96_1509 b/tests/ref/fate/dca-xll_x96_51_24_96_1509
> index 150ab25..1f2704f 100644
> --- a/tests/ref/fate/dca-xll_x96_51_24_96_1509
> +++ b/tests/ref/fate/dca-xll_x96_51_24_96_1509
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/96000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 96000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     1024,    18432, f9debe3f07be68533bf0295e3d2ba68a
>  0,       1024,       1024,     1024,    18432, f9debe3f07be68533bf0295e3d2ba68a
> diff --git a/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_2 b/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_2
> index 150ab25..1f2704f 100644
> --- a/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_2
> +++ b/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_2
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/96000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 96000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     1024,    18432, f9debe3f07be68533bf0295e3d2ba68a
>  0,       1024,       1024,     1024,    18432, f9debe3f07be68533bf0295e3d2ba68a
> diff --git a/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_6 b/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_6
> index 150ab25..1f2704f 100644
> --- a/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_6
> +++ b/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_6
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/96000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 96000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     1024,    18432, f9debe3f07be68533bf0295e3d2ba68a
>  0,       1024,       1024,     1024,    18432, f9debe3f07be68533bf0295e3d2ba68a
> diff --git a/tests/ref/fate/dca-xll_xch_61_24_48_768 b/tests/ref/fate/dca-xll_xch_61_24_48_768
> index 211aee1..232a8ba 100644
> --- a/tests/ref/fate/dca-xll_xch_61_24_48_768
> +++ b/tests/ref/fate/dca-xll_xch_61_24_48_768
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 48000
> +#channel_layout 0: 70f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,      512,    10752, c3c5b236c266a9090378def1ad497a21
>  0,        512,        512,      512,    10752, 36eb6749f8d9ce9f94860dcc447253ac
> diff --git a/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_2 b/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_2
> index 9309d8d..a1bda16 100644
> --- a/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_2
> +++ b/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_2
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 48000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,      512,     9216, 652c4e61f9abe9fba9de792242e2d31d
>  0,        512,        512,      512,     9216, 13a95890b5f0947d6f058ca9c30a3e01
> diff --git a/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_6 b/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_6
> index 9309d8d..a1bda16 100644
> --- a/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_6
> +++ b/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_6
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s24le
> +#sample_rate 0: 48000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,      512,     9216, 652c4e61f9abe9fba9de792242e2d31d
>  0,        512,        512,      512,     9216, 13a95890b5f0947d6f058ca9c30a3e01
> diff --git a/tests/ref/fate/dcinema-encode b/tests/ref/fate/dcinema-encode
> index 93ac172..8a4528f 100644
> --- a/tests/ref/fate/dcinema-encode
> +++ b/tests/ref/fate/dcinema-encode
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/96000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 96000
> +#channel_layout 0: 60f
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,      341,     4092, 697cddfcd0e21f24782af0705b7048f3
>  0,        341,        341,      341,     4092, a057b18cd493923fed33c18578f61e0b
> diff --git a/tests/ref/fate/dds-argb b/tests/ref/fate/dds-argb
> index fbde424..f230133 100644
> --- a/tests/ref/fate/dds-argb
> +++ b/tests/ref/fate/dds-argb
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 220x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    56320, 0xfcaa920b
> diff --git a/tests/ref/fate/dds-argb-aexp b/tests/ref/fate/dds-argb-aexp
> index f52410f..0e2b9af 100644
> --- a/tests/ref/fate/dds-argb-aexp
> +++ b/tests/ref/fate/dds-argb-aexp
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xfdd37c43
> diff --git a/tests/ref/fate/dds-dx10-bc1 b/tests/ref/fate/dds-dx10-bc1
> index 84efd9f..e99bf00 100644
> --- a/tests/ref/fate/dds-dx10-bc1
> +++ b/tests/ref/fate/dds-dx10-bc1
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xed2f850f
> diff --git a/tests/ref/fate/dds-dx10-bc1a b/tests/ref/fate/dds-dx10-bc1a
> index 8cb4589..53a2256 100644
> --- a/tests/ref/fate/dds-dx10-bc1a
> +++ b/tests/ref/fate/dds-dx10-bc1a
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x473b484b
> diff --git a/tests/ref/fate/dds-dx10-bc2 b/tests/ref/fate/dds-dx10-bc2
> index a25180d..5c31b38 100644
> --- a/tests/ref/fate/dds-dx10-bc2
> +++ b/tests/ref/fate/dds-dx10-bc2
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x2bce3baa
> diff --git a/tests/ref/fate/dds-dx10-bc3 b/tests/ref/fate/dds-dx10-bc3
> index 296c945..4bc4ef4 100644
> --- a/tests/ref/fate/dds-dx10-bc3
> +++ b/tests/ref/fate/dds-dx10-bc3
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xb91d3c62
> diff --git a/tests/ref/fate/dds-dx10-bc4 b/tests/ref/fate/dds-dx10-bc4
> index 4583d25..8d57cfa 100644
> --- a/tests/ref/fate/dds-dx10-bc4
> +++ b/tests/ref/fate/dds-dx10-bc4
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xfdfd1751
> diff --git a/tests/ref/fate/dds-dx10-bc5 b/tests/ref/fate/dds-dx10-bc5
> index bf595eb..d8e4734 100644
> --- a/tests/ref/fate/dds-dx10-bc5
> +++ b/tests/ref/fate/dds-dx10-bc5
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x79bd207e
> diff --git a/tests/ref/fate/dds-dxt1 b/tests/ref/fate/dds-dxt1
> index 2477406..f1c6c9c 100644
> --- a/tests/ref/fate/dds-dxt1
> +++ b/tests/ref/fate/dds-dxt1
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    32768, 0xf52adc80
> diff --git a/tests/ref/fate/dds-dxt1-normalmap b/tests/ref/fate/dds-dxt1-normalmap
> index 3f77547..15d63b1 100644
> --- a/tests/ref/fate/dds-dxt1-normalmap
> +++ b/tests/ref/fate/dds-dxt1-normalmap
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x2b411855
> diff --git a/tests/ref/fate/dds-dxt1a b/tests/ref/fate/dds-dxt1a
> index 05be314..1786b49 100644
> --- a/tests/ref/fate/dds-dxt1a
> +++ b/tests/ref/fate/dds-dxt1a
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xcabb50ea
> diff --git a/tests/ref/fate/dds-dxt2 b/tests/ref/fate/dds-dxt2
> index 40bcf6e..b5bdfba 100644
> --- a/tests/ref/fate/dds-dxt2
> +++ b/tests/ref/fate/dds-dxt2
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x11cebeb0
> diff --git a/tests/ref/fate/dds-dxt3 b/tests/ref/fate/dds-dxt3
> index 41401da..d93e35c 100644
> --- a/tests/ref/fate/dds-dxt3
> +++ b/tests/ref/fate/dds-dxt3
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x729b74ba
> diff --git a/tests/ref/fate/dds-dxt4 b/tests/ref/fate/dds-dxt4
> index dc5d73f..136dfd8 100644
> --- a/tests/ref/fate/dds-dxt4
> +++ b/tests/ref/fate/dds-dxt4
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x31aaacd6
> diff --git a/tests/ref/fate/dds-dxt5 b/tests/ref/fate/dds-dxt5
> index 399d6d9..696e038 100644
> --- a/tests/ref/fate/dds-dxt5
> +++ b/tests/ref/fate/dds-dxt5
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xfd3166aa
> diff --git a/tests/ref/fate/dds-dxt5-aexp b/tests/ref/fate/dds-dxt5-aexp
> index ff91afd..334dcc1 100644
> --- a/tests/ref/fate/dds-dxt5-aexp
> +++ b/tests/ref/fate/dds-dxt5-aexp
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x3c987914
> diff --git a/tests/ref/fate/dds-dxt5-normalmap b/tests/ref/fate/dds-dxt5-normalmap
> index 680d1b7..b562b19 100644
> --- a/tests/ref/fate/dds-dxt5-normalmap
> +++ b/tests/ref/fate/dds-dxt5-normalmap
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xd29b1ea1
> diff --git a/tests/ref/fate/dds-dxt5-normalmap-ati b/tests/ref/fate/dds-dxt5-normalmap-ati
> index 7f088f7..b1fb53d 100644
> --- a/tests/ref/fate/dds-dxt5-normalmap-ati
> +++ b/tests/ref/fate/dds-dxt5-normalmap-ati
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x54cb212f
> diff --git a/tests/ref/fate/dds-dxt5-rbxg b/tests/ref/fate/dds-dxt5-rbxg
> index 7dbecf4..0177946 100644
> --- a/tests/ref/fate/dds-dxt5-rbxg
> +++ b/tests/ref/fate/dds-dxt5-rbxg
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x37588d12
> diff --git a/tests/ref/fate/dds-dxt5-rgxb b/tests/ref/fate/dds-dxt5-rgxb
> index 137913d..522679c 100644
> --- a/tests/ref/fate/dds-dxt5-rgxb
> +++ b/tests/ref/fate/dds-dxt5-rgxb
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xfb6b91cf
> diff --git a/tests/ref/fate/dds-dxt5-rxbg b/tests/ref/fate/dds-dxt5-rxbg
> index b6e12d3..cc6a239 100644
> --- a/tests/ref/fate/dds-dxt5-rxbg
> +++ b/tests/ref/fate/dds-dxt5-rxbg
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xc6cb8cbe
> diff --git a/tests/ref/fate/dds-dxt5-rxgb b/tests/ref/fate/dds-dxt5-rxgb
> index a4190d5..9d70af8 100644
> --- a/tests/ref/fate/dds-dxt5-rxgb
> +++ b/tests/ref/fate/dds-dxt5-rxgb
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xb67d936a
> diff --git a/tests/ref/fate/dds-dxt5-xgbr b/tests/ref/fate/dds-dxt5-xgbr
> index 95404f2..2f82cdc 100644
> --- a/tests/ref/fate/dds-dxt5-xgbr
> +++ b/tests/ref/fate/dds-dxt5-xgbr
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xb0e69293
> diff --git a/tests/ref/fate/dds-dxt5-xgxr b/tests/ref/fate/dds-dxt5-xgxr
> index 3ed73c3..3555449 100644
> --- a/tests/ref/fate/dds-dxt5-xgxr
> +++ b/tests/ref/fate/dds-dxt5-xgxr
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xa93de1ad
> diff --git a/tests/ref/fate/dds-dxt5-xrbg b/tests/ref/fate/dds-dxt5-xrbg
> index f647955..e6228f7 100644
> --- a/tests/ref/fate/dds-dxt5-xrbg
> +++ b/tests/ref/fate/dds-dxt5-xrbg
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xf20d8b69
> diff --git a/tests/ref/fate/dds-dxt5-ycocg b/tests/ref/fate/dds-dxt5-ycocg
> index 1dd8bef..7f98652 100644
> --- a/tests/ref/fate/dds-dxt5-ycocg
> +++ b/tests/ref/fate/dds-dxt5-ycocg
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x0d0c8d20
> diff --git a/tests/ref/fate/dds-dxt5-ycocg-scaled b/tests/ref/fate/dds-dxt5-ycocg-scaled
> index 5a70b49..2e74a84 100644
> --- a/tests/ref/fate/dds-dxt5-ycocg-scaled
> +++ b/tests/ref/fate/dds-dxt5-ycocg-scaled
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x5a089973
> diff --git a/tests/ref/fate/dds-pal b/tests/ref/fate/dds-pal
> index 575a4bd..08c14a2 100644
> --- a/tests/ref/fate/dds-pal
> +++ b/tests/ref/fate/dds-pal
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    65536, 0x4287e5cd
> diff --git a/tests/ref/fate/dds-pal-ati b/tests/ref/fate/dds-pal-ati
> index 6de8adb..3303f76 100644
> --- a/tests/ref/fate/dds-pal-ati
> +++ b/tests/ref/fate/dds-pal-ati
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x6ac18060
> diff --git a/tests/ref/fate/dds-rgb16 b/tests/ref/fate/dds-rgb16
> index 40a9938..7865070 100644
> --- a/tests/ref/fate/dds-rgb16
> +++ b/tests/ref/fate/dds-rgb16
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xc8910265
> diff --git a/tests/ref/fate/dds-rgb24 b/tests/ref/fate/dds-rgb24
> index 3eeb1eb..2d4e7ed 100644
> --- a/tests/ref/fate/dds-rgb24
> +++ b/tests/ref/fate/dds-rgb24
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    24576, 0xef0f9653
> diff --git a/tests/ref/fate/dds-rgba b/tests/ref/fate/dds-rgba
> index 803b40a..7a14673 100644
> --- a/tests/ref/fate/dds-rgba
> +++ b/tests/ref/fate/dds-rgba
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 80x80
> +#sar 0: 0/1
>  0,          0,          0,        1,    25600, 0xa2a47b2f
> diff --git a/tests/ref/fate/dds-rgtc1s b/tests/ref/fate/dds-rgtc1s
> index 5085962..f0e271b 100644
> --- a/tests/ref/fate/dds-rgtc1s
> +++ b/tests/ref/fate/dds-rgtc1s
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xcda652a4
> diff --git a/tests/ref/fate/dds-rgtc1u b/tests/ref/fate/dds-rgtc1u
> index b7cff66..5ef5c05 100644
> --- a/tests/ref/fate/dds-rgtc1u
> +++ b/tests/ref/fate/dds-rgtc1u
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x629a1b44
> diff --git a/tests/ref/fate/dds-rgtc2s b/tests/ref/fate/dds-rgtc2s
> index 7227602..9e8653b 100644
> --- a/tests/ref/fate/dds-rgtc2s
> +++ b/tests/ref/fate/dds-rgtc2s
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0xa0135ca8
> diff --git a/tests/ref/fate/dds-rgtc2u b/tests/ref/fate/dds-rgtc2u
> index 0b6678b..9d3683f 100644
> --- a/tests/ref/fate/dds-rgtc2u
> +++ b/tests/ref/fate/dds-rgtc2u
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x38cb221a
> diff --git a/tests/ref/fate/dds-rgtc2u-xy b/tests/ref/fate/dds-rgtc2u-xy
> index bf595eb..d8e4734 100644
> --- a/tests/ref/fate/dds-rgtc2u-xy
> +++ b/tests/ref/fate/dds-rgtc2u-xy
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x79bd207e
> diff --git a/tests/ref/fate/dds-uyvy b/tests/ref/fate/dds-uyvy
> index 2bcbaa0..b6fa221 100644
> --- a/tests/ref/fate/dds-uyvy
> +++ b/tests/ref/fate/dds-uyvy
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,     8192, 0x3c658750
> diff --git a/tests/ref/fate/dds-xbgr b/tests/ref/fate/dds-xbgr
> index eb7a024..d4f4d98 100644
> --- a/tests/ref/fate/dds-xbgr
> +++ b/tests/ref/fate/dds-xbgr
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x70336a28
> diff --git a/tests/ref/fate/dds-xrgb b/tests/ref/fate/dds-xrgb
> index 63e5225..23d4667 100644
> --- a/tests/ref/fate/dds-xrgb
> +++ b/tests/ref/fate/dds-xrgb
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x702f6a28
> diff --git a/tests/ref/fate/dds-y b/tests/ref/fate/dds-y
> index ae62091..9a8f01d 100644
> --- a/tests/ref/fate/dds-y
> +++ b/tests/ref/fate/dds-y
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x64
> +#sar 0: 0/1
>  0,          0,          0,        1,     8192, 0x56eca90f
> diff --git a/tests/ref/fate/dds-ya b/tests/ref/fate/dds-ya
> index d6527c6..1de0436 100644
> --- a/tests/ref/fate/dds-ya
> +++ b/tests/ref/fate/dds-ya
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 220x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    28160, 0xd3981fcb
> diff --git a/tests/ref/fate/dds-ycocg b/tests/ref/fate/dds-ycocg
> index f3dd727..6d22842 100644
> --- a/tests/ref/fate/dds-ycocg
> +++ b/tests/ref/fate/dds-ycocg
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x4cb08d0a
> diff --git a/tests/ref/fate/dds-yuyv b/tests/ref/fate/dds-yuyv
> index e65c950..07efd87 100644
> --- a/tests/ref/fate/dds-yuyv
> +++ b/tests/ref/fate/dds-yuyv
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,     8192, 0xc1108750
> diff --git a/tests/ref/fate/delphine-cin-audio b/tests/ref/fate/delphine-cin-audio
> index 1a94a6b..5a69640 100644
> --- a/tests/ref/fate/delphine-cin-audio
> +++ b/tests/ref/fate/delphine-cin-audio
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 4
>  0,          0,          0,    88224,   176448, 0x541ddc55
>  0,      88224,      88224,     1838,     3676, 0xaf455081
>  0,      90062,      90062,     1838,     3676, 0x27ef4e91
> diff --git a/tests/ref/fate/delphine-cin-video b/tests/ref/fate/delphine-cin-video
> index feaea26..6d25164 100644
> --- a/tests/ref/fate/delphine-cin-video
> +++ b/tests/ref/fate/delphine-cin-video
> @@ -1,4 +1,8 @@
>  #tb 0: 1/12
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x160
> +#sar 0: 0/1
>  0,          0,          0,        1,   153600, 0x00000000
>  0,          1,          1,        1,   153600, 0x9c77862c
>  0,          2,          2,        1,   153600, 0xd487c33c
> diff --git a/tests/ref/fate/deluxepaint-anm b/tests/ref/fate/deluxepaint-anm
> index e69b95e..e466f25 100644
> --- a/tests/ref/fate/deluxepaint-anm
> +++ b/tests/ref/fate/deluxepaint-anm
> @@ -1,4 +1,8 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0x82a79641
>  0,          1,          1,        1,   192000, 0x43079971
>  0,          2,          2,        1,   192000, 0x6311f1e5
> diff --git a/tests/ref/fate/dfa1 b/tests/ref/fate/dfa1
> index 7bc5bf1..3764391 100644
> --- a/tests/ref/fate/dfa1
> +++ b/tests/ref/fate/dfa1
> @@ -1,4 +1,8 @@
>  #tb 0: 16/125
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   921600, 0xb69faa34
>  0,          1,          1,        1,   921600, 0x38680829
>  0,          2,          2,        1,   921600, 0xa7263c5a
> diff --git a/tests/ref/fate/dfa10 b/tests/ref/fate/dfa10
> index a799f03..8e0e3c9 100644
> --- a/tests/ref/fate/dfa10
> +++ b/tests/ref/fate/dfa10
> @@ -1,4 +1,8 @@
>  #tb 0: 71/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0x7384f9b2
>  0,          1,          1,        1,   192000, 0xd1f61c71
>  0,          2,          2,        1,   192000, 0x0c6937d1
> diff --git a/tests/ref/fate/dfa11 b/tests/ref/fate/dfa11
> index 30b4b71..22571b5 100644
> --- a/tests/ref/fate/dfa11
> +++ b/tests/ref/fate/dfa11
> @@ -1,4 +1,8 @@
>  #tb 0: 71/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0x4269d703
>  0,          1,          1,        1,   192000, 0xdf8667e7
>  0,          2,          2,        1,   192000, 0x450026ad
> diff --git a/tests/ref/fate/dfa2 b/tests/ref/fate/dfa2
> index cc4b454..0fd55b7 100644
> --- a/tests/ref/fate/dfa2
> +++ b/tests/ref/fate/dfa2
> @@ -1,4 +1,8 @@
>  #tb 0: 71/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   921600, 0x8a5d15df
>  0,          1,          1,        1,   921600, 0x92c01362
>  0,          2,          2,        1,   921600, 0xe1a31643
> diff --git a/tests/ref/fate/dfa3 b/tests/ref/fate/dfa3
> index 9b170ec..417250c 100644
> --- a/tests/ref/fate/dfa3
> +++ b/tests/ref/fate/dfa3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0x236a1b54
>  0,          1,          1,        1,   192000, 0xfb438b68
>  0,          2,          2,        1,   192000, 0xde504563
> diff --git a/tests/ref/fate/dfa4 b/tests/ref/fate/dfa4
> index 0e0dc02..76a4ede 100644
> --- a/tests/ref/fate/dfa4
> +++ b/tests/ref/fate/dfa4
> @@ -1,4 +1,8 @@
>  #tb 0: 71/500
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   921600, 0x00000000
>  0,          1,          1,        1,   921600, 0xd9e060e3
>  0,          2,          2,        1,   921600, 0x15e28dc7
> diff --git a/tests/ref/fate/dfa5 b/tests/ref/fate/dfa5
> index 3be3c52..c836bf7 100644
> --- a/tests/ref/fate/dfa5
> +++ b/tests/ref/fate/dfa5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0x9754890f
>  0,          1,          1,        1,   192000, 0x01668965
>  0,          2,          2,        1,   192000, 0xbd1b5e12
> diff --git a/tests/ref/fate/dfa6 b/tests/ref/fate/dfa6
> index 535f98b..83b1998 100644
> --- a/tests/ref/fate/dfa6
> +++ b/tests/ref/fate/dfa6
> @@ -1,4 +1,8 @@
>  #tb 0: 71/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0xb718dc63
>  0,          1,          1,        1,   192000, 0x2efb7b89
>  0,          2,          2,        1,   192000, 0x70827047
> diff --git a/tests/ref/fate/dfa7 b/tests/ref/fate/dfa7
> index 28122c5..6a62f72 100644
> --- a/tests/ref/fate/dfa7
> +++ b/tests/ref/fate/dfa7
> @@ -1,4 +1,8 @@
>  #tb 0: 71/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 46x57
> +#sar 0: 0/1
>  0,          0,          0,        1,     7866, 0xab73dae7
>  0,          1,          1,        1,     7866, 0x100adec8
>  0,          2,          2,        1,     7866, 0x1a20ddfa
> diff --git a/tests/ref/fate/dfa8 b/tests/ref/fate/dfa8
> index 866260a..7b83f3e 100644
> --- a/tests/ref/fate/dfa8
> +++ b/tests/ref/fate/dfa8
> @@ -1,4 +1,8 @@
>  #tb 0: 71/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 218x206
> +#sar 0: 0/1
>  0,          0,          0,        1,   134724, 0x53784ca9
>  0,          1,          1,        1,   134724, 0x14c345b7
>  0,          2,          2,        1,   134724, 0xe0d0dd51
> diff --git a/tests/ref/fate/dfa9 b/tests/ref/fate/dfa9
> index 99eb3f6..74b596f 100644
> --- a/tests/ref/fate/dfa9
> +++ b/tests/ref/fate/dfa9
> @@ -1,4 +1,8 @@
>  #tb 0: 71/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 338x225
> +#sar 0: 0/1
>  0,          0,          0,        1,   228150, 0xde68df49
>  0,          1,          1,        1,   228150, 0x8e12bcaf
>  0,          2,          2,        1,   228150, 0x851b04f7
> diff --git a/tests/ref/fate/dirac b/tests/ref/fate/dirac
> index 7781b4e..f3f3daf 100644
> --- a/tests/ref/fate/dirac
> +++ b/tests/ref/fate/dirac
> @@ -1,3 +1,7 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        1,   115200, 0xf73819e8
>  0,          1,          1,        1,   115200, 0x082e3788
> diff --git a/tests/ref/fate/dnxhd-mbaff b/tests/ref/fate/dnxhd-mbaff
> index 171c244..d694cfe 100644
> --- a/tests/ref/fate/dnxhd-mbaff
> +++ b/tests/ref/fate/dnxhd-mbaff
> @@ -1,2 +1,6 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1440x1080
> +#sar 0: 4/3
>  0,          0,          0,        1,  6220800, 0xe78198c0
> diff --git a/tests/ref/fate/dnxhr-444 b/tests/ref/fate/dnxhr-444
> index f9e73c3..25f4219 100644
> --- a/tests/ref/fate/dnxhr-444
> +++ b/tests/ref/fate/dnxhr-444
> @@ -1,2 +1,6 @@
>  #tb 0: 1/24
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x839
> +#sar 0: 0/1
>  0,          0,          0,        1,  9665280, 0x19ef4057
> diff --git a/tests/ref/fate/dnxhr-parse b/tests/ref/fate/dnxhr-parse
> index ae1bd8a..2fc5a47 100644
> --- a/tests/ref/fate/dnxhr-parse
> +++ b/tests/ref/fate/dnxhr-parse
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 3840x2160
> +#sar 0: 0/1
>  0,          0,          0,        1, 16588800, 0x67ebfdb1
>  0,          1,          1,        1, 16588800, 0x7fa687e6
>  0,          2,          2,        1, 16588800, 0x4e13f5eb
> diff --git a/tests/ref/fate/dpcm-idroq b/tests/ref/fate/dpcm-idroq
> index 85e8efb..39f2c79 100644
> --- a/tests/ref/fate/dpcm-idroq
> +++ b/tests/ref/fate/dpcm-idroq
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 3
>  0,          0,          0,     7456,    29824, 0x77e265b7
>  0,       7456,       7456,      736,     2944, 0x8dcdf50b
>  0,       8192,       8192,      736,     2944, 0xb135cd2a
> diff --git a/tests/ref/fate/dpcm-interplay b/tests/ref/fate/dpcm-interplay
> index bda8a8f..87a2862 100644
> --- a/tests/ref/fate/dpcm-interplay
> +++ b/tests/ref/fate/dpcm-interplay
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 3
>  0,          0,          0,     1462,     5848, 0xea04292b
>  0,       1462,       1462,     1472,     5888, 0x0e59e942
>  0,       2934,       2934,     1472,     5888, 0x56d480f6
> diff --git a/tests/ref/fate/dpx b/tests/ref/fate/dpx
> index fdb85ca..d5f0ecb 100644
> --- a/tests/ref/fate/dpx
> +++ b/tests/ref/fate/dpx
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 768x512
> +#sar 0: 0/1
>  0,          0,          0,        1,  2359296, 0x30d4d24f
> diff --git a/tests/ref/fate/dpxparser b/tests/ref/fate/dpxparser
> index 0ecc36c..c21ad74 100644
> --- a/tests/ref/fate/dpxparser
> +++ b/tests/ref/fate/dpxparser
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 130x130
> +#sar 0: 0/1
>  0,          0,          0,        1,    50700, 0xe7153545
>  0,          1,          1,        1,    50700, 0x2bc92ece
>  0,          2,          2,        1,    50700, 0x83c731bb
> diff --git a/tests/ref/fate/dss-lp b/tests/ref/fate/dss-lp
> index b5bee18..6b5a7db 100644
> --- a/tests/ref/fate/dss-lp
> +++ b/tests/ref/fate/dss-lp
> @@ -1,4 +1,8 @@
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  0,          0,          0,      240,      480, 0xf1107658
>  0,        240,        240,      240,      480, 0x50dee179
>  0,        480,        480,      240,      480, 0x40090802
> diff --git a/tests/ref/fate/dss-sp b/tests/ref/fate/dss-sp
> index 111c621..5caa469 100644
> --- a/tests/ref/fate/dss-sp
> +++ b/tests/ref/fate/dss-sp
> @@ -1,4 +1,8 @@
>  #tb 0: 1/11025
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 11025
> +#channel_layout 0: 4
>  0,          0,          0,      264,      528, 0xa2579e96
>  0,        264,        264,      264,      528, 0xf9b23172
>  0,        528,        528,      264,      528, 0x5571a0fe
> diff --git a/tests/ref/fate/dxa-feeble b/tests/ref/fate/dxa-feeble
> index 74b43dc..5fa4175 100644
> --- a/tests/ref/fate/dxa-feeble
> +++ b/tests/ref/fate/dxa-feeble
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   921600, 0x0d03844f
>  0,          1,          1,        1,   921600, 0x0d03844f
>  0,          2,          2,        1,   921600, 0x649cdcea
> diff --git a/tests/ref/fate/dxa-scummvm b/tests/ref/fate/dxa-scummvm
> index 308a896..e8817cb 100644
> --- a/tests/ref/fate/dxa-scummvm
> +++ b/tests/ref/fate/dxa-scummvm
> @@ -1,4 +1,8 @@
>  #tb 0: 8333/100000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   384000, 0xef37f34b
>  0,          1,          1,        1,   384000, 0xef37f34b
>  0,          2,          2,        1,   384000, 0xfca3cd8b
> diff --git a/tests/ref/fate/dxtory b/tests/ref/fate/dxtory
> index 7d3ecbd..bda8872 100644
> --- a/tests/ref/fate/dxtory
> +++ b/tests/ref/fate/dxtory
> @@ -1,3 +1,11 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  #tb 1: 1/48000
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 48000
> +#channel_layout 1: 3
>  0,          0,          0,        1,  1382400, 0x44373645
> diff --git a/tests/ref/fate/dxv-dxt1 b/tests/ref/fate/dxv-dxt1
> index 128daba..d9f5ece 100644
> --- a/tests/ref/fate/dxv-dxt1
> +++ b/tests/ref/fate/dxv-dxt1
> @@ -1,2 +1,6 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  8294400, 0x0797cd53
> diff --git a/tests/ref/fate/dxv-dxt5 b/tests/ref/fate/dxv-dxt5
> index 128daba..d9f5ece 100644
> --- a/tests/ref/fate/dxv-dxt5
> +++ b/tests/ref/fate/dxv-dxt5
> @@ -1,2 +1,6 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  8294400, 0x0797cd53
> diff --git a/tests/ref/fate/dxv3-dxt1 b/tests/ref/fate/dxv3-dxt1
> index e0f1f94..96ce669 100644
> --- a/tests/ref/fate/dxv3-dxt1
> +++ b/tests/ref/fate/dxv3-dxt1
> @@ -1,2 +1,6 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  8294400, 0x98bbcc85
> diff --git a/tests/ref/fate/dxv3-dxt5 b/tests/ref/fate/dxv3-dxt5
> index 128daba..d9f5ece 100644
> --- a/tests/ref/fate/dxv3-dxt5
> +++ b/tests/ref/fate/dxv3-dxt5
> @@ -1,2 +1,6 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  8294400, 0x0797cd53
> diff --git a/tests/ref/fate/ea-cmv b/tests/ref/fate/ea-cmv
> index 8f9049e..793cb84 100644
> --- a/tests/ref/fate/ea-cmv
> +++ b/tests/ref/fate/ea-cmv
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 200x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   120000, 0x34ac91d2
>  0,          1,          1,        1,   120000, 0x17150729
>  0,          2,          2,        1,   120000, 0xc3f510bb
> diff --git a/tests/ref/fate/ea-mad b/tests/ref/fate/ea-mad
> index 1ea92fd..ea92fe1 100644
> --- a/tests/ref/fate/ea-mad
> +++ b/tests/ref/fate/ea-mad
> @@ -1,4 +1,8 @@
>  #tb 0: 33/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x496
> +#sar 0: 0/1
>  0,          0,          0,        1,   535680, 0x889c32cf
>  0,          1,          1,        1,   535680, 0x0b1ef044
>  0,          2,          2,        1,   535680, 0xa7d0818b
> diff --git a/tests/ref/fate/ea-tgq b/tests/ref/fate/ea-tgq
> index 5c0648d..2f38e71 100644
> --- a/tests/ref/fate/ea-tgq
> +++ b/tests/ref/fate/ea-tgq
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 208x112
> +#sar 0: 0/1
>  0,          0,          0,        1,    34944, 0xe33671a4
>  0,          1,          1,        1,    34944, 0xe33671a4
>  0,          2,          2,        1,    34944, 0xe33671a4
> diff --git a/tests/ref/fate/ea-tgv-1 b/tests/ref/fate/ea-tgv-1
> index fc92181..7533af0 100644
> --- a/tests/ref/fate/ea-tgv-1
> +++ b/tests/ref/fate/ea-tgv-1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   230400, 0xfbf2581e
>  0,          1,          1,        1,   230400, 0xfbf2581e
>  0,          2,          2,        1,   230400, 0xfbf2581e
> diff --git a/tests/ref/fate/ea-tgv-2 b/tests/ref/fate/ea-tgv-2
> index 5e9de02..cfa100f 100644
> --- a/tests/ref/fate/ea-tgv-2
> +++ b/tests/ref/fate/ea-tgv-2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0xdfc2f225
>  0,          1,          1,        1,   192000, 0x059b57bd
>  0,          2,          2,        1,   192000, 0x766cb086
> diff --git a/tests/ref/fate/ea-tqi b/tests/ref/fate/ea-tqi
> index 72afb81..926ab6d 100644
> --- a/tests/ref/fate/ea-tqi
> +++ b/tests/ref/fate/ea-tqi
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 400x192
> +#sar 0: 0/1
>  0,          0,          0,        1,   115200, 0x375ec573
>  0,          1,          1,        1,   115200, 0x375ec573
>  0,          2,          2,        1,   115200, 0x375ec573
> diff --git a/tests/ref/fate/exr-slice-pxr24 b/tests/ref/fate/exr-slice-pxr24
> index c46e897..99fbc05 100644
> --- a/tests/ref/fate/exr-slice-pxr24
> +++ b/tests/ref/fate/exr-slice-pxr24
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 800x800
> +#sar 0: 1/1
>  0,          0,          0,        1,  3840000, 0xdcfb341d
> diff --git a/tests/ref/fate/exr-slice-raw b/tests/ref/fate/exr-slice-raw
> index a8b4b27..cbe124b 100644
> --- a/tests/ref/fate/exr-slice-raw
> +++ b/tests/ref/fate/exr-slice-raw
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 587x675
> +#sar 0: 1/1
>  0,          0,          0,        1,  3169800, 0x6a356d0d
> diff --git a/tests/ref/fate/exr-slice-rle b/tests/ref/fate/exr-slice-rle
> index a8b4b27..cbe124b 100644
> --- a/tests/ref/fate/exr-slice-rle
> +++ b/tests/ref/fate/exr-slice-rle
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 587x675
> +#sar 0: 1/1
>  0,          0,          0,        1,  3169800, 0x6a356d0d
> diff --git a/tests/ref/fate/exr-slice-zip1 b/tests/ref/fate/exr-slice-zip1
> index a8b4b27..cbe124b 100644
> --- a/tests/ref/fate/exr-slice-zip1
> +++ b/tests/ref/fate/exr-slice-zip1
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 587x675
> +#sar 0: 1/1
>  0,          0,          0,        1,  3169800, 0x6a356d0d
> diff --git a/tests/ref/fate/exr-slice-zip16 b/tests/ref/fate/exr-slice-zip16
> index a8b4b27..cbe124b 100644
> --- a/tests/ref/fate/exr-slice-zip16
> +++ b/tests/ref/fate/exr-slice-zip16
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 587x675
> +#sar 0: 1/1
>  0,          0,          0,        1,  3169800, 0x6a356d0d
> diff --git a/tests/ref/fate/ffmpeg-filter_colorkey b/tests/ref/fate/ffmpeg-filter_colorkey
> index 0e4780b..9fbdfeb 100644
> --- a/tests/ref/fate/ffmpeg-filter_colorkey
> +++ b/tests/ref/fate/ffmpeg-filter_colorkey
> @@ -1,5 +1,13 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 0/1
>  #tb 1: 1/48000
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 48000
> +#channel_layout 1: 3
>  0,          0,          0,        1,   622080, 0x4e30accb
>  1,          0,          0,     1152,     4608, 0x00000000
>  1,       1152,       1152,     1152,     4608, 0xbca29063
> diff --git a/tests/ref/fate/ffmpeg-filter_complex b/tests/ref/fate/ffmpeg-filter_complex
> index 54d318d..d85a4aa 100644
> --- a/tests/ref/fate/ffmpeg-filter_complex
> +++ b/tests/ref/fate/ffmpeg-filter_complex
> @@ -1,4 +1,8 @@
>  #tb 0: 1/5
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        1,   115200, 0x375ec573
>  0,          1,          1,        1,   115200, 0x375ec573
>  0,          2,          2,        1,   115200, 0x375ec573
> diff --git a/tests/ref/fate/ffmpeg-lavfi b/tests/ref/fate/ffmpeg-lavfi
> index 54d318d..d85a4aa 100644
> --- a/tests/ref/fate/ffmpeg-lavfi
> +++ b/tests/ref/fate/ffmpeg-lavfi
> @@ -1,4 +1,8 @@
>  #tb 0: 1/5
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        1,   115200, 0x375ec573
>  0,          1,          1,        1,   115200, 0x375ec573
>  0,          2,          2,        1,   115200, 0x375ec573
> diff --git a/tests/ref/fate/fic-avi b/tests/ref/fate/fic-avi
> index cc4ea5d..df55789 100644
> --- a/tests/ref/fate/fic-avi
> +++ b/tests/ref/fate/fic-avi
> @@ -1,4 +1,8 @@
>  #tb 0: 1/60
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1360x768
> +#sar 0: 0/1
>  0,          0,          0,        1,  1566720, 0x7dae32e0
>  0,          1,          1,        1,  1566720, 0x7dae32e0
>  0,          2,          2,        1,  1566720, 0x6d1a9dc8
> diff --git a/tests/ref/fate/film-cvid b/tests/ref/fate/film-cvid
> index 3ca7b59..24540bf 100644
> --- a/tests/ref/fate/film-cvid
> +++ b/tests/ref/fate/film-cvid
> @@ -1,4 +1,8 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x224
> +#sar 0: 0/1
>  0,          0,          0,        1,   215040, 0x067c5362
>  0,          2,          2,        1,   215040, 0xd9eacb98
>  0,          4,          4,        1,   215040, 0x3c8a4cbd
> diff --git a/tests/ref/fate/filter-2xbr b/tests/ref/fate/filter-2xbr
> index 91e1d4c..1114c31 100644
> --- a/tests/ref/fate/filter-2xbr
> +++ b/tests/ref/fate/filter-2xbr
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 382x574
> +#sar 0: 1/1
>  0,          0,          0,        1,   877072, 0x5142c6cd
>  0,          1,          1,        1,   877072, 0xa01a3f47
> diff --git a/tests/ref/fate/filter-3xbr b/tests/ref/fate/filter-3xbr
> index 013f6a3..0ed0028 100644
> --- a/tests/ref/fate/filter-3xbr
> +++ b/tests/ref/fate/filter-3xbr
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 573x861
> +#sar 0: 1/1
>  0,          0,          0,        1,  1973412, 0xd4cf257b
>  0,          1,          1,        1,  1973412, 0x63fcd614
> diff --git a/tests/ref/fate/filter-4xbr b/tests/ref/fate/filter-4xbr
> index 92b70d9..a656737 100644
> --- a/tests/ref/fate/filter-4xbr
> +++ b/tests/ref/fate/filter-4xbr
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 764x1148
> +#sar 0: 1/1
>  0,          0,          0,        1,  3508288, 0xc7b1d170
>  0,          1,          1,        1,  3508288, 0x3fd0c3fb
> diff --git a/tests/ref/fate/filter-adelay b/tests/ref/fate/filter-adelay
> index ac1c584..a03f516 100644
> --- a/tests/ref/fate/filter-adelay
> +++ b/tests/ref/fate/filter-adelay
> @@ -1,4 +1,8 @@
>  #tb 0: 1/44100
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 44100
> +#channel_layout 0: 3
>  0,          0,          0,     1024,     4096, 0x9d7bf760
>  0,       1024,       1024,     1024,     4096, 0xdf42c46b
>  0,       2048,       2048,     1024,     4096, 0x2214fd20
> diff --git a/tests/ref/fate/filter-alphaextract_alphamerge_rgb b/tests/ref/fate/filter-alphaextract_alphamerge_rgb
> index 1b1a48d..eac9971 100644
> --- a/tests/ref/fate/filter-alphaextract_alphamerge_rgb
> +++ b/tests/ref/fate/filter-alphaextract_alphamerge_rgb
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   405504, 0x6d5666c8
>  0,          1,          1,        1,   405504, 0x4813ba17
>  0,          2,          2,        1,   405504, 0x23880ee1
> diff --git a/tests/ref/fate/filter-alphaextract_alphamerge_yuv b/tests/ref/fate/filter-alphaextract_alphamerge_yuv
> index 37c3486..2cae357 100644
> --- a/tests/ref/fate/filter-alphaextract_alphamerge_yuv
> +++ b/tests/ref/fate/filter-alphaextract_alphamerge_yuv
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   253440, 0x1ada7ac4
>  0,          1,          1,        1,   253440, 0x711c1599
>  0,          2,          2,        1,   253440, 0x533017ea
> diff --git a/tests/ref/fate/filter-atrim-duration b/tests/ref/fate/filter-atrim-duration
> index a51dff7..6f16c8f 100644
> --- a/tests/ref/fate/filter-atrim-duration
> +++ b/tests/ref/fate/filter-atrim-duration
> @@ -1,2 +1,6 @@
>  #tb 0: 1/44100
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 44100
> +#channel_layout 0: 3
>  0,       4410,       4410,      441,     1764, 0x61e374f7
> diff --git a/tests/ref/fate/filter-atrim-mixed b/tests/ref/fate/filter-atrim-mixed
> index ae3281a..8f8b4ed 100644
> --- a/tests/ref/fate/filter-atrim-mixed
> +++ b/tests/ref/fate/filter-atrim-mixed
> @@ -1,4 +1,8 @@
>  #tb 0: 1/44100
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 44100
> +#channel_layout 0: 3
>  0,       1025,       1025,     1023,     4092, 0x78560a4c
>  0,       2048,       2048,     1024,     4096, 0xc477fa99
>  0,       3072,       3072,     1024,     4096, 0x3bc0f14f
> diff --git a/tests/ref/fate/filter-atrim-samples b/tests/ref/fate/filter-atrim-samples
> index 3461666..4dcb333 100644
> --- a/tests/ref/fate/filter-atrim-samples
> +++ b/tests/ref/fate/filter-atrim-samples
> @@ -1,2 +1,6 @@
>  #tb 0: 1/44100
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 44100
> +#channel_layout 0: 3
>  0,         26,         26,       54,      216, 0x6b376c6c
> diff --git a/tests/ref/fate/filter-atrim-time b/tests/ref/fate/filter-atrim-time
> index a368210..4ca3d73 100644
> --- a/tests/ref/fate/filter-atrim-time
> +++ b/tests/ref/fate/filter-atrim-time
> @@ -1,4 +1,8 @@
>  #tb 0: 1/44100
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 44100
> +#channel_layout 0: 3
>  0,       4410,       4410,      710,     2840, 0x658982a3
>  0,       5120,       5120,     1024,     4096, 0xfd6a0070
>  0,       6144,       6144,     1024,     4096, 0x0b01f4cf
> diff --git a/tests/ref/fate/filter-boxblur b/tests/ref/fate/filter-boxblur
> index acb2beb..d332f3a 100644
> --- a/tests/ref/fate/filter-boxblur
> +++ b/tests/ref/fate/filter-boxblur
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x113489f8
>  0,          1,          1,        1,   152064, 0x650a64ca
>  0,          2,          2,        1,   152064, 0x29ecf6b1
> diff --git a/tests/ref/fate/filter-codecview-mvs b/tests/ref/fate/filter-codecview-mvs
> index 13286f0..4e1e53d 100644
> --- a/tests/ref/fate/filter-codecview-mvs
> +++ b/tests/ref/fate/filter-codecview-mvs
> @@ -1,4 +1,8 @@
>  #tb 0: 32768/785647
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 576x320
> +#sar 0: 0/1
>  0,          0,          0,        1,   276480, 0x5f7a0d4f
>  0,          1,          1,        1,   276480, 0x5f7a0d4f
>  0,          2,          2,        1,   276480, 0x5f7a0d4f
> diff --git a/tests/ref/fate/filter-colorchannelmixer b/tests/ref/fate/filter-colorchannelmixer
> index 4e9e9d3..93f9a39 100644
> --- a/tests/ref/fate/filter-colorchannelmixer
> +++ b/tests/ref/fate/filter-colorchannelmixer
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   304128, 0x42900c13
>  0,          1,          1,        1,   304128, 0xfb0439bc
>  0,          2,          2,        1,   304128, 0x967b9f0d
> diff --git a/tests/ref/fate/filter-concat b/tests/ref/fate/filter-concat
> index 73e4185..f8f7353 100644
> --- a/tests/ref/fate/filter-concat
> +++ b/tests/ref/fate/filter-concat
> @@ -1,5 +1,13 @@
>  #tb 0: 1/5
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  #tb 1: 1/44100
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 44100
> +#channel_layout 1: 4
>  0,          0,          0,        1,   230400, 0x88c4d19a
>  1,          0,          0,     1024,     2048, 0xb3f10192
>  1,       1024,       1024,     1024,     2048, 0xb340fe4e
> diff --git a/tests/ref/fate/filter-curves b/tests/ref/fate/filter-curves
> index a96f0ee..401bd2e 100644
> --- a/tests/ref/fate/filter-curves
> +++ b/tests/ref/fate/filter-curves
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   921600, 0xcf426780
>  0,          1,          1,        1,   921600, 0x7642892d
>  0,          2,          2,        1,   921600, 0x13c1ab7e
> diff --git a/tests/ref/fate/filter-delogo b/tests/ref/fate/filter-delogo
> index bf2b751..0e59f82 100644
> --- a/tests/ref/fate/filter-delogo
> +++ b/tests/ref/fate/filter-delogo
> @@ -1,4 +1,8 @@
>  #tb 0: 32768/982057
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   126720, 0xcefaec47
>  0,          1,          1,        1,   126720, 0xa416ece5
>  0,          2,          2,        1,   126720, 0xa416ece5
> diff --git a/tests/ref/fate/filter-drawbox b/tests/ref/fate/filter-drawbox
> index c63d2fc..8ffd381 100644
> --- a/tests/ref/fate/filter-drawbox
> +++ b/tests/ref/fate/filter-drawbox
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x9ada9be9
>  0,          1,          1,        1,   152064, 0xb0ec7d59
>  0,          2,          2,        1,   152064, 0x938816b8
> diff --git a/tests/ref/fate/filter-fade b/tests/ref/fate/filter-fade
> index 9d691ce..2ba7671 100644
> --- a/tests/ref/fate/filter-fade
> +++ b/tests/ref/fate/filter-fade
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xb4e6c735
>  0,          1,          1,        1,   152064, 0xb4e6c735
>  0,          2,          2,        1,   152064, 0xb4e6c735
> diff --git a/tests/ref/fate/filter-fieldorder b/tests/ref/fate/filter-fieldorder
> index 6bb647a..9a73e6e 100644
> --- a/tests/ref/fate/filter-fieldorder
> +++ b/tests/ref/fate/filter-fieldorder
> @@ -1,4 +1,8 @@
>  #tb 0: 2/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   202752, 0x789424b6
>  0,          1,          1,        1,   202752, 0x7a1f47a9
>  0,          2,          2,        1,   202752, 0xa55a9aba
> diff --git a/tests/ref/fate/filter-fps b/tests/ref/fate/filter-fps
> index eb21de2..55712cf 100644
> --- a/tests/ref/fate/filter-fps
> +++ b/tests/ref/fate/filter-fps
> @@ -1,4 +1,8 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 112x182
> +#sar 0: 0/1
>  0,          0,          0,        1,    30576, 0xcdc29b3d
>  0,          1,          1,        1,    30576, 0xcdc29b3d
>  0,          2,          2,        1,    30576, 0xcdc29b3d
> diff --git a/tests/ref/fate/filter-fps-cfr b/tests/ref/fate/filter-fps-cfr
> index 928c11e..fa71b59 100644
> --- a/tests/ref/fate/filter-fps-cfr
> +++ b/tests/ref/fate/filter-fps-cfr
> @@ -1,4 +1,8 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 112x182
> +#sar 0: 0/1
>  0,          0,          0,        1,    30576, 0xcdc29b3d
>  0,          1,          1,        1,    30576, 0xcdc29b3d
>  0,          2,          2,        1,    30576, 0xcdc29b3d
> diff --git a/tests/ref/fate/filter-fps-r b/tests/ref/fate/filter-fps-r
> index d91e487..826b1ed 100644
> --- a/tests/ref/fate/filter-fps-r
> +++ b/tests/ref/fate/filter-fps-r
> @@ -1,4 +1,8 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 112x182
> +#sar 0: 0/1
>  0,          0,          0,        1,    30576, 0xcdc29b3d
>  0,          1,          1,        1,    30576, 0xcdc29b3d
>  0,          2,          2,        1,    30576, 0xcdc29b3d
> diff --git a/tests/ref/fate/filter-framepack-columns b/tests/ref/fate/filter-framepack-columns
> index f387632..ac688c9 100644
> --- a/tests/ref/fate/filter-framepack-columns
> +++ b/tests/ref/fate/filter-framepack-columns
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 704x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   304128, 0x8cde13ed
>  0,          1,          1,        1,   304128, 0xc97fcaa2
>  0,          2,          2,        1,   304128, 0x8139eca3
> diff --git a/tests/ref/fate/filter-framepack-frameseq b/tests/ref/fate/filter-framepack-frameseq
> index 83c08a0..7174fe4 100644
> --- a/tests/ref/fate/filter-framepack-frameseq
> +++ b/tests/ref/fate/filter-framepack-frameseq
> @@ -1,4 +1,8 @@
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x05b789ef
>  0,          1,          1,        1,   152064, 0x05b789ef
>  0,          2,          2,        1,   152064, 0x4bb46551
> diff --git a/tests/ref/fate/filter-framepack-lines b/tests/ref/fate/filter-framepack-lines
> index d714462..d8cc289 100644
> --- a/tests/ref/fate/filter-framepack-lines
> +++ b/tests/ref/fate/filter-framepack-lines
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x576
> +#sar 0: 0/1
>  0,          0,          0,        1,   304128, 0x901a13ed
>  0,          1,          1,        1,   304128, 0x793ccaa2
>  0,          2,          2,        1,   304128, 0x9eafeca3
> diff --git a/tests/ref/fate/filter-framepack-sbs b/tests/ref/fate/filter-framepack-sbs
> index d714462..d4b47f0 100644
> --- a/tests/ref/fate/filter-framepack-sbs
> +++ b/tests/ref/fate/filter-framepack-sbs
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 704x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   304128, 0x901a13ed
>  0,          1,          1,        1,   304128, 0x793ccaa2
>  0,          2,          2,        1,   304128, 0x9eafeca3
> diff --git a/tests/ref/fate/filter-framepack-tab b/tests/ref/fate/filter-framepack-tab
> index 0346f06..500cfb7 100644
> --- a/tests/ref/fate/filter-framepack-tab
> +++ b/tests/ref/fate/filter-framepack-tab
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x576
> +#sar 0: 0/1
>  0,          0,          0,        1,   304128, 0x0b6b13ed
>  0,          1,          1,        1,   304128, 0x406bcaa2
>  0,          2,          2,        1,   304128, 0xb0deeca3
> diff --git a/tests/ref/fate/filter-gradfun b/tests/ref/fate/filter-gradfun
> index 794fae9..cadb9cb 100644
> --- a/tests/ref/fate/filter-gradfun
> +++ b/tests/ref/fate/filter-gradfun
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xaebf898f
>  0,          1,          1,        1,   152064, 0x217b6560
>  0,          2,          2,        1,   152064, 0x0269f62d
> diff --git a/tests/ref/fate/filter-gradfun-sample b/tests/ref/fate/filter-gradfun-sample
> index 595f82a..e6e2dc8 100644
> --- a/tests/ref/fate/filter-gradfun-sample
> +++ b/tests/ref/fate/filter-gradfun-sample
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,    76800, 0xea62ab65
>  0,          1,          1,        1,    76800, 0xbc0d8b58
>  0,          2,          2,        1,    76800, 0x682967d0
> diff --git a/tests/ref/fate/filter-histogram-levels b/tests/ref/fate/filter-histogram-levels
> index bd268ca..697d7d1 100644
> --- a/tests/ref/fate/filter-histogram-levels
> +++ b/tests/ref/fate/filter-histogram-levels
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x636
> +#sar 0: 1/1
>  0,          0,          0,        1,   488448, 0xc27a6cac
>  0,          1,          1,        1,   488448, 0xf00a152e
>  0,          2,          2,        1,   488448, 0x060b8c70
> diff --git a/tests/ref/fate/filter-hls b/tests/ref/fate/filter-hls
> index 30bd96fb..47bc514 100644
> --- a/tests/ref/fate/filter-hls
> +++ b/tests/ref/fate/filter-hls
> @@ -1,4 +1,8 @@
>  #tb 0: 1/44100
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 44100
> +#channel_layout 0: 4
>  0,          0,          0,     1152,     2304, 0x907cb7fa
>  0,       1152,       1152,     1152,     2304, 0xb8dc7525
>  0,       2304,       2304,     1152,     2304, 0x3e7d6905
> diff --git a/tests/ref/fate/filter-hq2x b/tests/ref/fate/filter-hq2x
> index dcf2a29..2c1d8b7 100644
> --- a/tests/ref/fate/filter-hq2x
> +++ b/tests/ref/fate/filter-hq2x
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 382x574
> +#sar 0: 1/1
>  0,          0,          0,        1,   877072, 0x9369339e
>  0,          1,          1,        1,   877072, 0x32d119a1
> diff --git a/tests/ref/fate/filter-hq3x b/tests/ref/fate/filter-hq3x
> index 8215388..a7db99e 100644
> --- a/tests/ref/fate/filter-hq3x
> +++ b/tests/ref/fate/filter-hq3x
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 573x861
> +#sar 0: 1/1
>  0,          0,          0,        1,  1973412, 0xafc227fa
>  0,          1,          1,        1,  1973412, 0x93aebf19
> diff --git a/tests/ref/fate/filter-hq4x b/tests/ref/fate/filter-hq4x
> index c1d6fd8..6702fe4 100644
> --- a/tests/ref/fate/filter-hq4x
> +++ b/tests/ref/fate/filter-hq4x
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 764x1148
> +#sar 0: 1/1
>  0,          0,          0,        1,  3508288, 0x034ef75e
>  0,          1,          1,        1,  3508288, 0x738e9bbb
> diff --git a/tests/ref/fate/filter-hqdn3d b/tests/ref/fate/filter-hqdn3d
> index 6f121c3..d649629 100644
> --- a/tests/ref/fate/filter-hqdn3d
> +++ b/tests/ref/fate/filter-hqdn3d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x0c09883a
>  0,          1,          1,        1,   152064, 0xfc2748a0
>  0,          2,          2,        1,   152064, 0xb746eea8
> diff --git a/tests/ref/fate/filter-hqdn3d-sample b/tests/ref/fate/filter-hqdn3d-sample
> index 97718f9..24d25a6 100644
> --- a/tests/ref/fate/filter-hqdn3d-sample
> +++ b/tests/ref/fate/filter-hqdn3d-sample
> @@ -1,4 +1,8 @@
>  #tb 0: 1/9
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        1,   115200, 0x2c810465
>  0,          1,          1,        1,   115200, 0x957c0563
>  0,          2,          2,        1,   115200, 0x786c6d5b
> diff --git a/tests/ref/fate/filter-idet b/tests/ref/fate/filter-idet
> index 6283039..a0f579d 100644
> --- a/tests/ref/fate/filter-idet
> +++ b/tests/ref/fate/filter-idet
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x432
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x6e4f89ef
>  0,          1,          1,        1,   152064, 0x7f5f6551
>  0,          2,          2,        1,   152064, 0xc566f64a
> diff --git a/tests/ref/fate/filter-interlace b/tests/ref/fate/filter-interlace
> index 4659942..24423cc 100644
> --- a/tests/ref/fate/filter-interlace
> +++ b/tests/ref/fate/filter-interlace
> @@ -1,4 +1,8 @@
>  #tb 0: 2/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x6077db38
>  0,          1,          1,        1,   152064, 0x3d4f1b15
>  0,          2,          2,        1,   152064, 0x447594f6
> diff --git a/tests/ref/fate/filter-lavd-life b/tests/ref/fate/filter-lavd-life
> index 565f88a..48546ab 100644
> --- a/tests/ref/fate/filter-lavd-life
> +++ b/tests/ref/fate/filter-lavd-life
> @@ -1,4 +1,8 @@
>  #tb 0: 1/5
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 40x40
> +#sar 0: 1/1
>  0,          0,          0,        1,     4800, 0xf2a15b15
>  0,          1,          1,        1,     4800, 0x78c29dcf
>  0,          2,          2,        1,     4800, 0x28509d6e
> diff --git a/tests/ref/fate/filter-lavd-scalenorm b/tests/ref/fate/filter-lavd-scalenorm
> index c946b5c..7b9a60a 100644
> --- a/tests/ref/fate/filter-lavd-scalenorm
> +++ b/tests/ref/fate/filter-lavd-scalenorm
> @@ -1,4 +1,8 @@
>  #tb 0: 1/5
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x96
> +#sar 0: 1/1
>  0,          0,          0,        1,    18432, 0xac484db5
>  0,          1,          1,        1,    18432, 0x94734db6
>  0,          2,          2,        1,    18432, 0x3fac4db3
> diff --git a/tests/ref/fate/filter-lavd-testsrc b/tests/ref/fate/filter-lavd-testsrc
> index 0ea5a49..a421cc4 100644
> --- a/tests/ref/fate/filter-lavd-testsrc
> +++ b/tests/ref/fate/filter-lavd-testsrc
> @@ -1,4 +1,8 @@
>  #tb 0: 1/7
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        1,   230400, 0x88c4d19a
>  0,          1,          1,        1,   230400, 0xcc930a2e
>  0,          2,          2,        1,   230400, 0x8e1b0e23
> diff --git a/tests/ref/fate/filter-mcdeint-fast b/tests/ref/fate/filter-mcdeint-fast
> index 000d43b..228be5e 100644
> --- a/tests/ref/fate/filter-mcdeint-fast
> +++ b/tests/ref/fate/filter-mcdeint-fast
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 16/15
>  0,          9,          9,        1,   622080, 0xb3b66c5c
>  0,         10,         10,        1,   622080, 0xc6568bd7
>  0,         11,         11,        1,   622080, 0xa5b543c3
> diff --git a/tests/ref/fate/filter-mcdeint-medium b/tests/ref/fate/filter-mcdeint-medium
> index cfd504f..05d1d72 100644
> --- a/tests/ref/fate/filter-mcdeint-medium
> +++ b/tests/ref/fate/filter-mcdeint-medium
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 16/15
>  0,          9,          9,        1,   622080, 0xb3b66c5c
>  0,         10,         10,        1,   622080, 0x26a29152
>  0,         11,         11,        1,   622080, 0x787adddc
> diff --git a/tests/ref/fate/filter-mergeplanes b/tests/ref/fate/filter-mergeplanes
> index 841d14f..e136703 100644
> --- a/tests/ref/fate/filter-mergeplanes
> +++ b/tests/ref/fate/filter-mergeplanes
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   304128, 0x90660272
>  0,          1,          1,        1,   304128, 0x6b09c8a6
>  0,          2,          2,        1,   304128, 0x343858f3
> diff --git a/tests/ref/fate/filter-mpdecimate b/tests/ref/fate/filter-mpdecimate
> index 1e9652e..d438dac 100644
> --- a/tests/ref/fate/filter-mpdecimate
> +++ b/tests/ref/fate/filter-mpdecimate
> @@ -1,4 +1,8 @@
>  #tb 0: 1/3
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        1,   115200, 0x3744b3ed
>  0,          2,          2,        1,   115200, 0x6e318ba0
>  0,          3,          3,        1,   115200, 0x48d65876
> diff --git a/tests/ref/fate/filter-negate b/tests/ref/fate/filter-negate
> index 1d2ea73..88d0471 100644
> --- a/tests/ref/fate/filter-negate
> +++ b/tests/ref/fate/filter-negate
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xef20e1ec
>  0,          1,          1,        1,   152064, 0x899606ec
>  0,          2,          2,        1,   152064, 0xaea175d2
> diff --git a/tests/ref/fate/filter-overlay b/tests/ref/fate/filter-overlay
> index f0f03d6..bcbde54 100644
> --- a/tests/ref/fate/filter-overlay
> +++ b/tests/ref/fate/filter-overlay
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x2b1a7a92
>  0,          1,          1,        1,   152064, 0x6f28685a
>  0,          2,          2,        1,   152064, 0xeac9f99c
> diff --git a/tests/ref/fate/filter-overlay_rgb b/tests/ref/fate/filter-overlay_rgb
> index cb94aa5..89a0177 100644
> --- a/tests/ref/fate/filter-overlay_rgb
> +++ b/tests/ref/fate/filter-overlay_rgb
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   304128, 0x027e34c6
>  0,          1,          1,        1,   304128, 0xc436b3d2
>  0,          2,          2,        1,   304128, 0x86b77f58
> diff --git a/tests/ref/fate/filter-overlay_yuv420 b/tests/ref/fate/filter-overlay_yuv420
> index a1f6787..7cd0708 100644
> --- a/tests/ref/fate/filter-overlay_yuv420
> +++ b/tests/ref/fate/filter-overlay_yuv420
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xfbd72a27
>  0,          1,          1,        1,   152064, 0x06d10a14
>  0,          2,          2,        1,   152064, 0x629e9a71
> diff --git a/tests/ref/fate/filter-overlay_yuv422 b/tests/ref/fate/filter-overlay_yuv422
> index 982386b..99ce8c5 100644
> --- a/tests/ref/fate/filter-overlay_yuv422
> +++ b/tests/ref/fate/filter-overlay_yuv422
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   304128, 0x9b9e09b2
>  0,          1,          1,        1,   304128, 0x33addb48
>  0,          2,          2,        1,   304128, 0xd5b973e9
> diff --git a/tests/ref/fate/filter-overlay_yuv444 b/tests/ref/fate/filter-overlay_yuv444
> index 0b2d9f7..3b6e53a 100644
> --- a/tests/ref/fate/filter-overlay_yuv444
> +++ b/tests/ref/fate/filter-overlay_yuv444
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   405504, 0xaa82add0
>  0,          1,          1,        1,   405504, 0x0e9d65d0
>  0,          2,          2,        1,   405504, 0xd8470d82
> diff --git a/tests/ref/fate/filter-palettegen-1 b/tests/ref/fate/filter-palettegen-1
> index 98b7159..bebfd24 100644
> --- a/tests/ref/fate/filter-palettegen-1
> +++ b/tests/ref/fate/filter-palettegen-1
> @@ -1,2 +1,6 @@
>  #tb 0: 1001/24000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 16x16
> +#sar 0: 1/1
>  0,          0,          0,        1,     1024, 0x3395ef5a
> diff --git a/tests/ref/fate/filter-palettegen-2 b/tests/ref/fate/filter-palettegen-2
> index 2f58b64..aa07b6c 100644
> --- a/tests/ref/fate/filter-palettegen-2
> +++ b/tests/ref/fate/filter-palettegen-2
> @@ -1,2 +1,6 @@
>  #tb 0: 1001/24000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 16x16
> +#sar 0: 1/1
>  0,          0,          0,        1,     1024, 0x906ff5aa
> diff --git a/tests/ref/fate/filter-paletteuse-bayer b/tests/ref/fate/filter-paletteuse-bayer
> index 4b44939..5ca0115 100644
> --- a/tests/ref/fate/filter-paletteuse-bayer
> +++ b/tests/ref/fate/filter-paletteuse-bayer
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/24000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x180
> +#sar 0: 1/1
>  0,          0,          0,        1,   230400, 0x7b259d08
>  0,          1,          1,        1,   230400, 0xf04095e0
>  0,          2,          2,        1,   230400, 0x84d49cd5
> diff --git a/tests/ref/fate/filter-paletteuse-nodither b/tests/ref/fate/filter-paletteuse-nodither
> index 8171ffa..a2e61c3 100644
> --- a/tests/ref/fate/filter-paletteuse-nodither
> +++ b/tests/ref/fate/filter-paletteuse-nodither
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/24000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x180
> +#sar 0: 1/1
>  0,          0,          0,        1,   230400, 0x690560cb
>  0,          1,          1,        1,   230400, 0x197a5a54
>  0,          2,          2,        1,   230400, 0x665961db
> diff --git a/tests/ref/fate/filter-paletteuse-sierra2_4a b/tests/ref/fate/filter-paletteuse-sierra2_4a
> index 95d7636..d257820 100644
> --- a/tests/ref/fate/filter-paletteuse-sierra2_4a
> +++ b/tests/ref/fate/filter-paletteuse-sierra2_4a
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/24000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x180
> +#sar 0: 1/1
>  0,          0,          0,        1,   230400, 0xa4f85758
>  0,          1,          1,        1,   230400, 0xbe83505c
>  0,          2,          2,        1,   230400, 0x0a09584e
> diff --git a/tests/ref/fate/filter-phase b/tests/ref/fate/filter-phase
> index e0ec8d6..b0f8a25 100644
> --- a/tests/ref/fate/filter-phase
> +++ b/tests/ref/fate/filter-phase
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x05b789ef
>  0,          1,          1,        1,   152064, 0x4bb46551
>  0,          2,          2,        1,   152064, 0x9dddf64a
> diff --git a/tests/ref/fate/filter-pp b/tests/ref/fate/filter-pp
> index c1311be..5c0e299 100644
> --- a/tests/ref/fate/filter-pp
> +++ b/tests/ref/fate/filter-pp
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  0,          1,          1,        1,   152064, 0x0af8a873
>  0,          2,          2,        1,   152064, 0xaeb99897
>  0,          3,          3,        1,   152064, 0x8f3712c8
> diff --git a/tests/ref/fate/filter-removegrain-mode-00 b/tests/ref/fate/filter-removegrain-mode-00
> index 115bc45..b38d3f4 100644
> --- a/tests/ref/fate/filter-removegrain-mode-00
> +++ b/tests/ref/fate/filter-removegrain-mode-00
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x05b789ef
> diff --git a/tests/ref/fate/filter-removegrain-mode-01 b/tests/ref/fate/filter-removegrain-mode-01
> index 0e74927..8108ab6 100644
> --- a/tests/ref/fate/filter-removegrain-mode-01
> +++ b/tests/ref/fate/filter-removegrain-mode-01
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x4f234e65
> diff --git a/tests/ref/fate/filter-removegrain-mode-02 b/tests/ref/fate/filter-removegrain-mode-02
> index be7a419..5e12fdf 100644
> --- a/tests/ref/fate/filter-removegrain-mode-02
> +++ b/tests/ref/fate/filter-removegrain-mode-02
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xc2dd0535
> diff --git a/tests/ref/fate/filter-removegrain-mode-03 b/tests/ref/fate/filter-removegrain-mode-03
> index 7f98bec..61b64f6 100644
> --- a/tests/ref/fate/filter-removegrain-mode-03
> +++ b/tests/ref/fate/filter-removegrain-mode-03
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x09dbc38a
> diff --git a/tests/ref/fate/filter-removegrain-mode-04 b/tests/ref/fate/filter-removegrain-mode-04
> index 510371d..d029896 100644
> --- a/tests/ref/fate/filter-removegrain-mode-04
> +++ b/tests/ref/fate/filter-removegrain-mode-04
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x32c6a66e
> diff --git a/tests/ref/fate/filter-removegrain-mode-05 b/tests/ref/fate/filter-removegrain-mode-05
> index 11ddc89..8fc5e25 100644
> --- a/tests/ref/fate/filter-removegrain-mode-05
> +++ b/tests/ref/fate/filter-removegrain-mode-05
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xc3c64ec6
> diff --git a/tests/ref/fate/filter-removegrain-mode-06 b/tests/ref/fate/filter-removegrain-mode-06
> index 8d3d318..c000f01 100644
> --- a/tests/ref/fate/filter-removegrain-mode-06
> +++ b/tests/ref/fate/filter-removegrain-mode-06
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x38e84065
> diff --git a/tests/ref/fate/filter-removegrain-mode-07 b/tests/ref/fate/filter-removegrain-mode-07
> index 9ce7217..c1a9836 100644
> --- a/tests/ref/fate/filter-removegrain-mode-07
> +++ b/tests/ref/fate/filter-removegrain-mode-07
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xfbdeec94
> diff --git a/tests/ref/fate/filter-removegrain-mode-08 b/tests/ref/fate/filter-removegrain-mode-08
> index 3a05d10..f382c11 100644
> --- a/tests/ref/fate/filter-removegrain-mode-08
> +++ b/tests/ref/fate/filter-removegrain-mode-08
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x8f7c85a2
> diff --git a/tests/ref/fate/filter-removegrain-mode-09 b/tests/ref/fate/filter-removegrain-mode-09
> index 4787c22..3bb63fc 100644
> --- a/tests/ref/fate/filter-removegrain-mode-09
> +++ b/tests/ref/fate/filter-removegrain-mode-09
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x9609a659
> diff --git a/tests/ref/fate/filter-removegrain-mode-10 b/tests/ref/fate/filter-removegrain-mode-10
> index 7f76854..cf72639 100644
> --- a/tests/ref/fate/filter-removegrain-mode-10
> +++ b/tests/ref/fate/filter-removegrain-mode-10
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x4adb45d6
> diff --git a/tests/ref/fate/filter-removegrain-mode-11 b/tests/ref/fate/filter-removegrain-mode-11
> index f2c3be0..aa8793d 100644
> --- a/tests/ref/fate/filter-removegrain-mode-11
> +++ b/tests/ref/fate/filter-removegrain-mode-11
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xd0d891ff
> diff --git a/tests/ref/fate/filter-removegrain-mode-12 b/tests/ref/fate/filter-removegrain-mode-12
> index f2c3be0..aa8793d 100644
> --- a/tests/ref/fate/filter-removegrain-mode-12
> +++ b/tests/ref/fate/filter-removegrain-mode-12
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xd0d891ff
> diff --git a/tests/ref/fate/filter-removegrain-mode-13 b/tests/ref/fate/filter-removegrain-mode-13
> index b481928..b70b9a1 100644
> --- a/tests/ref/fate/filter-removegrain-mode-13
> +++ b/tests/ref/fate/filter-removegrain-mode-13
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x09d4da80
> diff --git a/tests/ref/fate/filter-removegrain-mode-14 b/tests/ref/fate/filter-removegrain-mode-14
> index 7355a61..2211372 100644
> --- a/tests/ref/fate/filter-removegrain-mode-14
> +++ b/tests/ref/fate/filter-removegrain-mode-14
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x145f34c8
> diff --git a/tests/ref/fate/filter-removegrain-mode-15 b/tests/ref/fate/filter-removegrain-mode-15
> index 4c11088..fa9b94c 100644
> --- a/tests/ref/fate/filter-removegrain-mode-15
> +++ b/tests/ref/fate/filter-removegrain-mode-15
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x11eea9b4
> diff --git a/tests/ref/fate/filter-removegrain-mode-16 b/tests/ref/fate/filter-removegrain-mode-16
> index 9b1ab23..9d81e15 100644
> --- a/tests/ref/fate/filter-removegrain-mode-16
> +++ b/tests/ref/fate/filter-removegrain-mode-16
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x8bc800ee
> diff --git a/tests/ref/fate/filter-removegrain-mode-17 b/tests/ref/fate/filter-removegrain-mode-17
> index 29b383e..4f4b758 100644
> --- a/tests/ref/fate/filter-removegrain-mode-17
> +++ b/tests/ref/fate/filter-removegrain-mode-17
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x7195b9a7
> diff --git a/tests/ref/fate/filter-removegrain-mode-18 b/tests/ref/fate/filter-removegrain-mode-18
> index 84aa1ec..a4422a7 100644
> --- a/tests/ref/fate/filter-removegrain-mode-18
> +++ b/tests/ref/fate/filter-removegrain-mode-18
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xb47a081c
> diff --git a/tests/ref/fate/filter-removegrain-mode-19 b/tests/ref/fate/filter-removegrain-mode-19
> index 86887a6..9ff3613 100644
> --- a/tests/ref/fate/filter-removegrain-mode-19
> +++ b/tests/ref/fate/filter-removegrain-mode-19
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x948dc65d
> diff --git a/tests/ref/fate/filter-removegrain-mode-20 b/tests/ref/fate/filter-removegrain-mode-20
> index def86fe..449ced8 100644
> --- a/tests/ref/fate/filter-removegrain-mode-20
> +++ b/tests/ref/fate/filter-removegrain-mode-20
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x64a388ea
> diff --git a/tests/ref/fate/filter-removegrain-mode-21 b/tests/ref/fate/filter-removegrain-mode-21
> index 832c1b1..473b4fc 100644
> --- a/tests/ref/fate/filter-removegrain-mode-21
> +++ b/tests/ref/fate/filter-removegrain-mode-21
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xb7ae17f5
> diff --git a/tests/ref/fate/filter-removegrain-mode-22 b/tests/ref/fate/filter-removegrain-mode-22
> index f689e3f..8185750 100644
> --- a/tests/ref/fate/filter-removegrain-mode-22
> +++ b/tests/ref/fate/filter-removegrain-mode-22
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xe5736698
> diff --git a/tests/ref/fate/filter-removegrain-mode-23 b/tests/ref/fate/filter-removegrain-mode-23
> index b0a588b..1e8109d 100644
> --- a/tests/ref/fate/filter-removegrain-mode-23
> +++ b/tests/ref/fate/filter-removegrain-mode-23
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x8d15a472
> diff --git a/tests/ref/fate/filter-removegrain-mode-24 b/tests/ref/fate/filter-removegrain-mode-24
> index 286ce22..b246312 100644
> --- a/tests/ref/fate/filter-removegrain-mode-24
> +++ b/tests/ref/fate/filter-removegrain-mode-24
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x77f6d439
> diff --git a/tests/ref/fate/filter-scalechroma b/tests/ref/fate/filter-scalechroma
> index 930ffef..842769c 100644
> --- a/tests/ref/fate/filter-scalechroma
> +++ b/tests/ref/fate/filter-scalechroma
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xdcab783a
>  0,          1,          1,        1,   152064, 0x79c7f1f6
>  0,          2,          2,        1,   152064, 0x3b810afb
> diff --git a/tests/ref/fate/filter-select b/tests/ref/fate/filter-select
> index 7c30292..e0584e9 100644
> --- a/tests/ref/fate/filter-select
> +++ b/tests/ref/fate/filter-select
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x432
> +#sar 0: 0/1
>  0,          1,          1,        1,   152064, 0x7f5f6551
>  0,          5,          5,        1,   152064, 0x287da8e6
>  0,          7,          7,        1,   152064, 0xe9028bac
> diff --git a/tests/ref/fate/filter-select-alternate b/tests/ref/fate/filter-select-alternate
> index 0776694..044189d 100644
> --- a/tests/ref/fate/filter-select-alternate
> +++ b/tests/ref/fate/filter-select-alternate
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x05b789ef
>  0,          2,          2,        1,   152064, 0x9dddf64a
>  0,          4,          4,        1,   152064, 0x4de3b652
> diff --git a/tests/ref/fate/filter-separatefields b/tests/ref/fate/filter-separatefields
> index 46cb470..fb757cc 100644
> --- a/tests/ref/fate/filter-separatefields
> +++ b/tests/ref/fate/filter-separatefields
> @@ -1,4 +1,8 @@
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    76032, 0x99276ab9
>  0,          1,          1,        1,    76032, 0x0b071f36
>  0,          2,          2,        1,    76032, 0x8b03b0e8
> diff --git a/tests/ref/fate/filter-setpts b/tests/ref/fate/filter-setpts
> index 5b1d734..efdcf6a 100644
> --- a/tests/ref/fate/filter-setpts
> +++ b/tests/ref/fate/filter-setpts
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x05b789ef
>  0,          1,          1,        1,   152064, 0x4bb46551
>  0,          2,          2,        1,   152064, 0x9dddf64a
> diff --git a/tests/ref/fate/filter-showpalette b/tests/ref/fate/filter-showpalette
> index 1a13c23..c5e699a 100644
> --- a/tests/ref/fate/filter-showpalette
> +++ b/tests/ref/fate/filter-showpalette
> @@ -1,4 +1,8 @@
>  #tb 0: 1/35
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 48x48
> +#sar 0: 0/1
>  0,          0,          0,        1,     9216, 0xc72e034e
>  0,          1,          1,        1,     9216, 0xc72e034e
>  0,          2,          2,        1,     9216, 0xc72e034e
> diff --git a/tests/ref/fate/filter-shuffleplanes-dup-luma b/tests/ref/fate/filter-shuffleplanes-dup-luma
> index 52041fa..da111c2 100644
> --- a/tests/ref/fate/filter-shuffleplanes-dup-luma
> +++ b/tests/ref/fate/filter-shuffleplanes-dup-luma
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   405504, 0x76625893
>  0,          1,          1,        1,   405504, 0x348f0b97
>  0,          2,          2,        1,   405504, 0x3de02149
> diff --git a/tests/ref/fate/filter-shuffleplanes-swapuv b/tests/ref/fate/filter-shuffleplanes-swapuv
> index 95da149..9ff175b 100644
> --- a/tests/ref/fate/filter-shuffleplanes-swapuv
> +++ b/tests/ref/fate/filter-shuffleplanes-swapuv
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x68b189ef
>  0,          1,          1,        1,   152064, 0x5cc66551
>  0,          2,          2,        1,   152064, 0x88f0f64a
> diff --git a/tests/ref/fate/filter-stereo3d-abr-ml b/tests/ref/fate/filter-stereo3d-abr-ml
> index d0597a7..07c4cb7 100644
> --- a/tests/ref/fate/filter-stereo3d-abr-ml
> +++ b/tests/ref/fate/filter-stereo3d-abr-ml
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    76032, 0xad4c8a22
>  0,          1,          1,        1,    76032, 0x0dfdc6ad
>  0,          2,          2,        1,    76032, 0x6341da83
> diff --git a/tests/ref/fate/filter-stereo3d-abr-mr b/tests/ref/fate/filter-stereo3d-abr-mr
> index 44a8091..4e9edea 100644
> --- a/tests/ref/fate/filter-stereo3d-abr-mr
> +++ b/tests/ref/fate/filter-stereo3d-abr-mr
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    76032, 0x5d0effbe
>  0,          1,          1,        1,    76032, 0x5bb49e95
>  0,          2,          2,        1,    76032, 0xb6301bc7
> diff --git a/tests/ref/fate/filter-stereo3d-al-sbsl b/tests/ref/fate/filter-stereo3d-al-sbsl
> index b19cbb8..6f42820 100644
> --- a/tests/ref/fate/filter-stereo3d-al-sbsl
> +++ b/tests/ref/fate/filter-stereo3d-al-sbsl
> @@ -1,4 +1,8 @@
>  #tb 0: 2/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 704x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   304128, 0xb9c0ef40
>  0,          1,          1,        1,   304128, 0xfa0b7709
>  0,          2,          2,        1,   304128, 0x14255f47
> diff --git a/tests/ref/fate/filter-stereo3d-ar-abl b/tests/ref/fate/filter-stereo3d-ar-abl
> index 0358199..6b5a971 100644
> --- a/tests/ref/fate/filter-stereo3d-ar-abl
> +++ b/tests/ref/fate/filter-stereo3d-ar-abl
> @@ -1,4 +1,8 @@
>  #tb 0: 2/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x576
> +#sar 0: 0/1
>  0,          0,          0,        1,   304128, 0x7babef40
>  0,          1,          1,        1,   304128, 0x287d7709
>  0,          2,          2,        1,   304128, 0x385f5f47
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-abl b/tests/ref/fate/filter-stereo3d-sbsl-abl
> index 273e520..f0edf34 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-abl
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-abl
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x576
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x2f9389ef
>  0,          1,          1,        1,   152064, 0x16c66551
>  0,          2,          2,        1,   152064, 0xd779f64a
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-abr b/tests/ref/fate/filter-stereo3d-sbsl-abr
> index c827e3c..2756d38 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-abr
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-abr
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x576
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xd1f489ef
>  0,          1,          1,        1,   152064, 0xe4fe6551
>  0,          2,          2,        1,   152064, 0xd0d9f64a
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-agmc b/tests/ref/fate/filter-stereo3d-sbsl-agmc
> index 3a515b8..d86a226 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-agmc
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-agmc
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xa950d0d9
>  0,          1,          1,        1,   152064, 0x6a6933c3
>  0,          2,          2,        1,   152064, 0x66a1da3a
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-agmd b/tests/ref/fate/filter-stereo3d-sbsl-agmd
> index 7d188d4..ab915d6 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-agmd
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-agmd
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x962d1371
>  0,          1,          1,        1,   152064, 0xe7db1d51
>  0,          2,          2,        1,   152064, 0x3bb0c409
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-agmg b/tests/ref/fate/filter-stereo3d-sbsl-agmg
> index 3cae6f3..4ad85b6 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-agmg
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-agmg
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x45a6c9a8
>  0,          1,          1,        1,   152064, 0xe7ba65fc
>  0,          2,          2,        1,   152064, 0x88ab8fcc
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-agmh b/tests/ref/fate/filter-stereo3d-sbsl-agmh
> index e6853a6..b50f5af 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-agmh
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-agmh
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x96464057
>  0,          1,          1,        1,   152064, 0x58c4e280
>  0,          2,          2,        1,   152064, 0xaf76fd24
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-al b/tests/ref/fate/filter-stereo3d-sbsl-al
> index 5c8a429..1f9aaa4 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-al
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-al
> @@ -1,4 +1,8 @@
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x288
> +#sar 0: 0/1
>  0,          0,          0,        1,    76032, 0x3ff06515
>  0,          1,          1,        1,    76032, 0x00d824da
>  0,          2,          2,        1,    76032, 0x64a33c64
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-arbg b/tests/ref/fate/filter-stereo3d-sbsl-arbg
> index 1e87271..b5e4996 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-arbg
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-arbg
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x4d83ea30
>  0,          1,          1,        1,   152064, 0xa4a3be5b
>  0,          2,          2,        1,   152064, 0x21032989
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-arcc b/tests/ref/fate/filter-stereo3d-sbsl-arcc
> index 56f17fd..bcecd87 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-arcc
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-arcc
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x2760b14a
>  0,          1,          1,        1,   152064, 0xcf94baaf
>  0,          2,          2,        1,   152064, 0x9b5e0e0a
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-arcd b/tests/ref/fate/filter-stereo3d-sbsl-arcd
> index fd9806b..b5f11e2 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-arcd
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-arcd
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xa0261570
>  0,          1,          1,        1,   152064, 0x678403c8
>  0,          2,          2,        1,   152064, 0x1087e7b6
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-arcg b/tests/ref/fate/filter-stereo3d-sbsl-arcg
> index 68f3f54..f5c5845 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-arcg
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-arcg
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x70f5c9a8
>  0,          1,          1,        1,   152064, 0x56f165fc
>  0,          2,          2,        1,   152064, 0xe59f8fcc
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-arch b/tests/ref/fate/filter-stereo3d-sbsl-arch
> index 9c2fcd1..d6767df 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-arch
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-arch
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x81ab8dad
>  0,          1,          1,        1,   152064, 0x820fd98a
>  0,          2,          2,        1,   152064, 0x1ccc712b
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-argg b/tests/ref/fate/filter-stereo3d-sbsl-argg
> index 91fb064..82fa276 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-argg
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-argg
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x2cfbea30
>  0,          1,          1,        1,   152064, 0x4c44be5b
>  0,          2,          2,        1,   152064, 0x87462989
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-aybc b/tests/ref/fate/filter-stereo3d-sbsl-aybc
> index 72bd15c..1c24262 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-aybc
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-aybc
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xae8c985d
>  0,          1,          1,        1,   152064, 0x489e1535
>  0,          2,          2,        1,   152064, 0x01a83b2b
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-aybd b/tests/ref/fate/filter-stereo3d-sbsl-aybd
> index d963480..0aa4e8b 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-aybd
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-aybd
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x7dc98468
>  0,          1,          1,        1,   152064, 0xf72db6c9
>  0,          2,          2,        1,   152064, 0x1630f53f
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-aybg b/tests/ref/fate/filter-stereo3d-sbsl-aybg
> index 53f7f72..ebd8ba2 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-aybg
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-aybg
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x1a57c9a8
>  0,          1,          1,        1,   152064, 0x789265fc
>  0,          2,          2,        1,   152064, 0x2bb78fcc
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-aybh b/tests/ref/fate/filter-stereo3d-sbsl-aybh
> index c6fdd14..1b9edeb 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-aybh
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-aybh
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xf3ee182f
>  0,          1,          1,        1,   152064, 0x8b1c25f1
>  0,          2,          2,        1,   152064, 0xe78de2ac
> diff --git a/tests/ref/fate/filter-stereo3d-sbsl-sbsr b/tests/ref/fate/filter-stereo3d-sbsl-sbsr
> index b417ae4..9a5da96 100644
> --- a/tests/ref/fate/filter-stereo3d-sbsl-sbsr
> +++ b/tests/ref/fate/filter-stereo3d-sbsl-sbsr
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xbe2f89ef
>  0,          1,          1,        1,   152064, 0x4c806551
>  0,          2,          2,        1,   152064, 0x8165f64a
> diff --git a/tests/ref/fate/filter-tblend b/tests/ref/fate/filter-tblend
> index 3ff689a..80fea84 100644
> --- a/tests/ref/fate/filter-tblend
> +++ b/tests/ref/fate/filter-tblend
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          1,          1,        1,   152064, 0x8e50e5e5
>  0,          2,          2,        1,   152064, 0x7187a95e
>  0,          3,          3,        1,   152064, 0xbd73863e
> diff --git a/tests/ref/fate/filter-telecine b/tests/ref/fate/filter-telecine
> index b8a13a9..6d3545e 100644
> --- a/tests/ref/fate/filter-telecine
> +++ b/tests/ref/fate/filter-telecine
> @@ -1,4 +1,8 @@
>  #tb 0: 4/125
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x05b789ef
>  0,          1,          1,        1,   152064, 0x4bb46551
>  0,          2,          2,        1,   152064, 0x40692c80
> diff --git a/tests/ref/fate/filter-testsrc2-rgb24 b/tests/ref/fate/filter-testsrc2-rgb24
> index 2fdfa00..207ddfc 100644
> --- a/tests/ref/fate/filter-testsrc2-rgb24
> +++ b/tests/ref/fate/filter-testsrc2-rgb24
> @@ -1,4 +1,8 @@
>  #tb 0: 1/7
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        1,   230400, 0x1c012312
>  0,          1,          1,        1,   230400, 0xf7cf4e81
>  0,          2,          2,        1,   230400, 0x29a45e1c
> diff --git a/tests/ref/fate/filter-testsrc2-yuv420p b/tests/ref/fate/filter-testsrc2-yuv420p
> index 804e5fa..aaf93ba 100644
> --- a/tests/ref/fate/filter-testsrc2-yuv420p
> +++ b/tests/ref/fate/filter-testsrc2-yuv420p
> @@ -1,4 +1,8 @@
>  #tb 0: 1/7
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        1,   115200, 0x3744b3ed
>  0,          1,          1,        1,   115200, 0x0c1062d6
>  0,          2,          2,        1,   115200, 0x201b9db1
> diff --git a/tests/ref/fate/filter-testsrc2-yuv444p b/tests/ref/fate/filter-testsrc2-yuv444p
> index c8cc7c1..4b60e6a 100644
> --- a/tests/ref/fate/filter-testsrc2-yuv444p
> +++ b/tests/ref/fate/filter-testsrc2-yuv444p
> @@ -1,4 +1,8 @@
>  #tb 0: 1/7
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        1,   230400, 0xbfb96366
>  0,          1,          1,        1,   230400, 0xe63ca6e9
>  0,          2,          2,        1,   230400, 0xc6acccc8
> diff --git a/tests/ref/fate/filter-transpose b/tests/ref/fate/filter-transpose
> index 0f23423..2a5151b 100644
> --- a/tests/ref/fate/filter-transpose
> +++ b/tests/ref/fate/filter-transpose
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 288x352
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xab5889ef
>  0,          1,          1,        1,   152064, 0x898b6551
>  0,          2,          2,        1,   152064, 0x231bf64a
> diff --git a/tests/ref/fate/filter-trim-duration b/tests/ref/fate/filter-trim-duration
> index db74add..9ba86f8 100644
> --- a/tests/ref/fate/filter-trim-duration
> +++ b/tests/ref/fate/filter-trim-duration
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x432
> +#sar 0: 0/1
>  0,         10,         10,        1,   152064, 0xb45c4760
> diff --git a/tests/ref/fate/filter-trim-frame b/tests/ref/fate/filter-trim-frame
> index 1749afd..5dbf6b7 100644
> --- a/tests/ref/fate/filter-trim-frame
> +++ b/tests/ref/fate/filter-trim-frame
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x432
> +#sar 0: 0/1
>  0,          3,          3,        1,   152064, 0xceb080b0
>  0,          4,          4,        1,   152064, 0x473db652
>  0,          5,          5,        1,   152064, 0x287da8e6
> diff --git a/tests/ref/fate/filter-trim-mixed b/tests/ref/fate/filter-trim-mixed
> index 5e003f6..6b1a98c 100644
> --- a/tests/ref/fate/filter-trim-mixed
> +++ b/tests/ref/fate/filter-trim-mixed
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x432
> +#sar 0: 0/1
>  0,          1,          1,        1,   152064, 0x7f5f6551
>  0,          2,          2,        1,   152064, 0xc566f64a
>  0,          3,          3,        1,   152064, 0xceb080b0
> diff --git a/tests/ref/fate/filter-trim-time b/tests/ref/fate/filter-trim-time
> index 2f86025..ce9fac6 100644
> --- a/tests/ref/fate/filter-trim-time
> +++ b/tests/ref/fate/filter-trim-time
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x432
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x6e4f89ef
>  0,          1,          1,        1,   152064, 0x7f5f6551
> diff --git a/tests/ref/fate/filter-unsharp b/tests/ref/fate/filter-unsharp
> index 613163b..c128241 100644
> --- a/tests/ref/fate/filter-unsharp
> +++ b/tests/ref/fate/filter-unsharp
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x58100735
>  0,          1,          1,        1,   152064, 0x2967e43d
>  0,          2,          2,        1,   152064, 0x6f0c786d
> diff --git a/tests/ref/fate/filter-vectorscope_color b/tests/ref/fate/filter-vectorscope_color
> index 780c330..57875ab 100644
> --- a/tests/ref/fate/filter-vectorscope_color
> +++ b/tests/ref/fate/filter-vectorscope_color
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x256
> +#sar 0: 1/1
>  0,          0,          0,        1,   196608, 0xf6e3aa30
>  0,          1,          1,        1,   196608, 0x5584acf9
>  0,          2,          2,        1,   196608, 0xa862775d
> diff --git a/tests/ref/fate/filter-vectorscope_color2 b/tests/ref/fate/filter-vectorscope_color2
> index 417c3e0..3b2ad90 100644
> --- a/tests/ref/fate/filter-vectorscope_color2
> +++ b/tests/ref/fate/filter-vectorscope_color2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x256
> +#sar 0: 1/1
>  0,          0,          0,        1,   196608, 0x5e62fae5
>  0,          1,          1,        1,   196608, 0x4c27fcbf
>  0,          2,          2,        1,   196608, 0xb7531088
> diff --git a/tests/ref/fate/filter-vectorscope_color3 b/tests/ref/fate/filter-vectorscope_color3
> index 26831cf..4baecca 100644
> --- a/tests/ref/fate/filter-vectorscope_color3
> +++ b/tests/ref/fate/filter-vectorscope_color3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x256
> +#sar 0: 1/1
>  0,          0,          0,        1,   196608, 0x83df8770
>  0,          1,          1,        1,   196608, 0xa6a674a7
>  0,          2,          2,        1,   196608, 0x11757143
> diff --git a/tests/ref/fate/filter-vectorscope_color4 b/tests/ref/fate/filter-vectorscope_color4
> index 6bdfd5f..21d6762 100644
> --- a/tests/ref/fate/filter-vectorscope_color4
> +++ b/tests/ref/fate/filter-vectorscope_color4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x256
> +#sar 0: 1/1
>  0,          0,          0,        1,   196608, 0x326953c4
>  0,          1,          1,        1,   196608, 0x870e1dcc
>  0,          2,          2,        1,   196608, 0x87cb8800
> diff --git a/tests/ref/fate/filter-vectorscope_gray b/tests/ref/fate/filter-vectorscope_gray
> index f09a9c7..a81fbf8 100644
> --- a/tests/ref/fate/filter-vectorscope_gray
> +++ b/tests/ref/fate/filter-vectorscope_gray
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x256
> +#sar 0: 1/1
>  0,          0,          0,        1,   196608, 0x79ba71e2
>  0,          1,          1,        1,   196608, 0x909271e2
>  0,          2,          2,        1,   196608, 0x143971e2
> diff --git a/tests/ref/fate/filter-vectorscope_xy b/tests/ref/fate/filter-vectorscope_xy
> index 76987ef..83b7194 100644
> --- a/tests/ref/fate/filter-vectorscope_xy
> +++ b/tests/ref/fate/filter-vectorscope_xy
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x256
> +#sar 0: 1/1
>  0,          0,          0,        1,   196608, 0xa2899af1
>  0,          1,          1,        1,   196608, 0x26409af1
>  0,          2,          2,        1,   196608, 0xf5209af1
> diff --git a/tests/ref/fate/filter-w3fdif-complex b/tests/ref/fate/filter-w3fdif-complex
> index 32eadc9..4b334da 100644
> --- a/tests/ref/fate/filter-w3fdif-complex
> +++ b/tests/ref/fate/filter-w3fdif-complex
> @@ -1,4 +1,8 @@
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 16/15
>  0,         18,         18,        1,   622080, 0x21d21485
>  0,         19,         19,        1,   622080, 0x600a5468
>  0,         20,         20,        1,   622080, 0x9526f7b8
> diff --git a/tests/ref/fate/filter-w3fdif-simple b/tests/ref/fate/filter-w3fdif-simple
> index 137d989..62efaae 100644
> --- a/tests/ref/fate/filter-w3fdif-simple
> +++ b/tests/ref/fate/filter-w3fdif-simple
> @@ -1,4 +1,8 @@
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 16/15
>  0,         18,         18,        1,   622080, 0xc73774f5
>  0,         19,         19,        1,   622080, 0x4ea3a400
>  0,         20,         20,        1,   622080, 0x95153cda
> diff --git a/tests/ref/fate/filter-waveform_column b/tests/ref/fate/filter-waveform_column
> index 5e66db8..f35fb24 100644
> --- a/tests/ref/fate/filter-waveform_column
> +++ b/tests/ref/fate/filter-waveform_column
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x256
> +#sar 0: 1/1
>  0,          0,          0,        1,   270336, 0x3af3cd54
>  0,          1,          1,        1,   270336, 0x892ccd54
>  0,          2,          2,        1,   270336, 0x2171cd54
> diff --git a/tests/ref/fate/filter-waveform_envelope b/tests/ref/fate/filter-waveform_envelope
> index 44384eb..13130c4 100644
> --- a/tests/ref/fate/filter-waveform_envelope
> +++ b/tests/ref/fate/filter-waveform_envelope
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x256
> +#sar 0: 1/1
>  0,          0,          0,        1,   270336, 0x24a46c67
>  0,          1,          1,        1,   270336, 0x622077e7
>  0,          2,          2,        1,   270336, 0xb96dd1a1
> diff --git a/tests/ref/fate/filter-waveform_row b/tests/ref/fate/filter-waveform_row
> index 95eaa45..b436be5 100644
> --- a/tests/ref/fate/filter-waveform_row
> +++ b/tests/ref/fate/filter-waveform_row
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x288
> +#sar 0: 1/1
>  0,          0,          0,        1,   221184, 0x2a1149a3
>  0,          1,          1,        1,   221184, 0x698c49a3
>  0,          2,          2,        1,   221184, 0x9fc949a3
> diff --git a/tests/ref/fate/filter-waveform_uv b/tests/ref/fate/filter-waveform_uv
> index 6eb363c..8cb3bc8 100644
> --- a/tests/ref/fate/filter-waveform_uv
> +++ b/tests/ref/fate/filter-waveform_uv
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x512
> +#sar 0: 1/1
>  0,          0,          0,        1,   540672, 0x8a2521d6
>  0,          1,          1,        1,   540672, 0xb9a321d6
>  0,          2,          2,        1,   540672, 0x325421d6
> diff --git a/tests/ref/fate/filter-yadif-mode0 b/tests/ref/fate/filter-yadif-mode0
> index 4d42890..2c6346b 100644
> --- a/tests/ref/fate/filter-yadif-mode0
> +++ b/tests/ref/fate/filter-yadif-mode0
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 16/15
>  0,          9,          9,        1,   622080, 0x6331caee
>  0,         10,         10,        1,   622080, 0xa459e690
>  0,         11,         11,        1,   622080, 0x6429c648
> diff --git a/tests/ref/fate/filter-yadif-mode1 b/tests/ref/fate/filter-yadif-mode1
> index 08cd518..e2d14d5 100644
> --- a/tests/ref/fate/filter-yadif-mode1
> +++ b/tests/ref/fate/filter-yadif-mode1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 16/15
>  0,         18,         18,        1,   622080, 0x6331caee
>  0,         19,         19,        1,   622080, 0x625da883
>  0,         20,         20,        1,   622080, 0xa459e690
> diff --git a/tests/ref/fate/filter-yadif10 b/tests/ref/fate/filter-yadif10
> index aa27bfc..09ab745 100644
> --- a/tests/ref/fate/filter-yadif10
> +++ b/tests/ref/fate/filter-yadif10
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 16/15
>  0,          9,          9,        1,  1244160, 0x5b49e0c0
>  0,         10,         10,        1,  1244160, 0x76ba6bab
>  0,         11,         11,        1,  1244160, 0x0298cb8d
> diff --git a/tests/ref/fate/filter-yadif16 b/tests/ref/fate/filter-yadif16
> index 65427a2..3386b02 100644
> --- a/tests/ref/fate/filter-yadif16
> +++ b/tests/ref/fate/filter-yadif16
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 16/15
>  0,          9,          9,        1,  1244160, 0xfb65caee
>  0,         10,         10,        1,  1244160, 0x6222e690
>  0,         11,         11,        1,  1244160, 0x020ac648
> diff --git a/tests/ref/fate/flic-af11-palette-change b/tests/ref/fate/flic-af11-palette-change
> index cd702b6..acf0004 100644
> --- a/tests/ref/fate/flic-af11-palette-change
> +++ b/tests/ref/fate/flic-af11-palette-change
> @@ -1,4 +1,8 @@
>  #tb 0: 1/35
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0x508ff8ac
>  0,          1,          1,        1,   192000, 0xef0d4274
>  0,          2,          2,        1,   192000, 0x0d50e0dd
> diff --git a/tests/ref/fate/flic-af12 b/tests/ref/fate/flic-af12
> index 227f26a..4683346 100644
> --- a/tests/ref/fate/flic-af12
> +++ b/tests/ref/fate/flic-af12
> @@ -1,4 +1,8 @@
>  #tb 0: 9/125
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   921600, 0x50a87396
>  0,          1,          1,        1,   921600, 0xa6e65d9e
>  0,          2,          2,        1,   921600, 0x05956f62
> diff --git a/tests/ref/fate/flic-magiccarpet b/tests/ref/fate/flic-magiccarpet
> index 23a9342..b8d3fc2 100644
> --- a/tests/ref/fate/flic-magiccarpet
> +++ b/tests/ref/fate/flic-magiccarpet
> @@ -1,4 +1,8 @@
>  #tb 0: 1/14
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0x00000000
>  0,          1,          1,        1,   192000, 0x03567eeb
>  0,          2,          2,        1,   192000, 0xe73db12c
> diff --git a/tests/ref/fate/force_key_frames b/tests/ref/fate/force_key_frames
> index 0a41378..26de090 100644
> --- a/tests/ref/fate/force_key_frames
> +++ b/tests/ref/fate/force_key_frames
> @@ -1,4 +1,4 @@
>  07567b9528b8de523faaf49e4e1e0fc6 *tests/data/fate/force_key_frames.avi
>  113312 tests/data/fate/force_key_frames.avi
> -8f68ad2e602ecd87a3e0c097ba99d773 *tests/data/fate/force_key_frames.out.framecrc
> -stddev:34363.01 PSNR:  5.61 MAXDIFF:56305 bytes:  7603200/      186
> +b2e92b97bac0243242281d71108ffdbd *tests/data/fate/force_key_frames.out.framecrc
> +stddev:34612.83 PSNR:  5.54 MAXDIFF:61408 bytes:  7603200/      264
> diff --git a/tests/ref/fate/fraps-v0 b/tests/ref/fate/fraps-v0
> index 3cba831..97ada13 100644
> --- a/tests/ref/fate/fraps-v0
> +++ b/tests/ref/fate/fraps-v0
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 312x216
> +#sar 0: 0/1
>  0,          0,          0,        1,   101088, 0x7bf448f8
>  0,          1,          1,        1,   101088, 0x1ba749ec
>  0,          2,          2,        1,   101088, 0x94eb4dc4
> diff --git a/tests/ref/fate/fraps-v1 b/tests/ref/fate/fraps-v1
> index 29c7e37..36fb7d8 100644
> --- a/tests/ref/fate/fraps-v1
> +++ b/tests/ref/fate/fraps-v1
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   230400, 0x23c29d17
> diff --git a/tests/ref/fate/fraps-v2 b/tests/ref/fate/fraps-v2
> index 06e0024..3d85333 100644
> --- a/tests/ref/fate/fraps-v2
> +++ b/tests/ref/fate/fraps-v2
> @@ -1,3 +1,7 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1024x768
> +#sar 0: 0/1
>  0,          0,          0,        1,  1179648, 0x99f80436
>  0,          5,          5,        1,  1179648, 0xe8ae7a30
> diff --git a/tests/ref/fate/fraps-v3 b/tests/ref/fate/fraps-v3
> index 139ee7e..93286d1 100644
> --- a/tests/ref/fate/fraps-v3
> +++ b/tests/ref/fate/fraps-v3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x384
> +#sar 0: 0/1
>  0,          0,          0,        1,   589824, 0x0b181bbf
>  0,          1,          1,        1,   589824, 0xcd740f79
>  0,          2,          2,        1,   589824, 0x16f8f90e
> diff --git a/tests/ref/fate/fraps-v4 b/tests/ref/fate/fraps-v4
> index 007916d..c97f29b 100644
> --- a/tests/ref/fate/fraps-v4
> +++ b/tests/ref/fate/fraps-v4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x512
> +#sar 0: 0/1
>  0,          0,          0,        1,   491520, 0x68ff12c0
>  0,          1,          1,        1,   491520, 0x22d36f0d
>  0,          2,          2,        1,   491520, 0xce6f877d
> diff --git a/tests/ref/fate/fraps-v5 b/tests/ref/fate/fraps-v5
> index 599683a..c0628e9 100644
> --- a/tests/ref/fate/fraps-v5
> +++ b/tests/ref/fate/fraps-v5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 288x168
> +#sar 0: 0/1
>  0,          0,          0,        1,   145152, 0x8458d4cb
>  0,          1,          1,        1,   145152, 0xa694d7c7
>  0,          2,          2,        1,   145152, 0x2bd4bfc9
> diff --git a/tests/ref/fate/frwu b/tests/ref/fate/frwu
> index 32eaa6f..918ef6c 100644
> --- a/tests/ref/fate/frwu
> +++ b/tests/ref/fate/frwu
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        1,   153600, 0x050422c0
>  0,          1,          1,        1,   153600, 0x0cf35359
>  0,          2,          2,        1,   153600, 0x2ae95db0
> diff --git a/tests/ref/fate/g2m2 b/tests/ref/fate/g2m2
> index 710dbd1..42b7b6f 100644
> --- a/tests/ref/fate/g2m2
> +++ b/tests/ref/fate/g2m2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1024x768
> +#sar 0: 0/1
>  0,         47,         47,        0,  2359296, 0xb4434e4f
>  0,         62,         62,        0,  2359296, 0x59cb5027
>  0,         78,         78,        0,  2359296, 0xe9bc578d
> diff --git a/tests/ref/fate/g2m3 b/tests/ref/fate/g2m3
> index e8fe692..b665d56 100644
> --- a/tests/ref/fate/g2m3
> +++ b/tests/ref/fate/g2m3
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/24000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x996
> +#sar 0: 0/1
>  0,          0,          0,        1,  3824640, 0x9a253d29
>  0,         12,         12,        1,  3824640, 0xcb232b06
>  0,         15,         15,        1,  3824640, 0xb03c288c
> diff --git a/tests/ref/fate/g2m4 b/tests/ref/fate/g2m4
> index c9a6e12..d5ecaeb 100644
> --- a/tests/ref/fate/g2m4
> +++ b/tests/ref/fate/g2m4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x1024
> +#sar 0: 0/1
>  0,          0,          0,        1,  3932160, 0x109148ee
>  0,          1,          1,        1,  3932160, 0xa87b7bff
>  0,          2,          2,        1,  3932160, 0x00e14d16
> diff --git a/tests/ref/fate/g722-encode b/tests/ref/fate/g722-encode
> index 3f6b3cf..2e72a09 100644
> --- a/tests/ref/fate/g722-encode
> +++ b/tests/ref/fate/g722-encode
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/16000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 16000
> +#channel_layout 0: 4
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     8192,    16384, 1dd9c285eb608038f3257d1a8e02eb75
>  0,       8192,       8192,     8192,    16384, f7459334cbe70c06bc0897edfe64e840
> diff --git a/tests/ref/fate/g722dec-1 b/tests/ref/fate/g722dec-1
> index e94c3e6..b7ec0d3 100644
> --- a/tests/ref/fate/g722dec-1
> +++ b/tests/ref/fate/g722dec-1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/16000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 16000
> +#channel_layout 0: 4
>  0,          0,          0,     2048,     4096, 0x4f9228b3
>  0,       2048,       2048,     2048,     4096, 0xfab58157
>  0,       4096,       4096,     2048,     4096, 0x0b641c78
> diff --git a/tests/ref/fate/g723_1-dec-1 b/tests/ref/fate/g723_1-dec-1
> index a3a7f67..01176fd 100644
> --- a/tests/ref/fate/g723_1-dec-1
> +++ b/tests/ref/fate/g723_1-dec-1
> @@ -1,3 +1,7 @@
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  0,          0,          0,      240,      480, 0x7f6f3970
>  0,        240,        240,      240,      480, 0x1105a0d3
> diff --git a/tests/ref/fate/g723_1-dec-2 b/tests/ref/fate/g723_1-dec-2
> index e7fc9b2..0711ae4 100644
> --- a/tests/ref/fate/g723_1-dec-2
> +++ b/tests/ref/fate/g723_1-dec-2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  0,          0,          0,      240,      480, 0x5d9d9091
>  0,        240,        240,      240,      480, 0x425095b7
>  0,        480,        480,      240,      480, 0xe7b6a1a7
> diff --git a/tests/ref/fate/g723_1-dec-3 b/tests/ref/fate/g723_1-dec-3
> index d1a2946..c1dde0c 100644
> --- a/tests/ref/fate/g723_1-dec-3
> +++ b/tests/ref/fate/g723_1-dec-3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  0,          0,          0,      240,      480, 0xce908869
>  0,        240,        240,      240,      480, 0xfa63588e
>  0,        480,        480,      240,      480, 0x11ce850c
> diff --git a/tests/ref/fate/g723_1-dec-4 b/tests/ref/fate/g723_1-dec-4
> index 792899d..34817ee 100644
> --- a/tests/ref/fate/g723_1-dec-4
> +++ b/tests/ref/fate/g723_1-dec-4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  0,          0,          0,      240,      480, 0xa697b314
>  0,        240,        240,      240,      480, 0x43c5dc5a
>  0,        480,        480,      240,      480, 0xd2438147
> diff --git a/tests/ref/fate/g723_1-dec-5 b/tests/ref/fate/g723_1-dec-5
> index bdc2982..7076fac 100644
> --- a/tests/ref/fate/g723_1-dec-5
> +++ b/tests/ref/fate/g723_1-dec-5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  0,          0,          0,      240,      480, 0x4dce9773
>  0,        240,        240,      240,      480, 0xe6367ab8
>  0,        480,        480,      240,      480, 0xf36a589d
> diff --git a/tests/ref/fate/g723_1-dec-6 b/tests/ref/fate/g723_1-dec-6
> index eb0e4fa..b493b37 100644
> --- a/tests/ref/fate/g723_1-dec-6
> +++ b/tests/ref/fate/g723_1-dec-6
> @@ -1,4 +1,8 @@
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  0,          0,          0,      240,      480, 0x4fa1aed9
>  0,        240,        240,      240,      480, 0x6d7ef391
>  0,        480,        480,      240,      480, 0xaecaf2c1
> diff --git a/tests/ref/fate/g723_1-dec-7 b/tests/ref/fate/g723_1-dec-7
> index cc30187..bd960f5 100644
> --- a/tests/ref/fate/g723_1-dec-7
> +++ b/tests/ref/fate/g723_1-dec-7
> @@ -1,4 +1,8 @@
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  0,          0,          0,      240,      480, 0x35e4a1fd
>  0,        240,        240,      240,      480, 0x2f7bdd60
>  0,        480,        480,      240,      480, 0x0407e499
> diff --git a/tests/ref/fate/g723_1-dec-8 b/tests/ref/fate/g723_1-dec-8
> index fc4d9f3..3399d7a 100644
> --- a/tests/ref/fate/g723_1-dec-8
> +++ b/tests/ref/fate/g723_1-dec-8
> @@ -1,4 +1,8 @@
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  0,          0,          0,      240,      480, 0x17930e0f
>  0,        240,        240,      240,      480, 0x7c7f4247
>  0,        480,        480,      240,      480, 0xbf3489e5
> diff --git a/tests/ref/fate/g726-encode-2bit b/tests/ref/fate/g726-encode-2bit
> index 2e61310..b125e4f 100644
> --- a/tests/ref/fate/g726-encode-2bit
> +++ b/tests/ref/fate/g726-encode-2bit
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,    16384,    32768, b28b116d2315323aeba6b66b58b7f4ed
>  0,      16384,      16384,    16384,    32768, e9cfbebe99490bd4987341ee748291c4
> diff --git a/tests/ref/fate/g726-encode-3bit b/tests/ref/fate/g726-encode-3bit
> index ce43d32..dae1724 100644
> --- a/tests/ref/fate/g726-encode-3bit
> +++ b/tests/ref/fate/g726-encode-3bit
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,    10920,    21840, 517dd6d1ce566b998251f0d215fa69c0
>  0,      10920,      10920,    10920,    21840, b0268e2bcc67acb524753790123c65fd
> diff --git a/tests/ref/fate/g726-encode-4bit b/tests/ref/fate/g726-encode-4bit
> index 1ccc180..24cc4a2 100644
> --- a/tests/ref/fate/g726-encode-4bit
> +++ b/tests/ref/fate/g726-encode-4bit
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     8192,    16384, a0cf3a0953adce1a1032a4fd2da00a52
>  0,       8192,       8192,     8192,    16384, c750c1b76a203556dd60d73d261529e9
> diff --git a/tests/ref/fate/g726-encode-5bit b/tests/ref/fate/g726-encode-5bit
> index 219c73d..d8307fb 100644
> --- a/tests/ref/fate/g726-encode-5bit
> +++ b/tests/ref/fate/g726-encode-5bit
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,     6552,    13104, 6fe3f75df1262c5f956887de9c32df40
>  0,       6552,       6552,     6552,    13104, f955518de6f61f94253280d11d64d68b
> diff --git a/tests/ref/fate/gapless-mp3 b/tests/ref/fate/gapless-mp3
> index 2ce4b8c..ebe7bfa 100644
> --- a/tests/ref/fate/gapless-mp3
> +++ b/tests/ref/fate/gapless-mp3
> @@ -1,5 +1,5 @@
> -d5c88cf38416329a052a9b0cb140fb4c *tests/data/fate/gapless-mp3.out-1
> +37534a3bcc3ef306e8c5ebfcfedfc41c *tests/data/fate/gapless-mp3.out-1
>  c96c3ae7bd3300fd2f4debac222de5b7
> -3386bc2009b31b7ef39247918cbb02a5 *tests/data/fate/gapless-mp3.out-2
> +0cd1cdbcfd5cdbf6270cd98219bf31cd *tests/data/fate/gapless-mp3.out-2
>  c96c3ae7bd3300fd2f4debac222de5b7
> -3ce35ec2a9a59b7459ecd6c98d8fa123 *tests/data/fate/gapless-mp3.out-3
> +9d3d8ba8a61b534f2d02ee648d6a8229 *tests/data/fate/gapless-mp3.out-3
> diff --git a/tests/ref/fate/gif-color b/tests/ref/fate/gif-color
> index 5559186..c88a05d 100644
> --- a/tests/ref/fate/gif-color
> +++ b/tests/ref/fate/gif-color
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 217x217
> +#sar 0: 0/1
>  0,          0,          0,        1,   188356, 0xf0944065
>  0,          1,          1,        1,   188356, 0x146ed4c4
>  0,          2,          2,        1,   188356, 0x96866a6f
> diff --git a/tests/ref/fate/gif-deal b/tests/ref/fate/gif-deal
> index 88371bb..96b7723 100644
> --- a/tests/ref/fate/gif-deal
> +++ b/tests/ref/fate/gif-deal
> @@ -1,4 +1,8 @@
>  #tb 0: 12/109
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 430x181
> +#sar 0: 0/1
>  0,          0,          0,        1,   311320, 0x71905396
>  0,          1,          1,        1,   311320, 0xed46b01e
>  0,          2,          2,        1,   311320, 0xcbb56aa8
> diff --git a/tests/ref/fate/gif-demux b/tests/ref/fate/gif-demux
> index 547b9ce..3d46441 100644
> --- a/tests/ref/fate/gif-demux
> +++ b/tests/ref/fate/gif-demux
> @@ -1,4 +1,8 @@
>  #tb 0: 1/100
> +#media_type 0: video
> +#codec_id 0: gif
> +#dimensions 0: 480x360
> +#sar 0: 0/1
>  0,          0,          0,        5,    74699, 0xef7e91c8
>  0,          5,          5,        2,    10079, 0x2892d9e2, F=0x0
>  0,          7,          7,        2,    12369, 0xd7d73286, F=0x0
> diff --git a/tests/ref/fate/gif-disposal-background b/tests/ref/fate/gif-disposal-background
> index 838745b..cd0d827 100644
> --- a/tests/ref/fate/gif-disposal-background
> +++ b/tests/ref/fate/gif-disposal-background
> @@ -1,4 +1,8 @@
>  #tb 0: 1/2
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 72x36
> +#sar 0: 0/1
>  0,          0,          0,        1,    10368, 0x8b200cc8
>  0,          1,          1,        1,    10368, 0x4e208e4f
>  0,          2,          2,        1,    10368, 0x044dba8b
> diff --git a/tests/ref/fate/gif-disposal-restore b/tests/ref/fate/gif-disposal-restore
> index 0ff1715..b1282f6 100644
> --- a/tests/ref/fate/gif-disposal-restore
> +++ b/tests/ref/fate/gif-disposal-restore
> @@ -1,4 +1,8 @@
>  #tb 0: 1/1
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 468x60
> +#sar 0: 0/1
>  0,          0,          0,        1,   112320, 0xb8afe429
>  0,          1,          1,        1,   112320, 0xae588a4b
>  0,          3,          3,        1,   112320, 0xccdd27b7
> diff --git a/tests/ref/fate/gif-gray b/tests/ref/fate/gif-gray
> index 5a133bd..18705d0 100644
> --- a/tests/ref/fate/gif-gray
> +++ b/tests/ref/fate/gif-gray
> @@ -1,4 +1,8 @@
>  #tb 0: 1/100
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 480x360
> +#sar 0: 0/1
>  0,          0,          0,        1,   691200, 0xef6c0f3d
>  0,          5,          5,        1,   691200, 0xc18b32de
>  0,          7,          7,        1,   691200, 0x2395a3d7
> diff --git a/tests/ref/fate/gifenc-bgr4_byte b/tests/ref/fate/gifenc-bgr4_byte
> index c0d39bd..3495a8b 100644
> --- a/tests/ref/fate/gifenc-bgr4_byte
> +++ b/tests/ref/fate/gifenc-bgr4_byte
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: gif
> +#dimensions 0: 217x217
> +#sar 0: 0/1
>  0,          0,          0,        1,      508, 0xa1b80fc0
>  0,          1,          1,        1,      213, 0x4f554bd7, S=1,     1024, 0xb6327c81
>  0,          2,          2,        1,      131, 0x283b2988, S=1,     1024, 0xae3a7c81
> diff --git a/tests/ref/fate/gifenc-bgr8 b/tests/ref/fate/gifenc-bgr8
> index f3b7772..0a4e5d4 100644
> --- a/tests/ref/fate/gifenc-bgr8
> +++ b/tests/ref/fate/gifenc-bgr8
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: gif
> +#dimensions 0: 217x217
> +#sar 0: 0/1
>  0,          0,          0,        1,      552, 0x271a2dd3
>  0,          1,          1,        1,      297, 0x90168a95, S=1,     1024, 0xf351799f
>  0,          2,          2,        1,      438, 0x91efce1b, S=1,     1024, 0xf351799f
> diff --git a/tests/ref/fate/gifenc-gray b/tests/ref/fate/gifenc-gray
> index c11e132..81cdd18 100644
> --- a/tests/ref/fate/gifenc-gray
> +++ b/tests/ref/fate/gifenc-gray
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: gif
> +#dimensions 0: 217x217
> +#sar 0: 0/1
>  0,          0,          0,        1,      579, 0x0d0e3ab8
>  0,          1,          1,        1,      150, 0x178b3a8c, S=1,     1024, 0xc2f67c9f
>  0,          2,          2,        1,      155, 0x941743f5, S=1,     1024, 0xc2f67c9f
> diff --git a/tests/ref/fate/gifenc-pal8 b/tests/ref/fate/gifenc-pal8
> index a84efa0..a6d5741 100644
> --- a/tests/ref/fate/gifenc-pal8
> +++ b/tests/ref/fate/gifenc-pal8
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: gif
> +#dimensions 0: 217x217
> +#sar 0: 0/1
>  0,          0,          0,        1,      552, 0x271a2dd3, S=1,     1024, 0xec907a9e
>  0,          1,          1,        1,      297, 0x90168a95, S=1,     1024, 0xf351799f
>  0,          2,          2,        1,      438, 0x91efce1b, S=1,     1024, 0xf351799f
> diff --git a/tests/ref/fate/gifenc-rgb4_byte b/tests/ref/fate/gifenc-rgb4_byte
> index 9b00103..067accd 100644
> --- a/tests/ref/fate/gifenc-rgb4_byte
> +++ b/tests/ref/fate/gifenc-rgb4_byte
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: gif
> +#dimensions 0: 217x217
> +#sar 0: 0/1
>  0,          0,          0,        1,      508, 0xf04a113b
>  0,          1,          1,        1,      213, 0x23c24d3d, S=1,     1024, 0xf7700427
>  0,          2,          2,        1,      131, 0x56d22a39, S=1,     1024, 0x03730427
> diff --git a/tests/ref/fate/gifenc-rgb8 b/tests/ref/fate/gifenc-rgb8
> index d1a990d..490e4d0 100644
> --- a/tests/ref/fate/gifenc-rgb8
> +++ b/tests/ref/fate/gifenc-rgb8
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: gif
> +#dimensions 0: 217x217
> +#sar 0: 0/1
>  0,          0,          0,        1,      552, 0x47602c6c
>  0,          1,          1,        1,      297, 0x49dd8847, S=1,     1024, 0xcfc8799f
>  0,          2,          2,        1,      438, 0x4776d352, S=1,     1024, 0xcfc8799f
> diff --git a/tests/ref/fate/gsm-ms b/tests/ref/fate/gsm-ms
> index 6d15cb8..92d78f3 100644
> --- a/tests/ref/fate/gsm-ms
> +++ b/tests/ref/fate/gsm-ms
> @@ -1,4 +1,8 @@
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  0,          0,          0,      320,      640, 0xf79c59ee
>  0,        320,        320,      320,      640, 0x6e6248be
>  0,        640,        640,      320,      640, 0x2a5b3aed
> diff --git a/tests/ref/fate/gsm-toast b/tests/ref/fate/gsm-toast
> index 721e4e4..ebbfbbf 100644
> --- a/tests/ref/fate/gsm-toast
> +++ b/tests/ref/fate/gsm-toast
> @@ -1,4 +1,8 @@
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  0,          0,          0,      160,      320, 0x4c32ab06
>  0,        160,        160,      160,      320, 0x2052a4e7
>  0,        320,        320,      160,      320, 0xe9aeafca
> diff --git a/tests/ref/fate/h264-conformance-aud_mw_e b/tests/ref/fate/h264-conformance-aud_mw_e
> index 83c6fae..890c7ff 100644
> --- a/tests/ref/fate/h264-conformance-aud_mw_e
> +++ b/tests/ref/fate/h264-conformance-aud_mw_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xa6d63b2e
>  0,          1,          1,        1,    38016, 0x28bae101
>  0,          2,          2,        1,    38016, 0x139f9b29
> diff --git a/tests/ref/fate/h264-conformance-ba1_ft_c b/tests/ref/fate/h264-conformance-ba1_ft_c
> index 70db0bb..0b8f66e 100644
> --- a/tests/ref/fate/h264-conformance-ba1_ft_c
> +++ b/tests/ref/fate/h264-conformance-ba1_ft_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/19
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xa6f9b2a8
>  0,          1,          1,        1,   152064, 0x936a8ed6
>  0,          2,          2,        1,   152064, 0xa9f47652
> diff --git a/tests/ref/fate/h264-conformance-ba1_sony_d b/tests/ref/fate/h264-conformance-ba1_sony_d
> index b0145cd..c64462f 100644
> --- a/tests/ref/fate/h264-conformance-ba1_sony_d
> +++ b/tests/ref/fate/h264-conformance-ba1_sony_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xb3883478
>  0,          1,          1,        1,    38016, 0x99e1fe60
>  0,          2,          2,        1,    38016, 0x65eace24
> diff --git a/tests/ref/fate/h264-conformance-ba2_sony_f b/tests/ref/fate/h264-conformance-ba2_sony_f
> index 13a6462..86b2df3 100644
> --- a/tests/ref/fate/h264-conformance-ba2_sony_f
> +++ b/tests/ref/fate/h264-conformance-ba2_sony_f
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xb3883478
>  0,          1,          1,        1,    38016, 0x47b90d4b
>  0,          2,          2,        1,    38016, 0x3e99dfcf
> diff --git a/tests/ref/fate/h264-conformance-ba3_sva_c b/tests/ref/fate/h264-conformance-ba3_sva_c
> index cb775db..52d6bb0 100644
> --- a/tests/ref/fate/h264-conformance-ba3_sva_c
> +++ b/tests/ref/fate/h264-conformance-ba3_sva_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xbf5f1df5
>  0,          1,          1,        1,    38016, 0x8de61f39
>  0,          2,          2,        1,    38016, 0xaeec0a18
> diff --git a/tests/ref/fate/h264-conformance-ba_mw_d b/tests/ref/fate/h264-conformance-ba_mw_d
> index 18a6717..e237b58 100644
> --- a/tests/ref/fate/h264-conformance-ba_mw_d
> +++ b/tests/ref/fate/h264-conformance-ba_mw_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x3ae838ee
>  0,          1,          1,        1,    38016, 0x9ed7e141
>  0,          2,          2,        1,    38016, 0x393097f9
> diff --git a/tests/ref/fate/h264-conformance-bamq1_jvc_c b/tests/ref/fate/h264-conformance-bamq1_jvc_c
> index 4a3066c..a62ef08 100644
> --- a/tests/ref/fate/h264-conformance-bamq1_jvc_c
> +++ b/tests/ref/fate/h264-conformance-bamq1_jvc_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x6951213f
>  0,          1,          1,        1,    38016, 0x82ddf39d
>  0,          2,          2,        1,    38016, 0x3f81c6b1
> diff --git a/tests/ref/fate/h264-conformance-bamq2_jvc_c b/tests/ref/fate/h264-conformance-bamq2_jvc_c
> index 3308f77..ef6d7bd 100644
> --- a/tests/ref/fate/h264-conformance-bamq2_jvc_c
> +++ b/tests/ref/fate/h264-conformance-bamq2_jvc_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x6951213f
>  0,          1,          1,        1,    38016, 0xd1bbf830
>  0,          2,          2,        1,    38016, 0x79dcc8cb
> diff --git a/tests/ref/fate/h264-conformance-banm_mw_d b/tests/ref/fate/h264-conformance-banm_mw_d
> index 6108ca3..00b27bb 100644
> --- a/tests/ref/fate/h264-conformance-banm_mw_d
> +++ b/tests/ref/fate/h264-conformance-banm_mw_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x3ae838ee
>  0,          1,          1,        1,    38016, 0x9ed7e141
>  0,          2,          2,        1,    38016, 0xaf9d9753
> diff --git a/tests/ref/fate/h264-conformance-basqp1_sony_c b/tests/ref/fate/h264-conformance-basqp1_sony_c
> index a5038e4..2407431 100644
> --- a/tests/ref/fate/h264-conformance-basqp1_sony_c
> +++ b/tests/ref/fate/h264-conformance-basqp1_sony_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xe2d73230
>  0,          1,          1,        1,    38016, 0xda4dfc8e
>  0,          2,          2,        1,    38016, 0x7334cb99
> diff --git a/tests/ref/fate/h264-conformance-caba1_sony_d b/tests/ref/fate/h264-conformance-caba1_sony_d
> index 3579820..dcd5976 100644
> --- a/tests/ref/fate/h264-conformance-caba1_sony_d
> +++ b/tests/ref/fate/h264-conformance-caba1_sony_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xb3883478
>  0,          1,          1,        1,    38016, 0x99e1fe60
>  0,          2,          2,        1,    38016, 0x65eace24
> diff --git a/tests/ref/fate/h264-conformance-caba1_sva_b b/tests/ref/fate/h264-conformance-caba1_sva_b
> index 8b255bc..19daf44 100644
> --- a/tests/ref/fate/h264-conformance-caba1_sva_b
> +++ b/tests/ref/fate/h264-conformance-caba1_sva_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xee831fe4
>  0,          1,          1,        1,    38016, 0x1098ff23
>  0,          2,          2,        1,    38016, 0x8fc3e078
> diff --git a/tests/ref/fate/h264-conformance-caba2_sony_e b/tests/ref/fate/h264-conformance-caba2_sony_e
> index c30083c..acfc842 100644
> --- a/tests/ref/fate/h264-conformance-caba2_sony_e
> +++ b/tests/ref/fate/h264-conformance-caba2_sony_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xb3883478
>  0,          1,          1,        1,    38016, 0x23a30e47
>  0,          2,          2,        1,    38016, 0xa0b7df0f
> diff --git a/tests/ref/fate/h264-conformance-caba2_sva_b b/tests/ref/fate/h264-conformance-caba2_sva_b
> index ca89226..8c77add 100644
> --- a/tests/ref/fate/h264-conformance-caba2_sva_b
> +++ b/tests/ref/fate/h264-conformance-caba2_sva_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xee831fe4
>  0,          1,          1,        1,    38016, 0xd9130e19
>  0,          2,          2,        1,    38016, 0x8ad70cae
> diff --git a/tests/ref/fate/h264-conformance-caba3_sony_c b/tests/ref/fate/h264-conformance-caba3_sony_c
> index c7aee37..4e35930 100644
> --- a/tests/ref/fate/h264-conformance-caba3_sony_c
> +++ b/tests/ref/fate/h264-conformance-caba3_sony_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xb3883478
>  0,          1,          1,        1,    38016, 0xb6261cdd
>  0,          2,          2,        1,    38016, 0x42ecede9
> diff --git a/tests/ref/fate/h264-conformance-caba3_sva_b b/tests/ref/fate/h264-conformance-caba3_sva_b
> index 7bdb3f8..cfa3c16 100644
> --- a/tests/ref/fate/h264-conformance-caba3_sva_b
> +++ b/tests/ref/fate/h264-conformance-caba3_sva_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x0e091175
>  0,          1,          1,        1,    38016, 0xe8f81506
>  0,          2,          2,        1,    38016, 0xf706f5cd
> diff --git a/tests/ref/fate/h264-conformance-caba3_toshiba_e b/tests/ref/fate/h264-conformance-caba3_toshiba_e
> index b31efe1..7c6c4c3 100644
> --- a/tests/ref/fate/h264-conformance-caba3_toshiba_e
> +++ b/tests/ref/fate/h264-conformance-caba3_toshiba_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x72723ce4
>  0,          1,          1,        1,    38016, 0x347219d7
>  0,          2,          2,        1,    38016, 0x813ff182
> diff --git a/tests/ref/fate/h264-conformance-cabac_mot_fld0_full b/tests/ref/fate/h264-conformance-cabac_mot_fld0_full
> index b131cda..8778fef 100644
> --- a/tests/ref/fate/h264-conformance-cabac_mot_fld0_full
> +++ b/tests/ref/fate/h264-conformance-cabac_mot_fld0_full
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0xbf168f4e
>  0,          1,          1,        1,   518400, 0xeda5e54f
>  0,          2,          2,        1,   518400, 0xef496d43
> diff --git a/tests/ref/fate/h264-conformance-cabac_mot_frm0_full b/tests/ref/fate/h264-conformance-cabac_mot_frm0_full
> index 58949e2..3774cfd 100644
> --- a/tests/ref/fate/h264-conformance-cabac_mot_frm0_full
> +++ b/tests/ref/fate/h264-conformance-cabac_mot_frm0_full
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x40c7e2d9
>  0,          1,          1,        1,   518400, 0xb16701a5
>  0,          2,          2,        1,   518400, 0x12c2f5b1
> diff --git a/tests/ref/fate/h264-conformance-cabac_mot_mbaff0_full b/tests/ref/fate/h264-conformance-cabac_mot_mbaff0_full
> index 1e9313e..120871f 100644
> --- a/tests/ref/fate/h264-conformance-cabac_mot_mbaff0_full
> +++ b/tests/ref/fate/h264-conformance-cabac_mot_mbaff0_full
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x8336b7db
>  0,          1,          1,        1,   518400, 0x9818c309
>  0,          2,          2,        1,   518400, 0x5417b6f9
> diff --git a/tests/ref/fate/h264-conformance-cabac_mot_picaff0_full b/tests/ref/fate/h264-conformance-cabac_mot_picaff0_full
> index 484025e..5651e4b 100644
> --- a/tests/ref/fate/h264-conformance-cabac_mot_picaff0_full
> +++ b/tests/ref/fate/h264-conformance-cabac_mot_picaff0_full
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0xd8b58a23
>  0,          1,          1,        1,   518400, 0xe53b4aba
>  0,          2,          2,        1,   518400, 0x6cbca47a
> diff --git a/tests/ref/fate/h264-conformance-cabaci3_sony_b b/tests/ref/fate/h264-conformance-cabaci3_sony_b
> index 9dc4884..bcfce03 100644
> --- a/tests/ref/fate/h264-conformance-cabaci3_sony_b
> +++ b/tests/ref/fate/h264-conformance-cabaci3_sony_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x705f2f41
>  0,          1,          1,        1,    38016, 0xa76d1766
>  0,          2,          2,        1,    38016, 0xf367e6f4
> diff --git a/tests/ref/fate/h264-conformance-cabast3_sony_e b/tests/ref/fate/h264-conformance-cabast3_sony_e
> index 00519ef..38da464 100644
> --- a/tests/ref/fate/h264-conformance-cabast3_sony_e
> +++ b/tests/ref/fate/h264-conformance-cabast3_sony_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x96ebb3a2
>  0,          1,          1,        1,   152064, 0x5184d912
>  0,          2,          2,        1,   152064, 0xfa0c9abe
> diff --git a/tests/ref/fate/h264-conformance-cabastbr3_sony_b b/tests/ref/fate/h264-conformance-cabastbr3_sony_b
> index 765f53f..0a35250 100644
> --- a/tests/ref/fate/h264-conformance-cabastbr3_sony_b
> +++ b/tests/ref/fate/h264-conformance-cabastbr3_sony_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x96ebb3a2
>  0,          1,          1,        1,   152064, 0x5184d912
>  0,          2,          2,        1,   152064, 0xb7b5ba68
> diff --git a/tests/ref/fate/h264-conformance-cabref3_sand_d b/tests/ref/fate/h264-conformance-cabref3_sand_d
> index 9e555f6..d5cd445 100644
> --- a/tests/ref/fate/h264-conformance-cabref3_sand_d
> +++ b/tests/ref/fate/h264-conformance-cabref3_sand_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x2061bbd0
>  0,          1,          1,        1,   152064, 0x41adb750
>  0,          2,          2,        1,   152064, 0x6e889e90
> diff --git a/tests/ref/fate/h264-conformance-cacqp3_sony_d b/tests/ref/fate/h264-conformance-cacqp3_sony_d
> index c368529..788a0a5 100644
> --- a/tests/ref/fate/h264-conformance-cacqp3_sony_d
> +++ b/tests/ref/fate/h264-conformance-cacqp3_sony_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x295a375c
>  0,          1,          1,        1,    38016, 0xd0da1f37
>  0,          2,          2,        1,    38016, 0x0e5ed514
> diff --git a/tests/ref/fate/h264-conformance-cafi1_sva_c b/tests/ref/fate/h264-conformance-cafi1_sva_c
> index 180adf1..11d958f 100644
> --- a/tests/ref/fate/h264-conformance-cafi1_sva_c
> +++ b/tests/ref/fate/h264-conformance-cafi1_sva_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x47bd73fa
>  0,          1,          1,        1,   518400, 0xfe3ea7cc
>  0,          2,          2,        1,   518400, 0x9bc549ae
> diff --git a/tests/ref/fate/h264-conformance-cama1_sony_c b/tests/ref/fate/h264-conformance-cama1_sony_c
> index 6685216..9a29e30 100644
> --- a/tests/ref/fate/h264-conformance-cama1_sony_c
> +++ b/tests/ref/fate/h264-conformance-cama1_sony_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x75701511
>  0,          1,          1,        1,   518400, 0xa7eeaa16
>  0,          2,          2,        1,   518400, 0xe0f32e35
> diff --git a/tests/ref/fate/h264-conformance-cama1_toshiba_b b/tests/ref/fate/h264-conformance-cama1_toshiba_b
> index ab2da4a..6e854f2 100644
> --- a/tests/ref/fate/h264-conformance-cama1_toshiba_b
> +++ b/tests/ref/fate/h264-conformance-cama1_toshiba_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x9a9ce366
>  0,          1,          1,        1,   152064, 0xf4639828
>  0,          2,          2,        1,   152064, 0x625024a3
> diff --git a/tests/ref/fate/h264-conformance-cama1_vtc_c b/tests/ref/fate/h264-conformance-cama1_vtc_c
> index eeb66b0..bb86304 100644
> --- a/tests/ref/fate/h264-conformance-cama1_vtc_c
> +++ b/tests/ref/fate/h264-conformance-cama1_vtc_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x41c2ce17
>  0,          1,          1,        1,   518400, 0x39f217da
>  0,          2,          2,        1,   518400, 0x5a108db9
> diff --git a/tests/ref/fate/h264-conformance-cama2_vtc_b b/tests/ref/fate/h264-conformance-cama2_vtc_b
> index 0dfe6a9..c5c58a6 100644
> --- a/tests/ref/fate/h264-conformance-cama2_vtc_b
> +++ b/tests/ref/fate/h264-conformance-cama2_vtc_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 0/1
>  0,          0,          0,        1,   622080, 0x004bb93f
>  0,          1,          1,        1,   622080, 0xe70e193c
>  0,          2,          2,        1,   622080, 0xd394cf17
> diff --git a/tests/ref/fate/h264-conformance-cama3_sand_e b/tests/ref/fate/h264-conformance-cama3_sand_e
> index f89bc40..e1e9784 100644
> --- a/tests/ref/fate/h264-conformance-cama3_sand_e
> +++ b/tests/ref/fate/h264-conformance-cama3_sand_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xf772f152
>  0,          1,          1,        1,   152064, 0x7c501772
>  0,          2,          2,        1,   152064, 0x98ed0a07
> diff --git a/tests/ref/fate/h264-conformance-cama3_vtc_b b/tests/ref/fate/h264-conformance-cama3_vtc_b
> index 46821c1..288ddd1 100644
> --- a/tests/ref/fate/h264-conformance-cama3_vtc_b
> +++ b/tests/ref/fate/h264-conformance-cama3_vtc_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 0/1
>  0,          0,          0,        1,   622080, 0xf3f0bf86
>  0,          1,          1,        1,   622080, 0x6aaf3d42
>  0,          2,          2,        1,   622080, 0xe53bcd5d
> diff --git a/tests/ref/fate/h264-conformance-camaci3_sony_c b/tests/ref/fate/h264-conformance-camaci3_sony_c
> index 5896460..9d75d00 100644
> --- a/tests/ref/fate/h264-conformance-camaci3_sony_c
> +++ b/tests/ref/fate/h264-conformance-camaci3_sony_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 192x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    36864, 0x9b5dcf28
>  0,          1,          1,        1,    36864, 0xb13d4fee
>  0,          2,          2,        1,    36864, 0x11c512ac
> diff --git a/tests/ref/fate/h264-conformance-camanl1_toshiba_b b/tests/ref/fate/h264-conformance-camanl1_toshiba_b
> index 2c3c557..a62f917 100644
> --- a/tests/ref/fate/h264-conformance-camanl1_toshiba_b
> +++ b/tests/ref/fate/h264-conformance-camanl1_toshiba_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xb1edd842
>  0,          1,          1,        1,   152064, 0x551f8f45
>  0,          2,          2,        1,   152064, 0xb4931cb2
> diff --git a/tests/ref/fate/h264-conformance-camanl2_toshiba_b b/tests/ref/fate/h264-conformance-camanl2_toshiba_b
> index 066c57f..6a2f321 100644
> --- a/tests/ref/fate/h264-conformance-camanl2_toshiba_b
> +++ b/tests/ref/fate/h264-conformance-camanl2_toshiba_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xb1edd842
>  0,          1,          1,        1,   152064, 0x551f8f45
>  0,          2,          2,        1,   152064, 0xb4931cb2
> diff --git a/tests/ref/fate/h264-conformance-camanl3_sand_e b/tests/ref/fate/h264-conformance-camanl3_sand_e
> index a76170c..901e4d0 100644
> --- a/tests/ref/fate/h264-conformance-camanl3_sand_e
> +++ b/tests/ref/fate/h264-conformance-camanl3_sand_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x6c1ff6a7
>  0,          1,          1,        1,   152064, 0x17f1ff3a
>  0,          2,          2,        1,   152064, 0xf7ddcda8
> diff --git a/tests/ref/fate/h264-conformance-camasl3_sony_b b/tests/ref/fate/h264-conformance-camasl3_sony_b
> index 0cb41e1..5bb38ab 100644
> --- a/tests/ref/fate/h264-conformance-camasl3_sony_b
> +++ b/tests/ref/fate/h264-conformance-camasl3_sony_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 192x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    36864, 0xfe2ad849
>  0,          1,          1,        1,    36864, 0x37954ba1
>  0,          2,          2,        1,    36864, 0xaf0e0877
> diff --git a/tests/ref/fate/h264-conformance-camp_mot_mbaff_l30 b/tests/ref/fate/h264-conformance-camp_mot_mbaff_l30
> index c4f2782..ab02c2b 100644
> --- a/tests/ref/fate/h264-conformance-camp_mot_mbaff_l30
> +++ b/tests/ref/fate/h264-conformance-camp_mot_mbaff_l30
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x672279df
>  0,          1,          1,        1,   518400, 0xb248a762
>  0,          2,          2,        1,   518400, 0x4399de88
> diff --git a/tests/ref/fate/h264-conformance-camp_mot_mbaff_l31 b/tests/ref/fate/h264-conformance-camp_mot_mbaff_l31
> index 1bee037..dc82250 100644
> --- a/tests/ref/fate/h264-conformance-camp_mot_mbaff_l31
> +++ b/tests/ref/fate/h264-conformance-camp_mot_mbaff_l31
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x077637bf
>  0,          1,          1,        1,   518400, 0xbd096d55
>  0,          2,          2,        1,   518400, 0x58b58820
> diff --git a/tests/ref/fate/h264-conformance-canl1_sony_e b/tests/ref/fate/h264-conformance-canl1_sony_e
> index d90e957..849ccef 100644
> --- a/tests/ref/fate/h264-conformance-canl1_sony_e
> +++ b/tests/ref/fate/h264-conformance-canl1_sony_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xc805351d
>  0,          1,          1,        1,    38016, 0x3809fec3
>  0,          2,          2,        1,    38016, 0xf698ce3c
> diff --git a/tests/ref/fate/h264-conformance-canl1_sva_b b/tests/ref/fate/h264-conformance-canl1_sva_b
> index 0436f43..42ed8d7 100644
> --- a/tests/ref/fate/h264-conformance-canl1_sva_b
> +++ b/tests/ref/fate/h264-conformance-canl1_sva_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x0bd22424
>  0,          1,          1,        1,    38016, 0x4eb601f0
>  0,          2,          2,        1,    38016, 0xe16de459
> diff --git a/tests/ref/fate/h264-conformance-canl1_toshiba_g b/tests/ref/fate/h264-conformance-canl1_toshiba_g
> index ced4c92..73e6b7e 100644
> --- a/tests/ref/fate/h264-conformance-canl1_toshiba_g
> +++ b/tests/ref/fate/h264-conformance-canl1_toshiba_g
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x58892149
>  0,          1,          1,        1,    38016, 0xda2ded74
>  0,          2,          2,        1,    38016, 0x2661cdb0
> diff --git a/tests/ref/fate/h264-conformance-canl2_sony_e b/tests/ref/fate/h264-conformance-canl2_sony_e
> index 9a3b48f..567e35f 100644
> --- a/tests/ref/fate/h264-conformance-canl2_sony_e
> +++ b/tests/ref/fate/h264-conformance-canl2_sony_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xc805351d
>  0,          1,          1,        1,    38016, 0x3017107e
>  0,          2,          2,        1,    38016, 0xe172e2d2
> diff --git a/tests/ref/fate/h264-conformance-canl2_sva_b b/tests/ref/fate/h264-conformance-canl2_sva_b
> index 0436f43..42ed8d7 100644
> --- a/tests/ref/fate/h264-conformance-canl2_sva_b
> +++ b/tests/ref/fate/h264-conformance-canl2_sva_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x0bd22424
>  0,          1,          1,        1,    38016, 0x4eb601f0
>  0,          2,          2,        1,    38016, 0xe16de459
> diff --git a/tests/ref/fate/h264-conformance-canl3_sony_c b/tests/ref/fate/h264-conformance-canl3_sony_c
> index 2e726cf..80d8029 100644
> --- a/tests/ref/fate/h264-conformance-canl3_sony_c
> +++ b/tests/ref/fate/h264-conformance-canl3_sony_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xc805351d
>  0,          1,          1,        1,    38016, 0xa0b41fef
>  0,          2,          2,        1,    38016, 0x965cf070
> diff --git a/tests/ref/fate/h264-conformance-canl3_sva_b b/tests/ref/fate/h264-conformance-canl3_sva_b
> index dd56a43..775550a 100644
> --- a/tests/ref/fate/h264-conformance-canl3_sva_b
> +++ b/tests/ref/fate/h264-conformance-canl3_sva_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x0bd22424
>  0,          1,          1,        1,    38016, 0xc45d1947
>  0,          2,          2,        1,    38016, 0x9d3d1218
> diff --git a/tests/ref/fate/h264-conformance-canl4_sva_b b/tests/ref/fate/h264-conformance-canl4_sva_b
> index a9a2dd3..9945b0b 100644
> --- a/tests/ref/fate/h264-conformance-canl4_sva_b
> +++ b/tests/ref/fate/h264-conformance-canl4_sva_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x5d9514e3
>  0,          1,          1,        1,    38016, 0xf5e8155c
>  0,          2,          2,        1,    38016, 0xc0a5f88b
> diff --git a/tests/ref/fate/h264-conformance-canlma2_sony_c b/tests/ref/fate/h264-conformance-canlma2_sony_c
> index b6a759a..ba3e6bd 100644
> --- a/tests/ref/fate/h264-conformance-canlma2_sony_c
> +++ b/tests/ref/fate/h264-conformance-canlma2_sony_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0xfbca00c6
>  0,          1,          1,        1,   518400, 0x82b80adf
>  0,          2,          2,        1,   518400, 0x87ecdf4a
> diff --git a/tests/ref/fate/h264-conformance-canlma3_sony_c b/tests/ref/fate/h264-conformance-canlma3_sony_c
> index 87ce786..57dda52 100644
> --- a/tests/ref/fate/h264-conformance-canlma3_sony_c
> +++ b/tests/ref/fate/h264-conformance-canlma3_sony_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0xfbca00c6
>  0,          1,          1,        1,   518400, 0x82b80adf
>  0,          2,          2,        1,   518400, 0x4874c24c
> diff --git a/tests/ref/fate/h264-conformance-capa1_toshiba_b b/tests/ref/fate/h264-conformance-capa1_toshiba_b
> index a0336f8..c88dc54 100644
> --- a/tests/ref/fate/h264-conformance-capa1_toshiba_b
> +++ b/tests/ref/fate/h264-conformance-capa1_toshiba_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x4040d2fc
>  0,          1,          1,        1,   152064, 0x0d8f9897
>  0,          2,          2,        1,   152064, 0xc23321cd
> diff --git a/tests/ref/fate/h264-conformance-capama3_sand_f b/tests/ref/fate/h264-conformance-capama3_sand_f
> index b621b81..b847b9a 100644
> --- a/tests/ref/fate/h264-conformance-capama3_sand_f
> +++ b/tests/ref/fate/h264-conformance-capama3_sand_f
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xf772f152
>  0,          1,          1,        1,   152064, 0xc416d300
>  0,          2,          2,        1,   152064, 0xc2275c94
> diff --git a/tests/ref/fate/h264-conformance-capcm1_sand_e b/tests/ref/fate/h264-conformance-capcm1_sand_e
> index 392e8b4..2987c74 100644
> --- a/tests/ref/fate/h264-conformance-capcm1_sand_e
> +++ b/tests/ref/fate/h264-conformance-capcm1_sand_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x9989b588
>  0,          1,          1,        1,   152064, 0x7cbf85d4
>  0,          2,          2,        1,   152064, 0x72615cf1
> diff --git a/tests/ref/fate/h264-conformance-capcmnl1_sand_e b/tests/ref/fate/h264-conformance-capcmnl1_sand_e
> index baee0ae..d738158 100644
> --- a/tests/ref/fate/h264-conformance-capcmnl1_sand_e
> +++ b/tests/ref/fate/h264-conformance-capcmnl1_sand_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xf973b384
>  0,          1,          1,        1,   152064, 0x84418532
>  0,          2,          2,        1,   152064, 0x63165bc0
> diff --git a/tests/ref/fate/h264-conformance-capm3_sony_d b/tests/ref/fate/h264-conformance-capm3_sony_d
> index ab2b280..72f1e35 100644
> --- a/tests/ref/fate/h264-conformance-capm3_sony_d
> +++ b/tests/ref/fate/h264-conformance-capm3_sony_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xa3b72d2f
>  0,          1,          1,        1,    38016, 0x77d918ae
>  0,          2,          2,        1,    38016, 0x181ad684
> diff --git a/tests/ref/fate/h264-conformance-caqp1_sony_b b/tests/ref/fate/h264-conformance-caqp1_sony_b
> index beca1c5..874d6eb 100644
> --- a/tests/ref/fate/h264-conformance-caqp1_sony_b
> +++ b/tests/ref/fate/h264-conformance-caqp1_sony_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x25f92b0e
>  0,          1,          1,        1,    38016, 0x2ecbe752
>  0,          2,          2,        1,    38016, 0x3432e744
> diff --git a/tests/ref/fate/h264-conformance-cavlc_mot_fld0_full_b b/tests/ref/fate/h264-conformance-cavlc_mot_fld0_full_b
> index f80c3be..0ee9a39 100644
> --- a/tests/ref/fate/h264-conformance-cavlc_mot_fld0_full_b
> +++ b/tests/ref/fate/h264-conformance-cavlc_mot_fld0_full_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x99d0df36
>  0,          1,          1,        1,   518400, 0xa8601c1a
>  0,          2,          2,        1,   518400, 0x4a17d235
> diff --git a/tests/ref/fate/h264-conformance-cavlc_mot_frm0_full_b b/tests/ref/fate/h264-conformance-cavlc_mot_frm0_full_b
> index edee4bf..611ffcd 100644
> --- a/tests/ref/fate/h264-conformance-cavlc_mot_frm0_full_b
> +++ b/tests/ref/fate/h264-conformance-cavlc_mot_frm0_full_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x21baedbf
>  0,          1,          1,        1,   518400, 0x6003273c
>  0,          2,          2,        1,   518400, 0x935d45d7
> diff --git a/tests/ref/fate/h264-conformance-cavlc_mot_mbaff0_full_b b/tests/ref/fate/h264-conformance-cavlc_mot_mbaff0_full_b
> index 7d3ae3e..5915f98 100644
> --- a/tests/ref/fate/h264-conformance-cavlc_mot_mbaff0_full_b
> +++ b/tests/ref/fate/h264-conformance-cavlc_mot_mbaff0_full_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x4cecc821
>  0,          1,          1,        1,   518400, 0xee49ea81
>  0,          2,          2,        1,   518400, 0x78b0d65f
> diff --git a/tests/ref/fate/h264-conformance-cavlc_mot_picaff0_full_b b/tests/ref/fate/h264-conformance-cavlc_mot_picaff0_full_b
> index ed5e02e..c0f6a5e 100644
> --- a/tests/ref/fate/h264-conformance-cavlc_mot_picaff0_full_b
> +++ b/tests/ref/fate/h264-conformance-cavlc_mot_picaff0_full_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0xf6b83a0e
>  0,          1,          1,        1,   518400, 0xc5e8b8ee
>  0,          2,          2,        1,   518400, 0xb3bc6e43
> diff --git a/tests/ref/fate/h264-conformance-cawp1_toshiba_e b/tests/ref/fate/h264-conformance-cawp1_toshiba_e
> index e5a6944..111b228 100644
> --- a/tests/ref/fate/h264-conformance-cawp1_toshiba_e
> +++ b/tests/ref/fate/h264-conformance-cawp1_toshiba_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xabf9ae05
>  0,          1,          1,        1,   152064, 0x20418b16
>  0,          2,          2,        1,   152064, 0xc26760ae
> diff --git a/tests/ref/fate/h264-conformance-cawp5_toshiba_e b/tests/ref/fate/h264-conformance-cawp5_toshiba_e
> index 5b48f8f..2b055c2 100644
> --- a/tests/ref/fate/h264-conformance-cawp5_toshiba_e
> +++ b/tests/ref/fate/h264-conformance-cawp5_toshiba_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xabf9ae05
>  0,          1,          1,        1,   152064, 0x20418b16
>  0,          2,          2,        1,   152064, 0x20f72775
> diff --git a/tests/ref/fate/h264-conformance-ci1_ft_b b/tests/ref/fate/h264-conformance-ci1_ft_b
> index 08e40f4..650d5b5 100644
> --- a/tests/ref/fate/h264-conformance-ci1_ft_b
> +++ b/tests/ref/fate/h264-conformance-ci1_ft_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xb291a678
>  0,          1,          1,        1,   152064, 0x913c5a5d
>  0,          2,          2,        1,   152064, 0x9558a372
> diff --git a/tests/ref/fate/h264-conformance-ci_mw_d b/tests/ref/fate/h264-conformance-ci_mw_d
> index 7b5a7dc..275affa 100644
> --- a/tests/ref/fate/h264-conformance-ci_mw_d
> +++ b/tests/ref/fate/h264-conformance-ci_mw_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x3ae838ee
>  0,          1,          1,        1,    38016, 0x8523e136
>  0,          2,          2,        1,    38016, 0xcffc99dd
> diff --git a/tests/ref/fate/h264-conformance-cvbs3_sony_c b/tests/ref/fate/h264-conformance-cvbs3_sony_c
> index ad7485a..7c3ec26 100644
> --- a/tests/ref/fate/h264-conformance-cvbs3_sony_c
> +++ b/tests/ref/fate/h264-conformance-cvbs3_sony_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xb3883478
>  0,          1,          1,        1,    38016, 0xddf01d9d
>  0,          2,          2,        1,    38016, 0xb177ece2
> diff --git a/tests/ref/fate/h264-conformance-cvcanlma2_sony_c b/tests/ref/fate/h264-conformance-cvcanlma2_sony_c
> index b6a759a..ba3e6bd 100644
> --- a/tests/ref/fate/h264-conformance-cvcanlma2_sony_c
> +++ b/tests/ref/fate/h264-conformance-cvcanlma2_sony_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0xfbca00c6
>  0,          1,          1,        1,   518400, 0x82b80adf
>  0,          2,          2,        1,   518400, 0x87ecdf4a
> diff --git a/tests/ref/fate/h264-conformance-cvfc1_sony_c b/tests/ref/fate/h264-conformance-cvfc1_sony_c
> index 1abe67f..541432d 100644
> --- a/tests/ref/fate/h264-conformance-cvfc1_sony_c
> +++ b/tests/ref/fate/h264-conformance-cvfc1_sony_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 300x168
> +#sar 0: 0/1
>  0,          0,          0,        1,    75600, 0x6f6a8c48
>  0,          1,          1,        1,    75600, 0x4b7ac558
>  0,          2,          2,        1,    75600, 0x907feda3
> diff --git a/tests/ref/fate/h264-conformance-cvfi1_sony_d b/tests/ref/fate/h264-conformance-cvfi1_sony_d
> index 195c7d6..bf998bc 100644
> --- a/tests/ref/fate/h264-conformance-cvfi1_sony_d
> +++ b/tests/ref/fate/h264-conformance-cvfi1_sony_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0xd9444d71
>  0,          1,          1,        1,   518400, 0x5d8928cd
>  0,          2,          2,        1,   518400, 0xea5bc08b
> diff --git a/tests/ref/fate/h264-conformance-cvfi1_sva_c b/tests/ref/fate/h264-conformance-cvfi1_sva_c
> index c19bc0d..5562884 100644
> --- a/tests/ref/fate/h264-conformance-cvfi1_sva_c
> +++ b/tests/ref/fate/h264-conformance-cvfi1_sva_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x8f022263
>  0,          1,          1,        1,   518400, 0x02692654
>  0,          2,          2,        1,   518400, 0x55eff579
> diff --git a/tests/ref/fate/h264-conformance-cvfi2_sony_h b/tests/ref/fate/h264-conformance-cvfi2_sony_h
> index 0914e22..deb9b38 100644
> --- a/tests/ref/fate/h264-conformance-cvfi2_sony_h
> +++ b/tests/ref/fate/h264-conformance-cvfi2_sony_h
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0xd9444d71
>  0,          1,          1,        1,   518400, 0x491faf75
>  0,          2,          2,        1,   518400, 0xf8b4d15c
> diff --git a/tests/ref/fate/h264-conformance-cvfi2_sva_c b/tests/ref/fate/h264-conformance-cvfi2_sva_c
> index 7c3162a..e2a0b6d 100644
> --- a/tests/ref/fate/h264-conformance-cvfi2_sva_c
> +++ b/tests/ref/fate/h264-conformance-cvfi2_sva_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x4073cc0b
>  0,          1,          1,        1,   518400, 0x5f599a48
>  0,          2,          2,        1,   518400, 0xc6fe555a
> diff --git a/tests/ref/fate/h264-conformance-cvma1_sony_d b/tests/ref/fate/h264-conformance-cvma1_sony_d
> index 6685216..9a29e30 100644
> --- a/tests/ref/fate/h264-conformance-cvma1_sony_d
> +++ b/tests/ref/fate/h264-conformance-cvma1_sony_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x75701511
>  0,          1,          1,        1,   518400, 0xa7eeaa16
>  0,          2,          2,        1,   518400, 0xe0f32e35
> diff --git a/tests/ref/fate/h264-conformance-cvma1_toshiba_b b/tests/ref/fate/h264-conformance-cvma1_toshiba_b
> index ab2da4a..6e854f2 100644
> --- a/tests/ref/fate/h264-conformance-cvma1_toshiba_b
> +++ b/tests/ref/fate/h264-conformance-cvma1_toshiba_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x9a9ce366
>  0,          1,          1,        1,   152064, 0xf4639828
>  0,          2,          2,        1,   152064, 0x625024a3
> diff --git a/tests/ref/fate/h264-conformance-cvmanl1_toshiba_b b/tests/ref/fate/h264-conformance-cvmanl1_toshiba_b
> index 2c3c557..a62f917 100644
> --- a/tests/ref/fate/h264-conformance-cvmanl1_toshiba_b
> +++ b/tests/ref/fate/h264-conformance-cvmanl1_toshiba_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xb1edd842
>  0,          1,          1,        1,   152064, 0x551f8f45
>  0,          2,          2,        1,   152064, 0xb4931cb2
> diff --git a/tests/ref/fate/h264-conformance-cvmanl2_toshiba_b b/tests/ref/fate/h264-conformance-cvmanl2_toshiba_b
> index 066c57f..6a2f321 100644
> --- a/tests/ref/fate/h264-conformance-cvmanl2_toshiba_b
> +++ b/tests/ref/fate/h264-conformance-cvmanl2_toshiba_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xb1edd842
>  0,          1,          1,        1,   152064, 0x551f8f45
>  0,          2,          2,        1,   152064, 0xb4931cb2
> diff --git a/tests/ref/fate/h264-conformance-cvmapaqp3_sony_e b/tests/ref/fate/h264-conformance-cvmapaqp3_sony_e
> index 094fc98..8cc81e6 100644
> --- a/tests/ref/fate/h264-conformance-cvmapaqp3_sony_e
> +++ b/tests/ref/fate/h264-conformance-cvmapaqp3_sony_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x80dffda2
>  0,          1,          1,        1,   518400, 0x9450183b
>  0,          2,          2,        1,   518400, 0x85d429a7
> diff --git a/tests/ref/fate/h264-conformance-cvmaqp2_sony_g b/tests/ref/fate/h264-conformance-cvmaqp2_sony_g
> index 886ea4c..a7f3e29 100644
> --- a/tests/ref/fate/h264-conformance-cvmaqp2_sony_g
> +++ b/tests/ref/fate/h264-conformance-cvmaqp2_sony_g
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 192x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    36864, 0xdee3d4e3
>  0,          1,          1,        1,    36864, 0xaa1a67ca
>  0,          2,          2,        1,    36864, 0xe00e0dec
> diff --git a/tests/ref/fate/h264-conformance-cvmaqp3_sony_d b/tests/ref/fate/h264-conformance-cvmaqp3_sony_d
> index 7c3d96d..073422c 100644
> --- a/tests/ref/fate/h264-conformance-cvmaqp3_sony_d
> +++ b/tests/ref/fate/h264-conformance-cvmaqp3_sony_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 192x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    36864, 0xdee3d4e3
>  0,          1,          1,        1,    36864, 0xabec8d44
>  0,          2,          2,        1,    36864, 0x95d029fe
> diff --git a/tests/ref/fate/h264-conformance-cvmp_mot_fld_l30_b b/tests/ref/fate/h264-conformance-cvmp_mot_fld_l30_b
> index 57fa2f7..94d4dff 100644
> --- a/tests/ref/fate/h264-conformance-cvmp_mot_fld_l30_b
> +++ b/tests/ref/fate/h264-conformance-cvmp_mot_fld_l30_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0xe9c7643e
>  0,          1,          1,        1,   518400, 0xba7456ec
>  0,          2,          2,        1,   518400, 0xdeb96749
> diff --git a/tests/ref/fate/h264-conformance-cvmp_mot_frm_l31_b b/tests/ref/fate/h264-conformance-cvmp_mot_frm_l31_b
> index bc7e81e..fc6b1b7 100644
> --- a/tests/ref/fate/h264-conformance-cvmp_mot_frm_l31_b
> +++ b/tests/ref/fate/h264-conformance-cvmp_mot_frm_l31_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x7b2475e3
>  0,          1,          1,        1,   518400, 0xda786a87
>  0,          2,          2,        1,   518400, 0xb1dd8108
> diff --git a/tests/ref/fate/h264-conformance-cvnlfi1_sony_c b/tests/ref/fate/h264-conformance-cvnlfi1_sony_c
> index aa3c220..02a6b53 100644
> --- a/tests/ref/fate/h264-conformance-cvnlfi1_sony_c
> +++ b/tests/ref/fate/h264-conformance-cvnlfi1_sony_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x0fbb4e71
>  0,          1,          1,        1,   518400, 0x4b816734
>  0,          2,          2,        1,   518400, 0x0c350f19
> diff --git a/tests/ref/fate/h264-conformance-cvnlfi2_sony_h b/tests/ref/fate/h264-conformance-cvnlfi2_sony_h
> index fe2e4d1..c7128ba 100644
> --- a/tests/ref/fate/h264-conformance-cvnlfi2_sony_h
> +++ b/tests/ref/fate/h264-conformance-cvnlfi2_sony_h
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x0fbb4e71
>  0,          1,          1,        1,   518400, 0xc46bec04
>  0,          2,          2,        1,   518400, 0xc50ffc1d
> diff --git a/tests/ref/fate/h264-conformance-cvpa1_toshiba_b b/tests/ref/fate/h264-conformance-cvpa1_toshiba_b
> index fd0911b..6bf9ee3 100644
> --- a/tests/ref/fate/h264-conformance-cvpa1_toshiba_b
> +++ b/tests/ref/fate/h264-conformance-cvpa1_toshiba_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x128cd77a
>  0,          1,          1,        1,   152064, 0x565b9fc1
>  0,          2,          2,        1,   152064, 0xbe322679
> diff --git a/tests/ref/fate/h264-conformance-cvpcmnl1_sva_c b/tests/ref/fate/h264-conformance-cvpcmnl1_sva_c
> index 95c9903..528d2a5 100644
> --- a/tests/ref/fate/h264-conformance-cvpcmnl1_sva_c
> +++ b/tests/ref/fate/h264-conformance-cvpcmnl1_sva_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x19b8407d
>  0,          1,          1,        1,   152064, 0xab8bede6
>  0,          2,          2,        1,   152064, 0xf59acd09
> diff --git a/tests/ref/fate/h264-conformance-cvpcmnl2_sva_c b/tests/ref/fate/h264-conformance-cvpcmnl2_sva_c
> index 4f92eab..0303bc2 100644
> --- a/tests/ref/fate/h264-conformance-cvpcmnl2_sva_c
> +++ b/tests/ref/fate/h264-conformance-cvpcmnl2_sva_c
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  1382400, 0xccbe6bf8
>  0,          1,          1,        1,  1382400, 0x49c0cfd7
> diff --git a/tests/ref/fate/h264-conformance-cvwp1_toshiba_e b/tests/ref/fate/h264-conformance-cvwp1_toshiba_e
> index b184c84..e7e6ec3 100644
> --- a/tests/ref/fate/h264-conformance-cvwp1_toshiba_e
> +++ b/tests/ref/fate/h264-conformance-cvwp1_toshiba_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xabf9ae05
>  0,          1,          1,        1,   152064, 0x20418b16
>  0,          2,          2,        1,   152064, 0xe941572f
> diff --git a/tests/ref/fate/h264-conformance-cvwp2_toshiba_e b/tests/ref/fate/h264-conformance-cvwp2_toshiba_e
> index 627f4b8..cd93fbc 100644
> --- a/tests/ref/fate/h264-conformance-cvwp2_toshiba_e
> +++ b/tests/ref/fate/h264-conformance-cvwp2_toshiba_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xf503fb79
>  0,          1,          1,        1,   152064, 0xeaa4ba5d
>  0,          2,          2,        1,   152064, 0x50865a33
> diff --git a/tests/ref/fate/h264-conformance-cvwp3_toshiba_e b/tests/ref/fate/h264-conformance-cvwp3_toshiba_e
> index ca3b7b8..285892e 100644
> --- a/tests/ref/fate/h264-conformance-cvwp3_toshiba_e
> +++ b/tests/ref/fate/h264-conformance-cvwp3_toshiba_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x3b3ffd31
>  0,          1,          1,        1,   152064, 0x14e0b899
>  0,          2,          2,        1,   152064, 0x50865a33
> diff --git a/tests/ref/fate/h264-conformance-cvwp5_toshiba_e b/tests/ref/fate/h264-conformance-cvwp5_toshiba_e
> index 5b48f8f..2b055c2 100644
> --- a/tests/ref/fate/h264-conformance-cvwp5_toshiba_e
> +++ b/tests/ref/fate/h264-conformance-cvwp5_toshiba_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xabf9ae05
>  0,          1,          1,        1,   152064, 0x20418b16
>  0,          2,          2,        1,   152064, 0x20f72775
> diff --git a/tests/ref/fate/h264-conformance-fi1_sony_e b/tests/ref/fate/h264-conformance-fi1_sony_e
> index 6b5e0db..c483066 100644
> --- a/tests/ref/fate/h264-conformance-fi1_sony_e
> +++ b/tests/ref/fate/h264-conformance-fi1_sony_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 192x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    36864, 0x3d54d3e3
>  0,          1,          1,        1,    36864, 0xa9573ef0
>  0,          2,          2,        1,    36864, 0x0ea5f263
> diff --git a/tests/ref/fate/h264-conformance-frext-alphaconformanceg b/tests/ref/fate/h264-conformance-frext-alphaconformanceg
> index dee1c42..1e894cf 100644
> --- a/tests/ref/fate/h264-conformance-frext-alphaconformanceg
> +++ b/tests/ref/fate/h264-conformance-frext-alphaconformanceg
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 960x544
> +#sar 0: 0/1
>  0,          0,          0,        1,   783360, 0xbc458a9a
>  0,          1,          1,        1,   783360, 0xc2b4a765
>  0,          2,          2,        1,   783360, 0x40a8ca87
> diff --git a/tests/ref/fate/h264-conformance-frext-bcrm_freh10 b/tests/ref/fate/h264-conformance-frext-bcrm_freh10
> index 272a4aa..7592f6c 100644
> --- a/tests/ref/fate/h264-conformance-frext-bcrm_freh10
> +++ b/tests/ref/fate/h264-conformance-frext-bcrm_freh10
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xbdc2b880
>  0,          1,          1,        1,   152064, 0x4ebf93fe
>  0,          2,          2,        1,   152064, 0xe30d6871
> diff --git a/tests/ref/fate/h264-conformance-frext-brcm_freh11 b/tests/ref/fate/h264-conformance-frext-brcm_freh11
> index 3183c4d..5bb9aa4 100644
> --- a/tests/ref/fate/h264-conformance-frext-brcm_freh11
> +++ b/tests/ref/fate/h264-conformance-frext-brcm_freh11
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x9744ac59
>  0,          1,          1,        1,   152064, 0x3eba88bf
>  0,          2,          2,        1,   152064, 0xd4105c5a
> diff --git a/tests/ref/fate/h264-conformance-frext-brcm_freh3 b/tests/ref/fate/h264-conformance-frext-brcm_freh3
> index 9a40148..932354f 100644
> --- a/tests/ref/fate/h264-conformance-frext-brcm_freh3
> +++ b/tests/ref/fate/h264-conformance-frext-brcm_freh3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x9f9caf3c
>  0,          1,          1,        1,   152064, 0x4e8e9dc4
>  0,          2,          2,        1,   152064, 0x7eab62be
> diff --git a/tests/ref/fate/h264-conformance-frext-brcm_freh4 b/tests/ref/fate/h264-conformance-frext-brcm_freh4
> index ad3a3ec..9898def 100644
> --- a/tests/ref/fate/h264-conformance-frext-brcm_freh4
> +++ b/tests/ref/fate/h264-conformance-frext-brcm_freh4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x9744ac59
>  0,          1,          1,        1,   152064, 0xe1c69d97
>  0,          2,          2,        1,   152064, 0x9ae85f93
> diff --git a/tests/ref/fate/h264-conformance-frext-brcm_freh5 b/tests/ref/fate/h264-conformance-frext-brcm_freh5
> index 9057c82..10ff8d0 100644
> --- a/tests/ref/fate/h264-conformance-frext-brcm_freh5
> +++ b/tests/ref/fate/h264-conformance-frext-brcm_freh5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xd816ae9a
>  0,          1,          1,        1,   152064, 0x970e9c33
>  0,          2,          2,        1,   152064, 0xbdd14635
> diff --git a/tests/ref/fate/h264-conformance-frext-brcm_freh8 b/tests/ref/fate/h264-conformance-frext-brcm_freh8
> index 4cc7f0e..552d5e8 100644
> --- a/tests/ref/fate/h264-conformance-frext-brcm_freh8
> +++ b/tests/ref/fate/h264-conformance-frext-brcm_freh8
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xdcc4ac76
>  0,          1,          1,        1,   152064, 0xfde6871a
>  0,          2,          2,        1,   152064, 0xe8a351b5
> diff --git a/tests/ref/fate/h264-conformance-frext-brcm_freh9 b/tests/ref/fate/h264-conformance-frext-brcm_freh9
> index 44d5d1a..7773710 100644
> --- a/tests/ref/fate/h264-conformance-frext-brcm_freh9
> +++ b/tests/ref/fate/h264-conformance-frext-brcm_freh9
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x9f9caf3c
>  0,          1,          1,        1,   152064, 0x68f285b1
>  0,          2,          2,        1,   152064, 0x28bd4987
> diff --git a/tests/ref/fate/h264-conformance-frext-freh12_b b/tests/ref/fate/h264-conformance-frext-freh12_b
> index 9455cc2..e32839f 100644
> --- a/tests/ref/fate/h264-conformance-frext-freh12_b
> +++ b/tests/ref/fate/h264-conformance-frext-freh12_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x9f9caf3c
>  0,          1,          1,        1,   152064, 0x0ff688a6
>  0,          2,          2,        1,   152064, 0x247d4215
> diff --git a/tests/ref/fate/h264-conformance-frext-freh1_b b/tests/ref/fate/h264-conformance-frext-freh1_b
> index c5c0b25..8bf4b58 100644
> --- a/tests/ref/fate/h264-conformance-frext-freh1_b
> +++ b/tests/ref/fate/h264-conformance-frext-freh1_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x42a3d9ce
>  0,          1,          1,        1,   152064, 0xa95cc2ed
>  0,          2,          2,        1,   152064, 0xc48f8fdc
> diff --git a/tests/ref/fate/h264-conformance-frext-freh2_b b/tests/ref/fate/h264-conformance-frext-freh2_b
> index ff12025..9ba128e 100644
> --- a/tests/ref/fate/h264-conformance-frext-freh2_b
> +++ b/tests/ref/fate/h264-conformance-frext-freh2_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x1668b41a
>  0,          1,          1,        1,   152064, 0x953ca7fb
>  0,          2,          2,        1,   152064, 0x3e38bc6e
> diff --git a/tests/ref/fate/h264-conformance-frext-freh6 b/tests/ref/fate/h264-conformance-frext-freh6
> index c769038..57ac261 100644
> --- a/tests/ref/fate/h264-conformance-frext-freh6
> +++ b/tests/ref/fate/h264-conformance-frext-freh6
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x3b21d6cd
>  0,          1,          1,        1,   152064, 0xc32088c6
>  0,          2,          2,        1,   152064, 0x65a64cee
> diff --git a/tests/ref/fate/h264-conformance-frext-freh7_b b/tests/ref/fate/h264-conformance-frext-freh7_b
> index 519c346..b078cf1 100644
> --- a/tests/ref/fate/h264-conformance-frext-freh7_b
> +++ b/tests/ref/fate/h264-conformance-frext-freh7_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x89f2e8d5
>  0,          1,          1,        1,   152064, 0x35b99397
>  0,          2,          2,        1,   152064, 0x6ef46744
> diff --git a/tests/ref/fate/h264-conformance-frext-frext01_jvc_d b/tests/ref/fate/h264-conformance-frext-frext01_jvc_d
> index b82151e..ac992a8 100644
> --- a/tests/ref/fate/h264-conformance-frext-frext01_jvc_d
> +++ b/tests/ref/fate/h264-conformance-frext-frext01_jvc_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x31bc935e
>  0,          1,          1,        1,   152064, 0x501ea92a
>  0,          2,          2,        1,   152064, 0x8b2f6ead
> diff --git a/tests/ref/fate/h264-conformance-frext-frext02_jvc_c b/tests/ref/fate/h264-conformance-frext-frext02_jvc_c
> index b82151e..ac992a8 100644
> --- a/tests/ref/fate/h264-conformance-frext-frext02_jvc_c
> +++ b/tests/ref/fate/h264-conformance-frext-frext02_jvc_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x31bc935e
>  0,          1,          1,        1,   152064, 0x501ea92a
>  0,          2,          2,        1,   152064, 0x8b2f6ead
> diff --git a/tests/ref/fate/h264-conformance-frext-frext1_panasonic_c b/tests/ref/fate/h264-conformance-frext-frext1_panasonic_c
> index 81748f7..7f3992d 100644
> --- a/tests/ref/fate/h264-conformance-frext-frext1_panasonic_c
> +++ b/tests/ref/fate/h264-conformance-frext-frext1_panasonic_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xf9c30518
>  0,          1,          1,        1,   152064, 0x509dd18f
>  0,          2,          2,        1,   152064, 0x7f5c8f07
> diff --git a/tests/ref/fate/h264-conformance-frext-frext2_panasonic_b b/tests/ref/fate/h264-conformance-frext-frext2_panasonic_b
> index 7c53b5c..76e4d26 100644
> --- a/tests/ref/fate/h264-conformance-frext-frext2_panasonic_b
> +++ b/tests/ref/fate/h264-conformance-frext-frext2_panasonic_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x0147a2a9
>  0,          1,          1,        1,   152064, 0xe2365351
>  0,          2,          2,        1,   152064, 0xb5f9daee
> diff --git a/tests/ref/fate/h264-conformance-frext-frext3_panasonic_d b/tests/ref/fate/h264-conformance-frext-frext3_panasonic_d
> index 71b743e..80ee19f 100644
> --- a/tests/ref/fate/h264-conformance-frext-frext3_panasonic_d
> +++ b/tests/ref/fate/h264-conformance-frext-frext3_panasonic_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xdd346292
>  0,          1,          1,        1,   152064, 0xb07e6efd
>  0,          2,          2,        1,   152064, 0x81b4d540
> diff --git a/tests/ref/fate/h264-conformance-frext-frext4_panasonic_a b/tests/ref/fate/h264-conformance-frext-frext4_panasonic_a
> index c0886e4..5640228 100644
> --- a/tests/ref/fate/h264-conformance-frext-frext4_panasonic_a
> +++ b/tests/ref/fate/h264-conformance-frext-frext4_panasonic_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xd604d440
>  0,          1,          1,        1,   152064, 0x08ef262c
>  0,          2,          2,        1,   152064, 0x992fca8e
> diff --git a/tests/ref/fate/h264-conformance-frext-frext_mmco4_sony_b b/tests/ref/fate/h264-conformance-frext-frext_mmco4_sony_b
> index a964a38..dc78378 100644
> --- a/tests/ref/fate/h264-conformance-frext-frext_mmco4_sony_b
> +++ b/tests/ref/fate/h264-conformance-frext-frext_mmco4_sony_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x24846654
>  0,          1,          1,        1,   152064, 0xd33945be
>  0,          2,          2,        1,   152064, 0x961cbbfb
> diff --git a/tests/ref/fate/h264-conformance-frext-hcaff1_hhi_b b/tests/ref/fate/h264-conformance-frext-hcaff1_hhi_b
> index eb41d46..67badb6 100644
> --- a/tests/ref/fate/h264-conformance-frext-hcaff1_hhi_b
> +++ b/tests/ref/fate/h264-conformance-frext-hcaff1_hhi_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xb055a9bd
>  0,          1,          1,        1,   152064, 0x9e1eadb6
>  0,          2,          2,        1,   152064, 0x48f117d2
> diff --git a/tests/ref/fate/h264-conformance-frext-hcafr1_hhi_c b/tests/ref/fate/h264-conformance-frext-hcafr1_hhi_c
> index 285f057..7035983 100644
> --- a/tests/ref/fate/h264-conformance-frext-hcafr1_hhi_c
> +++ b/tests/ref/fate/h264-conformance-frext-hcafr1_hhi_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xd48c87b3
>  0,          1,          1,        1,   152064, 0xb7a67f8f
>  0,          2,          2,        1,   152064, 0x3c3f3c11
> diff --git a/tests/ref/fate/h264-conformance-frext-hcafr2_hhi_a b/tests/ref/fate/h264-conformance-frext-hcafr2_hhi_a
> index 7149850..4bc95d9 100644
> --- a/tests/ref/fate/h264-conformance-frext-hcafr2_hhi_a
> +++ b/tests/ref/fate/h264-conformance-frext-hcafr2_hhi_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xd5448f0e
>  0,          1,          1,        1,   152064, 0x93d022ba
>  0,          2,          2,        1,   152064, 0x1eaed76e
> diff --git a/tests/ref/fate/h264-conformance-frext-hcafr3_hhi_a b/tests/ref/fate/h264-conformance-frext-hcafr3_hhi_a
> index 2ec9dce..4fc2d99 100644
> --- a/tests/ref/fate/h264-conformance-frext-hcafr3_hhi_a
> +++ b/tests/ref/fate/h264-conformance-frext-hcafr3_hhi_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xd5448f0e
>  0,          1,          1,        1,   152064, 0x665e33b5
>  0,          2,          2,        1,   152064, 0x6648e99d
> diff --git a/tests/ref/fate/h264-conformance-frext-hcafr4_hhi_a b/tests/ref/fate/h264-conformance-frext-hcafr4_hhi_a
> index 00af8ff..0814654 100644
> --- a/tests/ref/fate/h264-conformance-frext-hcafr4_hhi_a
> +++ b/tests/ref/fate/h264-conformance-frext-hcafr4_hhi_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xc7d8832d
>  0,          1,          1,        1,   152064, 0x8d9ffc59
>  0,          2,          2,        1,   152064, 0xaf3ea0d1
> diff --git a/tests/ref/fate/h264-conformance-frext-hcamff1_hhi_b b/tests/ref/fate/h264-conformance-frext-hcamff1_hhi_b
> index df85212..a56d7e2 100644
> --- a/tests/ref/fate/h264-conformance-frext-hcamff1_hhi_b
> +++ b/tests/ref/fate/h264-conformance-frext-hcamff1_hhi_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x18f494ec
>  0,          1,          1,        1,   152064, 0x7515e6d7
>  0,          2,          2,        1,   152064, 0xaa8ee665
> diff --git a/tests/ref/fate/h264-conformance-frext-hi422fr10_sony_b b/tests/ref/fate/h264-conformance-frext-hi422fr10_sony_b
> index 244e546..15dfc4b 100644
> --- a/tests/ref/fate/h264-conformance-frext-hi422fr10_sony_b
> +++ b/tests/ref/fate/h264-conformance-frext-hi422fr10_sony_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   202752, 0xffa1c502
>  0,          1,          1,        1,   202752, 0x51752f3c
>  0,          2,          2,        1,   202752, 0xe683991d
> diff --git a/tests/ref/fate/h264-conformance-frext-hi422fr13_sony_b b/tests/ref/fate/h264-conformance-frext-hi422fr13_sony_b
> index 016abbc..8758bf5 100644
> --- a/tests/ref/fate/h264-conformance-frext-hi422fr13_sony_b
> +++ b/tests/ref/fate/h264-conformance-frext-hi422fr13_sony_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   405504, 0xe0f40e71
>  0,          1,          1,        1,   405504, 0x9bdb5900
>  0,          2,          2,        1,   405504, 0x527003ca
> diff --git a/tests/ref/fate/h264-conformance-frext-hi422fr1_sony_a b/tests/ref/fate/h264-conformance-frext-hi422fr1_sony_a
> index 93a3aa4..7db8672 100644
> --- a/tests/ref/fate/h264-conformance-frext-hi422fr1_sony_a
> +++ b/tests/ref/fate/h264-conformance-frext-hi422fr1_sony_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   202752, 0xd5a1e49f
>  0,          1,          1,        1,   202752, 0x08352d61
>  0,          2,          2,        1,   202752, 0x43f78f47
> diff --git a/tests/ref/fate/h264-conformance-frext-hi422fr6_sony_a b/tests/ref/fate/h264-conformance-frext-hi422fr6_sony_a
> index 4141eee..6d26ee4 100644
> --- a/tests/ref/fate/h264-conformance-frext-hi422fr6_sony_a
> +++ b/tests/ref/fate/h264-conformance-frext-hi422fr6_sony_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   405504, 0x049ab58e
>  0,          1,          1,        1,   405504, 0x4f6226cb
>  0,          2,          2,        1,   405504, 0xaa5fcb44
> diff --git a/tests/ref/fate/h264-conformance-frext-hpca_brcm_c b/tests/ref/fate/h264-conformance-frext-hpca_brcm_c
> index d608d89..2d0cd5f 100644
> --- a/tests/ref/fate/h264-conformance-frext-hpca_brcm_c
> +++ b/tests/ref/fate/h264-conformance-frext-hpca_brcm_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x995bb4bd
>  0,          1,          1,        1,   152064, 0xad287357
>  0,          2,          2,        1,   152064, 0x38fa4661
> diff --git a/tests/ref/fate/h264-conformance-frext-hpcadq_brcm_b b/tests/ref/fate/h264-conformance-frext-hpcadq_brcm_b
> index 49249b3..0d5794a 100644
> --- a/tests/ref/fate/h264-conformance-frext-hpcadq_brcm_b
> +++ b/tests/ref/fate/h264-conformance-frext-hpcadq_brcm_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xf3c68dea
>  0,          1,          1,        1,   152064, 0xf52d483f
>  0,          2,          2,        1,   152064, 0x612f1792
> diff --git a/tests/ref/fate/h264-conformance-frext-hpcafl_bcrm_c b/tests/ref/fate/h264-conformance-frext-hpcafl_bcrm_c
> index dbfec43..0febed6 100644
> --- a/tests/ref/fate/h264-conformance-frext-hpcafl_bcrm_c
> +++ b/tests/ref/fate/h264-conformance-frext-hpcafl_bcrm_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x502ec077
>  0,          1,          1,        1,   152064, 0x84807243
>  0,          2,          2,        1,   152064, 0xd7474a6e
> diff --git a/tests/ref/fate/h264-conformance-frext-hpcaflnl_bcrm_c b/tests/ref/fate/h264-conformance-frext-hpcaflnl_bcrm_c
> index 65a366e..9958f16 100644
> --- a/tests/ref/fate/h264-conformance-frext-hpcaflnl_bcrm_c
> +++ b/tests/ref/fate/h264-conformance-frext-hpcaflnl_bcrm_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x3e39c08b
>  0,          1,          1,        1,   152064, 0xabc67990
>  0,          2,          2,        1,   152064, 0x19614e74
> diff --git a/tests/ref/fate/h264-conformance-frext-hpcalq_brcm_b b/tests/ref/fate/h264-conformance-frext-hpcalq_brcm_b
> index 49249b3..0d5794a 100644
> --- a/tests/ref/fate/h264-conformance-frext-hpcalq_brcm_b
> +++ b/tests/ref/fate/h264-conformance-frext-hpcalq_brcm_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xf3c68dea
>  0,          1,          1,        1,   152064, 0xf52d483f
>  0,          2,          2,        1,   152064, 0x612f1792
> diff --git a/tests/ref/fate/h264-conformance-frext-hpcamapalq_bcrm_b b/tests/ref/fate/h264-conformance-frext-hpcamapalq_bcrm_b
> index a81e91f..1b03e88 100644
> --- a/tests/ref/fate/h264-conformance-frext-hpcamapalq_bcrm_b
> +++ b/tests/ref/fate/h264-conformance-frext-hpcamapalq_bcrm_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xf8248ceb
>  0,          1,          1,        1,   152064, 0xb6204c81
>  0,          2,          2,        1,   152064, 0x22fb1737
> diff --git a/tests/ref/fate/h264-conformance-frext-hpcamolq_brcm_b b/tests/ref/fate/h264-conformance-frext-hpcamolq_brcm_b
> index 00f04fd..33e0688 100644
> --- a/tests/ref/fate/h264-conformance-frext-hpcamolq_brcm_b
> +++ b/tests/ref/fate/h264-conformance-frext-hpcamolq_brcm_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xac83f54f
>  0,          1,          1,        1,   152064, 0x4d673b43
>  0,          2,          2,        1,   152064, 0x9050731f
> diff --git a/tests/ref/fate/h264-conformance-frext-hpcanl_brcm_c b/tests/ref/fate/h264-conformance-frext-hpcanl_brcm_c
> index 23ad267..f3edba1 100644
> --- a/tests/ref/fate/h264-conformance-frext-hpcanl_brcm_c
> +++ b/tests/ref/fate/h264-conformance-frext-hpcanl_brcm_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x2744afa1
>  0,          1,          1,        1,   152064, 0x17246583
>  0,          2,          2,        1,   152064, 0x501836ed
> diff --git a/tests/ref/fate/h264-conformance-frext-hpcaq2lq_brcm_b b/tests/ref/fate/h264-conformance-frext-hpcaq2lq_brcm_b
> index 460f86c..b0412db 100644
> --- a/tests/ref/fate/h264-conformance-frext-hpcaq2lq_brcm_b
> +++ b/tests/ref/fate/h264-conformance-frext-hpcaq2lq_brcm_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x712a2ad3
>  0,          1,          1,        1,   152064, 0x83420c9d
>  0,          2,          2,        1,   152064, 0xf3d77f46
> diff --git a/tests/ref/fate/h264-conformance-frext-hpcv_brcm_a b/tests/ref/fate/h264-conformance-frext-hpcv_brcm_a
> index d608d89..2d0cd5f 100644
> --- a/tests/ref/fate/h264-conformance-frext-hpcv_brcm_a
> +++ b/tests/ref/fate/h264-conformance-frext-hpcv_brcm_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x995bb4bd
>  0,          1,          1,        1,   152064, 0xad287357
>  0,          2,          2,        1,   152064, 0x38fa4661
> diff --git a/tests/ref/fate/h264-conformance-frext-hpcvfl_bcrm_a b/tests/ref/fate/h264-conformance-frext-hpcvfl_bcrm_a
> index dbfec43..0febed6 100644
> --- a/tests/ref/fate/h264-conformance-frext-hpcvfl_bcrm_a
> +++ b/tests/ref/fate/h264-conformance-frext-hpcvfl_bcrm_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x502ec077
>  0,          1,          1,        1,   152064, 0x84807243
>  0,          2,          2,        1,   152064, 0xd7474a6e
> diff --git a/tests/ref/fate/h264-conformance-frext-hpcvflnl_bcrm_a b/tests/ref/fate/h264-conformance-frext-hpcvflnl_bcrm_a
> index 65a366e..9958f16 100644
> --- a/tests/ref/fate/h264-conformance-frext-hpcvflnl_bcrm_a
> +++ b/tests/ref/fate/h264-conformance-frext-hpcvflnl_bcrm_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x3e39c08b
>  0,          1,          1,        1,   152064, 0xabc67990
>  0,          2,          2,        1,   152064, 0x19614e74
> diff --git a/tests/ref/fate/h264-conformance-frext-hpcvmolq_brcm_b b/tests/ref/fate/h264-conformance-frext-hpcvmolq_brcm_b
> index 4179ace..f722388 100644
> --- a/tests/ref/fate/h264-conformance-frext-hpcvmolq_brcm_b
> +++ b/tests/ref/fate/h264-conformance-frext-hpcvmolq_brcm_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xa18cfb97
>  0,          1,          1,        1,   152064, 0x509b54d2
>  0,          2,          2,        1,   152064, 0x1ba0fb8e
> diff --git a/tests/ref/fate/h264-conformance-frext-hpcvnl_brcm_a b/tests/ref/fate/h264-conformance-frext-hpcvnl_brcm_a
> index 23ad267..f3edba1 100644
> --- a/tests/ref/fate/h264-conformance-frext-hpcvnl_brcm_a
> +++ b/tests/ref/fate/h264-conformance-frext-hpcvnl_brcm_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0x2744afa1
>  0,          1,          1,        1,   152064, 0x17246583
>  0,          2,          2,        1,   152064, 0x501836ed
> diff --git a/tests/ref/fate/h264-conformance-frext-pph10i1_panasonic_a b/tests/ref/fate/h264-conformance-frext-pph10i1_panasonic_a
> index 91e3436..ccd9328 100644
> --- a/tests/ref/fate/h264-conformance-frext-pph10i1_panasonic_a
> +++ b/tests/ref/fate/h264-conformance-frext-pph10i1_panasonic_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  2764800, 0xcc4df07d
>  0,          1,          1,        1,  2764800, 0x85f9e6d4
>  0,          2,          2,        1,  2764800, 0x23ffe90d
> diff --git a/tests/ref/fate/h264-conformance-frext-pph10i2_panasonic_a b/tests/ref/fate/h264-conformance-frext-pph10i2_panasonic_a
> index 1d6d4b5..835c495 100644
> --- a/tests/ref/fate/h264-conformance-frext-pph10i2_panasonic_a
> +++ b/tests/ref/fate/h264-conformance-frext-pph10i2_panasonic_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  2764800, 0x4f710132
>  0,          1,          1,        1,  2764800, 0x57e5b713
>  0,          2,          2,        1,  2764800, 0xcca01477
> diff --git a/tests/ref/fate/h264-conformance-frext-pph10i3_panasonic_a b/tests/ref/fate/h264-conformance-frext-pph10i3_panasonic_a
> index a09e397..f46dfaa 100644
> --- a/tests/ref/fate/h264-conformance-frext-pph10i3_panasonic_a
> +++ b/tests/ref/fate/h264-conformance-frext-pph10i3_panasonic_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  2764800, 0xda69f69e
>  0,          1,          1,        1,  2764800, 0x29ed832f
>  0,          2,          2,        1,  2764800, 0xb3244cc4
> diff --git a/tests/ref/fate/h264-conformance-frext-pph10i4_panasonic_a b/tests/ref/fate/h264-conformance-frext-pph10i4_panasonic_a
> index adec664..c7dfa8e 100644
> --- a/tests/ref/fate/h264-conformance-frext-pph10i4_panasonic_a
> +++ b/tests/ref/fate/h264-conformance-frext-pph10i4_panasonic_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  6220800, 0xca2a2a5e
>  0,          1,          1,        1,  6220800, 0x8009a65e
>  0,          2,          2,        1,  6220800, 0x63e72b3b
> diff --git a/tests/ref/fate/h264-conformance-frext-pph10i5_panasonic_a b/tests/ref/fate/h264-conformance-frext-pph10i5_panasonic_a
> index a475197..52b3d24 100644
> --- a/tests/ref/fate/h264-conformance-frext-pph10i5_panasonic_a
> +++ b/tests/ref/fate/h264-conformance-frext-pph10i5_panasonic_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  6220800, 0x1df58ce9
>  0,          1,          1,        1,  6220800, 0x8f2859ce
>  0,          2,          2,        1,  6220800, 0x229cc7ff
> diff --git a/tests/ref/fate/h264-conformance-frext-pph10i6_panasonic_a b/tests/ref/fate/h264-conformance-frext-pph10i6_panasonic_a
> index 25d0eec..d1eaf65 100644
> --- a/tests/ref/fate/h264-conformance-frext-pph10i6_panasonic_a
> +++ b/tests/ref/fate/h264-conformance-frext-pph10i6_panasonic_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  6220800, 0x408daf70
>  0,          1,          1,        1,  6220800, 0x59b254a3
>  0,          2,          2,        1,  6220800, 0x4cf4279c
> diff --git a/tests/ref/fate/h264-conformance-frext-pph10i7_panasonic_a b/tests/ref/fate/h264-conformance-frext-pph10i7_panasonic_a
> index 1090b49..7d55719 100644
> --- a/tests/ref/fate/h264-conformance-frext-pph10i7_panasonic_a
> +++ b/tests/ref/fate/h264-conformance-frext-pph10i7_panasonic_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  6220800, 0xf81873fe
>  0,          1,          1,        1,  6220800, 0x7b96fbdc
>  0,          2,          2,        1,  6220800, 0x75dbafc4
> diff --git a/tests/ref/fate/h264-conformance-frext-pph422i1_panasonic_a b/tests/ref/fate/h264-conformance-frext-pph422i1_panasonic_a
> index 0957654..3163089 100644
> --- a/tests/ref/fate/h264-conformance-frext-pph422i1_panasonic_a
> +++ b/tests/ref/fate/h264-conformance-frext-pph422i1_panasonic_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  3686400, 0x1f9b5bee
>  0,          1,          1,        1,  3686400, 0x657c3609
>  0,          2,          2,        1,  3686400, 0x75753934
> diff --git a/tests/ref/fate/h264-conformance-frext-pph422i2_panasonic_a b/tests/ref/fate/h264-conformance-frext-pph422i2_panasonic_a
> index 79e69eb..faa75ca 100644
> --- a/tests/ref/fate/h264-conformance-frext-pph422i2_panasonic_a
> +++ b/tests/ref/fate/h264-conformance-frext-pph422i2_panasonic_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  3686400, 0x8b3ff360
>  0,          1,          1,        1,  3686400, 0x422dead1
>  0,          2,          2,        1,  3686400, 0xbdd0e431
> diff --git a/tests/ref/fate/h264-conformance-frext-pph422i3_panasonic_a b/tests/ref/fate/h264-conformance-frext-pph422i3_panasonic_a
> index fc4cc50..a9befbd 100644
> --- a/tests/ref/fate/h264-conformance-frext-pph422i3_panasonic_a
> +++ b/tests/ref/fate/h264-conformance-frext-pph422i3_panasonic_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  3686400, 0x97c36ae3
>  0,          1,          1,        1,  3686400, 0x6a0aa629
>  0,          2,          2,        1,  3686400, 0xc658d722
> diff --git a/tests/ref/fate/h264-conformance-frext-pph422i4_panasonic_a b/tests/ref/fate/h264-conformance-frext-pph422i4_panasonic_a
> index 0aae9fe..6289caa 100644
> --- a/tests/ref/fate/h264-conformance-frext-pph422i4_panasonic_a
> +++ b/tests/ref/fate/h264-conformance-frext-pph422i4_panasonic_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  8294400, 0xf50992f3
>  0,          1,          1,        1,  8294400, 0xd34cdf98
>  0,          2,          2,        1,  8294400, 0x76bced00
> diff --git a/tests/ref/fate/h264-conformance-frext-pph422i5_panasonic_a b/tests/ref/fate/h264-conformance-frext-pph422i5_panasonic_a
> index c74483c..b187532 100644
> --- a/tests/ref/fate/h264-conformance-frext-pph422i5_panasonic_a
> +++ b/tests/ref/fate/h264-conformance-frext-pph422i5_panasonic_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  8294400, 0x96d051a1
>  0,          1,          1,        1,  8294400, 0xf3c2974e
>  0,          2,          2,        1,  8294400, 0xb18f3ed0
> diff --git a/tests/ref/fate/h264-conformance-frext-pph422i6_panasonic_a b/tests/ref/fate/h264-conformance-frext-pph422i6_panasonic_a
> index 26d41d4..817bc9c 100644
> --- a/tests/ref/fate/h264-conformance-frext-pph422i6_panasonic_a
> +++ b/tests/ref/fate/h264-conformance-frext-pph422i6_panasonic_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  8294400, 0x1b2f1079
>  0,          1,          1,        1,  8294400, 0x6646f91c
>  0,          2,          2,        1,  8294400, 0x17dc9f51
> diff --git a/tests/ref/fate/h264-conformance-frext-pph422i7_panasonic_a b/tests/ref/fate/h264-conformance-frext-pph422i7_panasonic_a
> index 3f9bfed..3219da0 100644
> --- a/tests/ref/fate/h264-conformance-frext-pph422i7_panasonic_a
> +++ b/tests/ref/fate/h264-conformance-frext-pph422i7_panasonic_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  8294400, 0xaa37ceea
>  0,          1,          1,        1,  8294400, 0xa7546d5c
>  0,          2,          2,        1,  8294400, 0xf2abaace
> diff --git a/tests/ref/fate/h264-conformance-hcbp2_hhi_a b/tests/ref/fate/h264-conformance-hcbp2_hhi_a
> index 977107e..36d39c9 100644
> --- a/tests/ref/fate/h264-conformance-hcbp2_hhi_a
> +++ b/tests/ref/fate/h264-conformance-hcbp2_hhi_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xf9deb95a
>  0,          1,          1,        1,   152064, 0xdce9c541
>  0,          2,          2,        1,   152064, 0xc45a8a77
> diff --git a/tests/ref/fate/h264-conformance-hcmp1_hhi_a b/tests/ref/fate/h264-conformance-hcmp1_hhi_a
> index be619da..578f98d 100644
> --- a/tests/ref/fate/h264-conformance-hcmp1_hhi_a
> +++ b/tests/ref/fate/h264-conformance-hcmp1_hhi_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   152064, 0xda244f3f
>  0,          1,          1,        1,   152064, 0x35a1cb02
>  0,          2,          2,        1,   152064, 0xa729d9ca
> diff --git a/tests/ref/fate/h264-conformance-ls_sva_d b/tests/ref/fate/h264-conformance-ls_sva_d
> index 9d1d219..d3826ab 100644
> --- a/tests/ref/fate/h264-conformance-ls_sva_d
> +++ b/tests/ref/fate/h264-conformance-ls_sva_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x85d20fc6
>  0,          1,          1,        1,    38016, 0xc0432c21
>  0,          2,          2,        1,    38016, 0x1450168f
> diff --git a/tests/ref/fate/h264-conformance-midr_mw_d b/tests/ref/fate/h264-conformance-midr_mw_d
> index 51b7c0e..3afa65f 100644
> --- a/tests/ref/fate/h264-conformance-midr_mw_d
> +++ b/tests/ref/fate/h264-conformance-midr_mw_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x3ae838ee
>  0,          1,          1,        1,    38016, 0x9ed7e141
>  0,          2,          2,        1,    38016, 0x393097f9
> diff --git a/tests/ref/fate/h264-conformance-mps_mw_a b/tests/ref/fate/h264-conformance-mps_mw_a
> index 959a0ae..ae38cfc 100644
> --- a/tests/ref/fate/h264-conformance-mps_mw_a
> +++ b/tests/ref/fate/h264-conformance-mps_mw_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x06150e88
>  0,          1,          1,        1,    38016, 0x32d90103
>  0,          2,          2,        1,    38016, 0x5b5f2fae
> diff --git a/tests/ref/fate/h264-conformance-mr1_bt_a b/tests/ref/fate/h264-conformance-mr1_bt_a
> index 11eb590..273ee08 100644
> --- a/tests/ref/fate/h264-conformance-mr1_bt_a
> +++ b/tests/ref/fate/h264-conformance-mr1_bt_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xc6658719
>  0,          1,          1,        1,    38016, 0x8a7c7423
>  0,          2,          2,        1,    38016, 0x97e99b66
> diff --git a/tests/ref/fate/h264-conformance-mr1_mw_a b/tests/ref/fate/h264-conformance-mr1_mw_a
> index da7631d..7b154ba 100644
> --- a/tests/ref/fate/h264-conformance-mr1_mw_a
> +++ b/tests/ref/fate/h264-conformance-mr1_mw_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xc8981780
>  0,          1,          1,        1,    38016, 0xf089d880
>  0,          2,          2,        1,    38016, 0x5eee0731
> diff --git a/tests/ref/fate/h264-conformance-mr2_mw_a b/tests/ref/fate/h264-conformance-mr2_mw_a
> index fd4b5d9..833cea9 100644
> --- a/tests/ref/fate/h264-conformance-mr2_mw_a
> +++ b/tests/ref/fate/h264-conformance-mr2_mw_a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x06150e88
>  0,          1,          1,        1,    38016, 0x32d90103
>  0,          2,          2,        1,    38016, 0xb32d338f
> diff --git a/tests/ref/fate/h264-conformance-mr2_tandberg_e b/tests/ref/fate/h264-conformance-mr2_tandberg_e
> index 8fbac9f..c0e1d83 100644
> --- a/tests/ref/fate/h264-conformance-mr2_tandberg_e
> +++ b/tests/ref/fate/h264-conformance-mr2_tandberg_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xb96f1feb
>  0,          1,          1,        1,    38016, 0xca461abd
>  0,          2,          2,        1,    38016, 0x578a0c87
> diff --git a/tests/ref/fate/h264-conformance-mr3_tandberg_b b/tests/ref/fate/h264-conformance-mr3_tandberg_b
> index ee8014e..b094844 100644
> --- a/tests/ref/fate/h264-conformance-mr3_tandberg_b
> +++ b/tests/ref/fate/h264-conformance-mr3_tandberg_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xb96f1feb
>  0,          1,          1,        1,    38016, 0xca461abd
>  0,          2,          2,        1,    38016, 0x578a0c87
> diff --git a/tests/ref/fate/h264-conformance-mr4_tandberg_c b/tests/ref/fate/h264-conformance-mr4_tandberg_c
> index 0d5f646..87bcaa4 100644
> --- a/tests/ref/fate/h264-conformance-mr4_tandberg_c
> +++ b/tests/ref/fate/h264-conformance-mr4_tandberg_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xb96f1feb
>  0,          1,          1,        1,    38016, 0x0ff111f0
>  0,          2,          2,        1,    38016, 0xbac70271
> diff --git a/tests/ref/fate/h264-conformance-mr5_tandberg_c b/tests/ref/fate/h264-conformance-mr5_tandberg_c
> index 0d5f646..87bcaa4 100644
> --- a/tests/ref/fate/h264-conformance-mr5_tandberg_c
> +++ b/tests/ref/fate/h264-conformance-mr5_tandberg_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xb96f1feb
>  0,          1,          1,        1,    38016, 0x0ff111f0
>  0,          2,          2,        1,    38016, 0xbac70271
> diff --git a/tests/ref/fate/h264-conformance-mr6_bt_b b/tests/ref/fate/h264-conformance-mr6_bt_b
> index 3b02506..34aa8bf 100644
> --- a/tests/ref/fate/h264-conformance-mr6_bt_b
> +++ b/tests/ref/fate/h264-conformance-mr6_bt_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 192x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    36864, 0x954464be
>  0,          1,          1,        1,    36864, 0xace1d90b
>  0,          2,          2,        1,    36864, 0x8f149f03
> diff --git a/tests/ref/fate/h264-conformance-mr7_bt_b b/tests/ref/fate/h264-conformance-mr7_bt_b
> index 25b7054..551767c 100644
> --- a/tests/ref/fate/h264-conformance-mr7_bt_b
> +++ b/tests/ref/fate/h264-conformance-mr7_bt_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 192x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    36864, 0x579e6274
>  0,          1,          1,        1,    36864, 0x8650c61c
>  0,          2,          2,        1,    36864, 0xbc359647
> diff --git a/tests/ref/fate/h264-conformance-mr8_bt_b b/tests/ref/fate/h264-conformance-mr8_bt_b
> index 220acf1..7981c42 100644
> --- a/tests/ref/fate/h264-conformance-mr8_bt_b
> +++ b/tests/ref/fate/h264-conformance-mr8_bt_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 192x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    36864, 0x36df68f4
>  0,          1,          1,        1,    36864, 0x52d4c6d9
>  0,          2,          2,        1,    36864, 0xad16b0be
> diff --git a/tests/ref/fate/h264-conformance-mr9_bt_b b/tests/ref/fate/h264-conformance-mr9_bt_b
> index 3744802..bbd90e6 100644
> --- a/tests/ref/fate/h264-conformance-mr9_bt_b
> +++ b/tests/ref/fate/h264-conformance-mr9_bt_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 192x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    36864, 0xb4c5642e
>  0,          1,          1,        1,    36864, 0x929fd05f
>  0,          2,          2,        1,    36864, 0x447c9b69
> diff --git a/tests/ref/fate/h264-conformance-mv1_brcm_d b/tests/ref/fate/h264-conformance-mv1_brcm_d
> index 47517ee..a3ab27b 100644
> --- a/tests/ref/fate/h264-conformance-mv1_brcm_d
> +++ b/tests/ref/fate/h264-conformance-mv1_brcm_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0x230d7aa6
>  0,          1,          1,        1,   518400, 0x9fc976e0
>  0,          2,          2,        1,   518400, 0x51052db9
> diff --git a/tests/ref/fate/h264-conformance-nl1_sony_d b/tests/ref/fate/h264-conformance-nl1_sony_d
> index 98a5673..d6e0df9 100644
> --- a/tests/ref/fate/h264-conformance-nl1_sony_d
> +++ b/tests/ref/fate/h264-conformance-nl1_sony_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xc805351d
>  0,          1,          1,        1,    38016, 0x3809fec3
>  0,          2,          2,        1,    38016, 0xf698ce3c
> diff --git a/tests/ref/fate/h264-conformance-nl2_sony_h b/tests/ref/fate/h264-conformance-nl2_sony_h
> index 73eb858..1e7bfb3 100644
> --- a/tests/ref/fate/h264-conformance-nl2_sony_h
> +++ b/tests/ref/fate/h264-conformance-nl2_sony_h
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xc805351d
>  0,          1,          1,        1,    38016, 0x320510a8
>  0,          2,          2,        1,    38016, 0x3ef6e4c6
> diff --git a/tests/ref/fate/h264-conformance-nl3_sva_e b/tests/ref/fate/h264-conformance-nl3_sva_e
> index a4d6db6..a09e083 100644
> --- a/tests/ref/fate/h264-conformance-nl3_sva_e
> +++ b/tests/ref/fate/h264-conformance-nl3_sva_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x2fad15e2
>  0,          1,          1,        1,    38016, 0x7e391566
>  0,          2,          2,        1,    38016, 0x954001d4
> diff --git a/tests/ref/fate/h264-conformance-nlmq1_jvc_c b/tests/ref/fate/h264-conformance-nlmq1_jvc_c
> index 3030125..dbcdcdf 100644
> --- a/tests/ref/fate/h264-conformance-nlmq1_jvc_c
> +++ b/tests/ref/fate/h264-conformance-nlmq1_jvc_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xde1a2194
>  0,          1,          1,        1,    38016, 0x2957f3e5
>  0,          2,          2,        1,    38016, 0x9df4c6cf
> diff --git a/tests/ref/fate/h264-conformance-nlmq2_jvc_c b/tests/ref/fate/h264-conformance-nlmq2_jvc_c
> index 5258eb2..8dc6285 100644
> --- a/tests/ref/fate/h264-conformance-nlmq2_jvc_c
> +++ b/tests/ref/fate/h264-conformance-nlmq2_jvc_c
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xde1a2194
>  0,          1,          1,        1,    38016, 0x8b6cf842
>  0,          2,          2,        1,    38016, 0x6dc7c88b
> diff --git a/tests/ref/fate/h264-conformance-nrf_mw_e b/tests/ref/fate/h264-conformance-nrf_mw_e
> index ee5f719..b68a6a7 100644
> --- a/tests/ref/fate/h264-conformance-nrf_mw_e
> +++ b/tests/ref/fate/h264-conformance-nrf_mw_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x3ae838ee
>  0,          1,          1,        1,    38016, 0x9ed7e141
>  0,          2,          2,        1,    38016, 0x354e83ed
> diff --git a/tests/ref/fate/h264-conformance-sharp_mp_field_1_b b/tests/ref/fate/h264-conformance-sharp_mp_field_1_b
> index 8512102..cdabcce 100644
> --- a/tests/ref/fate/h264-conformance-sharp_mp_field_1_b
> +++ b/tests/ref/fate/h264-conformance-sharp_mp_field_1_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0xc93c7c47
>  0,          1,          1,        1,   518400, 0xa3f2e502
>  0,          2,          2,        1,   518400, 0xb98920a4
> diff --git a/tests/ref/fate/h264-conformance-sharp_mp_field_2_b b/tests/ref/fate/h264-conformance-sharp_mp_field_2_b
> index 5808141..0574f8f 100644
> --- a/tests/ref/fate/h264-conformance-sharp_mp_field_2_b
> +++ b/tests/ref/fate/h264-conformance-sharp_mp_field_2_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0xc93c7c47
>  0,          1,          1,        1,   518400, 0xf0c4b44a
>  0,          2,          2,        1,   518400, 0x3f5dc91c
> diff --git a/tests/ref/fate/h264-conformance-sharp_mp_field_3_b b/tests/ref/fate/h264-conformance-sharp_mp_field_3_b
> index a572030..6a92245 100644
> --- a/tests/ref/fate/h264-conformance-sharp_mp_field_3_b
> +++ b/tests/ref/fate/h264-conformance-sharp_mp_field_3_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0xc93c7c47
>  0,          1,          1,        1,   518400, 0x7112ac25
>  0,          2,          2,        1,   518400, 0x28bc28d2
> diff --git a/tests/ref/fate/h264-conformance-sharp_mp_paff_1r2 b/tests/ref/fate/h264-conformance-sharp_mp_paff_1r2
> index d1a347f..8a7aa24 100644
> --- a/tests/ref/fate/h264-conformance-sharp_mp_paff_1r2
> +++ b/tests/ref/fate/h264-conformance-sharp_mp_paff_1r2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0xc93c7c47
>  0,          1,          1,        1,   518400, 0xfb452a9c
>  0,          2,          2,        1,   518400, 0x2f7a35bd
> diff --git a/tests/ref/fate/h264-conformance-sharp_mp_paff_2r b/tests/ref/fate/h264-conformance-sharp_mp_paff_2r
> index f2bf06f..ded91a9 100644
> --- a/tests/ref/fate/h264-conformance-sharp_mp_paff_2r
> +++ b/tests/ref/fate/h264-conformance-sharp_mp_paff_2r
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   518400, 0xc93c7c47
>  0,          1,          1,        1,   518400, 0xfb452a9c
>  0,          2,          2,        1,   518400, 0x2f7a35bd
> diff --git a/tests/ref/fate/h264-conformance-sl1_sva_b b/tests/ref/fate/h264-conformance-sl1_sva_b
> index a2f16b4..572d5a0 100644
> --- a/tests/ref/fate/h264-conformance-sl1_sva_b
> +++ b/tests/ref/fate/h264-conformance-sl1_sva_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x666c110c
>  0,          1,          1,        1,    38016, 0xc87421f6
>  0,          2,          2,        1,    38016, 0x1b74033d
> diff --git a/tests/ref/fate/h264-conformance-sva_ba1_b b/tests/ref/fate/h264-conformance-sva_ba1_b
> index cc55ac9..6b38348 100644
> --- a/tests/ref/fate/h264-conformance-sva_ba1_b
> +++ b/tests/ref/fate/h264-conformance-sva_ba1_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x359316a1
>  0,          1,          1,        1,    38016, 0xd5fafa54
>  0,          2,          2,        1,    38016, 0xea99e9be
> diff --git a/tests/ref/fate/h264-conformance-sva_ba2_d b/tests/ref/fate/h264-conformance-sva_ba2_d
> index b94086f..7c5ec98 100644
> --- a/tests/ref/fate/h264-conformance-sva_ba2_d
> +++ b/tests/ref/fate/h264-conformance-sva_ba2_d
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x359316a1
>  0,          1,          1,        1,    38016, 0xd7bb1285
>  0,          2,          2,        1,    38016, 0x3c36059f
> diff --git a/tests/ref/fate/h264-conformance-sva_base_b b/tests/ref/fate/h264-conformance-sva_base_b
> index 30663ff..3ed51fd 100644
> --- a/tests/ref/fate/h264-conformance-sva_base_b
> +++ b/tests/ref/fate/h264-conformance-sva_base_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x1c131302
>  0,          1,          1,        1,    38016, 0xbbca0c4f
>  0,          2,          2,        1,    38016, 0x81f5fd7b
> diff --git a/tests/ref/fate/h264-conformance-sva_cl1_e b/tests/ref/fate/h264-conformance-sva_cl1_e
> index 27cba6d..2f32114 100644
> --- a/tests/ref/fate/h264-conformance-sva_cl1_e
> +++ b/tests/ref/fate/h264-conformance-sva_cl1_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x6811161f
>  0,          1,          1,        1,    38016, 0x243a0d4e
>  0,          2,          2,        1,    38016, 0x0bc700de
> diff --git a/tests/ref/fate/h264-conformance-sva_fm1_e b/tests/ref/fate/h264-conformance-sva_fm1_e
> index 0e5f3e0..52ed49b 100644
> --- a/tests/ref/fate/h264-conformance-sva_fm1_e
> +++ b/tests/ref/fate/h264-conformance-sva_fm1_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x1c131302
>  0,          1,          1,        1,    38016, 0x89dd0c15
>  0,          2,          2,        1,    38016, 0xaf7700bd
> diff --git a/tests/ref/fate/h264-conformance-sva_nl1_b b/tests/ref/fate/h264-conformance-sva_nl1_b
> index f2033d8..c59aa2c 100644
> --- a/tests/ref/fate/h264-conformance-sva_nl1_b
> +++ b/tests/ref/fate/h264-conformance-sva_nl1_b
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xb9ac19bd
>  0,          1,          1,        1,    38016, 0x3898fc35
>  0,          2,          2,        1,    38016, 0xf6f4ed19
> diff --git a/tests/ref/fate/h264-conformance-sva_nl2_e b/tests/ref/fate/h264-conformance-sva_nl2_e
> index 1770eff..5f8006b 100644
> --- a/tests/ref/fate/h264-conformance-sva_nl2_e
> +++ b/tests/ref/fate/h264-conformance-sva_nl2_e
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0xb9ac19bd
>  0,          1,          1,        1,    38016, 0x53c91566
>  0,          2,          2,        1,    38016, 0xb5bd089f
> diff --git a/tests/ref/fate/h264-crop-to-container b/tests/ref/fate/h264-crop-to-container
> index 4932bdd..a23fd80 100644
> --- a/tests/ref/fate/h264-crop-to-container
> +++ b/tests/ref/fate/h264-crop-to-container
> @@ -2,5 +2,9 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,  3110400, 43a312e1eebc7dca1bd23456302a44e3
> diff --git a/tests/ref/fate/h264-direct-bff b/tests/ref/fate/h264-direct-bff
> index 4d233b5..802733e 100644
> --- a/tests/ref/fate/h264-direct-bff
> +++ b/tests/ref/fate/h264-direct-bff
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x484
> +#sar 0: 1/1
>  0,          0,          0,        1,   522720, 0x1ccad503
>  0,          1,          1,        1,   522720, 0xd266d6e8
>  0,          2,          2,        1,   522720, 0x535473b3
> diff --git a/tests/ref/fate/h264-extreme-plane-pred b/tests/ref/fate/h264-extreme-plane-pred
> index 96c2bf4..87e5fce 100644
> --- a/tests/ref/fate/h264-extreme-plane-pred
> +++ b/tests/ref/fate/h264-extreme-plane-pred
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 1e857d2dfeea75297e090ffe9e37a249
>  0,          1,          1,        1,   152064, 29d8336b4e9b77298025074dbad641d1
> diff --git a/tests/ref/fate/h264-interlace-crop b/tests/ref/fate/h264-interlace-crop
> index 81b979c..8dc7308 100644
> --- a/tests/ref/fate/h264-interlace-crop
> +++ b/tests/ref/fate/h264-interlace-crop
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x360
> +#sar 0: 1/1
>  0,          0,          0,        1,   345600, 0xa9cb7e5a
>  0,          1,          1,        1,   345600, 0x73e47555
>  0,          2,          2,        1,   345600, 0x87aac593
> diff --git a/tests/ref/fate/h264-lossless b/tests/ref/fate/h264-lossless
> index 44cb13b..9c86db8 100644
> --- a/tests/ref/fate/h264-lossless
> +++ b/tests/ref/fate/h264-lossless
> @@ -1,4 +1,8 @@
>  #tb 0: 83333/5000000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   460800, 0x7731dd2f
>  0,          2,          2,        1,   460800, 0x944b8c64
>  0,          3,          3,        1,   460800, 0xbe833041
> diff --git a/tests/ref/fate/h264-reinit-large_420_8-to-small_420_8 b/tests/ref/fate/h264-reinit-large_420_8-to-small_420_8
> index 8518855..2c28386 100644
> --- a/tests/ref/fate/h264-reinit-large_420_8-to-small_420_8
> +++ b/tests/ref/fate/h264-reinit-large_420_8-to-small_420_8
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   608256, 0x65574c43
>  0,          1,          1,        1,   608256, 0x5e5a1aa4
>  0,          2,          2,        1,   608256, 0xa9a5cbc5
> diff --git a/tests/ref/fate/h264-reinit-small_420_8-to-large_444_10 b/tests/ref/fate/h264-reinit-small_420_8-to-large_444_10
> index 7e7631a..e727d07 100644
> --- a/tests/ref/fate/h264-reinit-small_420_8-to-large_444_10
> +++ b/tests/ref/fate/h264-reinit-small_420_8-to-large_444_10
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   608256, 0x27a069a3
>  0,          1,          1,        1,   608256, 0x22a5ff96
>  0,          2,          2,        1,   608256, 0x29ad753f
> diff --git a/tests/ref/fate/h264-reinit-small_420_9-to-small_420_8 b/tests/ref/fate/h264-reinit-small_420_9-to-small_420_8
> index 662db29..9b3d114 100644
> --- a/tests/ref/fate/h264-reinit-small_420_9-to-small_420_8
> +++ b/tests/ref/fate/h264-reinit-small_420_9-to-small_420_8
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   608256, 0xee06377f
>  0,          1,          1,        1,   608256, 0x9c22c5ee
>  0,          2,          2,        1,   608256, 0x322abee2
> diff --git a/tests/ref/fate/h264-reinit-small_422_9-to-small_420_9 b/tests/ref/fate/h264-reinit-small_422_9-to-small_420_9
> index b5a9505..15115b6 100644
> --- a/tests/ref/fate/h264-reinit-small_422_9-to-small_420_9
> +++ b/tests/ref/fate/h264-reinit-small_422_9-to-small_420_9
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   608256, 0x3aef31f3
>  0,          1,          1,        1,   608256, 0x05afe4e8
>  0,          2,          2,        1,   608256, 0x9d7dc9b1
> diff --git a/tests/ref/fate/hap-chunk b/tests/ref/fate/hap-chunk
> index 1e7b976..8dd5039 100644
> --- a/tests/ref/fate/hap-chunk
> +++ b/tests/ref/fate/hap-chunk
> @@ -1,2 +1,6 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x096d409e
> diff --git a/tests/ref/fate/hap1 b/tests/ref/fate/hap1
> index d3bdeae..fcdf985 100644
> --- a/tests/ref/fate/hap1
> +++ b/tests/ref/fate/hap1
> @@ -1,2 +1,6 @@
>  #tb 0: 62/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,  1228800, 0x0fa946bc
> diff --git a/tests/ref/fate/hap5 b/tests/ref/fate/hap5
> index 458981e..f46fe78 100644
> --- a/tests/ref/fate/hap5
> +++ b/tests/ref/fate/hap5
> @@ -1,2 +1,6 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,  1228800, 0xb71ecf93
> diff --git a/tests/ref/fate/hapy b/tests/ref/fate/hapy
> index e7d7608..61feb2e 100644
> --- a/tests/ref/fate/hapy
> +++ b/tests/ref/fate/hapy
> @@ -1,2 +1,6 @@
>  #tb 0: 62/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,  1228800, 0x5993522d
> diff --git a/tests/ref/fate/hevc-conformance-ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1 b/tests/ref/fate/hevc-conformance-ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1
> index f73569f..953fcf8 100644
> --- a/tests/ref/fate/hevc-conformance-ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1
> +++ b/tests/ref/fate/hevc-conformance-ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  8294400, 0xa061c78c
>  0,          1,          1,        1,  8294400, 0x60250c76
>  0,          2,          2,        1,  8294400, 0x48e3fbdb
> diff --git a/tests/ref/fate/hevc-conformance-AMP_A_Samsung_4 b/tests/ref/fate/hevc-conformance-AMP_A_Samsung_4
> index 84487a5..e5938e2 100644
> --- a/tests/ref/fate/hevc-conformance-AMP_A_Samsung_4
> +++ b/tests/ref/fate/hevc-conformance-AMP_A_Samsung_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 2560x1600
> +#sar 0: 0/1
>  0,          0,          0,        1,  6144000, 0xf7da9a00
>  0,          1,          1,        1,  6144000, 0xf5cfc76f
>  0,          2,          2,        1,  6144000, 0x20663e82
> diff --git a/tests/ref/fate/hevc-conformance-AMP_A_Samsung_6 b/tests/ref/fate/hevc-conformance-AMP_A_Samsung_6
> index 7693050..c5f59be 100644
> --- a/tests/ref/fate/hevc-conformance-AMP_A_Samsung_6
> +++ b/tests/ref/fate/hevc-conformance-AMP_A_Samsung_6
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 2560x1600
> +#sar 0: 0/1
>  0,          0,          0,        1,  6144000, 0x6f9dd380
>  0,          1,          1,        1,  6144000, 0x3ad765f8
>  0,          2,          2,        1,  6144000, 0xe301292d
> diff --git a/tests/ref/fate/hevc-conformance-AMP_B_Samsung_4 b/tests/ref/fate/hevc-conformance-AMP_B_Samsung_4
> index 034f7b8..10db6c3 100644
> --- a/tests/ref/fate/hevc-conformance-AMP_B_Samsung_4
> +++ b/tests/ref/fate/hevc-conformance-AMP_B_Samsung_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 2560x1600
> +#sar 0: 0/1
>  0,          0,          0,        1,  6144000, 0xcd32ef33
>  0,          1,          1,        1,  6144000, 0x58ce681d
>  0,          2,          2,        1,  6144000, 0x77a732b6
> diff --git a/tests/ref/fate/hevc-conformance-AMP_B_Samsung_6 b/tests/ref/fate/hevc-conformance-AMP_B_Samsung_6
> index fd99c82..518d937 100644
> --- a/tests/ref/fate/hevc-conformance-AMP_B_Samsung_6
> +++ b/tests/ref/fate/hevc-conformance-AMP_B_Samsung_6
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 2560x1600
> +#sar 0: 0/1
>  0,          0,          0,        1,  6144000, 0x4217e40e
>  0,          1,          1,        1,  6144000, 0xafa3a676
>  0,          2,          2,        1,  6144000, 0xb8285522
> diff --git a/tests/ref/fate/hevc-conformance-AMP_D_Hisilicon b/tests/ref/fate/hevc-conformance-AMP_D_Hisilicon
> index 6e17b83..8d4e079 100644
> --- a/tests/ref/fate/hevc-conformance-AMP_D_Hisilicon
> +++ b/tests/ref/fate/hevc-conformance-AMP_D_Hisilicon
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  3110400, 0x1559c293
>  0,          1,          1,        1,  3110400, 0xd0802706
>  0,          2,          2,        1,  3110400, 0xb48cf229
> diff --git a/tests/ref/fate/hevc-conformance-AMP_E_Hisilicon b/tests/ref/fate/hevc-conformance-AMP_E_Hisilicon
> index c1b7f2e..075d024 100644
> --- a/tests/ref/fate/hevc-conformance-AMP_E_Hisilicon
> +++ b/tests/ref/fate/hevc-conformance-AMP_E_Hisilicon
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  3110400, 0xf9342188
>  0,          1,          1,        1,  3110400, 0x46638dc4
>  0,          2,          2,        1,  3110400, 0x96da436e
> diff --git a/tests/ref/fate/hevc-conformance-AMP_F_Hisilicon_3 b/tests/ref/fate/hevc-conformance-AMP_F_Hisilicon_3
> index 71ce9c7..4a8849f 100644
> --- a/tests/ref/fate/hevc-conformance-AMP_F_Hisilicon_3
> +++ b/tests/ref/fate/hevc-conformance-AMP_F_Hisilicon_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  3110400, 0xa5d2b8b0
>  0,          1,          1,        1,  3110400, 0x13035cfa
>  0,          2,          2,        1,  3110400, 0x96b16f86
> diff --git a/tests/ref/fate/hevc-conformance-AMVP_A_MTK_4 b/tests/ref/fate/hevc-conformance-AMVP_A_MTK_4
> index 59115fb..f44c174 100644
> --- a/tests/ref/fate/hevc-conformance-AMVP_A_MTK_4
> +++ b/tests/ref/fate/hevc-conformance-AMVP_A_MTK_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x88619f80
>  0,          1,          1,        1,   149760, 0x550bdaf0
>  0,          2,          2,        1,   149760, 0xb769fa4c
> diff --git a/tests/ref/fate/hevc-conformance-AMVP_B_MTK_4 b/tests/ref/fate/hevc-conformance-AMVP_B_MTK_4
> index 1f998c4..3fd21e2 100644
> --- a/tests/ref/fate/hevc-conformance-AMVP_B_MTK_4
> +++ b/tests/ref/fate/hevc-conformance-AMVP_B_MTK_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xcfffa013
>  0,          1,          1,        1,   149760, 0x5166146a
>  0,          2,          2,        1,   149760, 0xc3cc318e
> diff --git a/tests/ref/fate/hevc-conformance-AMVP_C_Samsung_4 b/tests/ref/fate/hevc-conformance-AMVP_C_Samsung_4
> index 16d3446..649be46 100644
> --- a/tests/ref/fate/hevc-conformance-AMVP_C_Samsung_4
> +++ b/tests/ref/fate/hevc-conformance-AMVP_C_Samsung_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x8087662a
>  0,          1,          1,        1,   599040, 0x5278d8db
>  0,          2,          2,        1,   599040, 0x73c74090
> diff --git a/tests/ref/fate/hevc-conformance-AMVP_C_Samsung_6 b/tests/ref/fate/hevc-conformance-AMVP_C_Samsung_6
> index 5ed71e2..36d5577 100644
> --- a/tests/ref/fate/hevc-conformance-AMVP_C_Samsung_6
> +++ b/tests/ref/fate/hevc-conformance-AMVP_C_Samsung_6
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0xd70f52b4
>  0,          1,          1,        1,   599040, 0xaf3d1311
>  0,          2,          2,        1,   599040, 0xc1b05eef
> diff --git a/tests/ref/fate/hevc-conformance-BUMPING_A_ericsson_1 b/tests/ref/fate/hevc-conformance-BUMPING_A_ericsson_1
> index 2638729..fe89004 100644
> --- a/tests/ref/fate/hevc-conformance-BUMPING_A_ericsson_1
> +++ b/tests/ref/fate/hevc-conformance-BUMPING_A_ericsson_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8ce7200b
>  0,          1,          1,        1,   149760, 0x73610669
>  0,          2,          2,        1,   149760, 0xc01620f4
> diff --git a/tests/ref/fate/hevc-conformance-CAINIT_A_SHARP_4 b/tests/ref/fate/hevc-conformance-CAINIT_A_SHARP_4
> index 53b621b..2ad98af 100644
> --- a/tests/ref/fate/hevc-conformance-CAINIT_A_SHARP_4
> +++ b/tests/ref/fate/hevc-conformance-CAINIT_A_SHARP_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x001f0c48
>  0,          1,          1,        1,   599040, 0x83120d87
>  0,          2,          2,        1,   599040, 0x10c267aa
> diff --git a/tests/ref/fate/hevc-conformance-CAINIT_B_SHARP_4 b/tests/ref/fate/hevc-conformance-CAINIT_B_SHARP_4
> index 9aeb3b1..2ac9782 100644
> --- a/tests/ref/fate/hevc-conformance-CAINIT_B_SHARP_4
> +++ b/tests/ref/fate/hevc-conformance-CAINIT_B_SHARP_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x001f0c48
>  0,          1,          1,        1,   599040, 0xf8160d82
>  0,          2,          2,        1,   599040, 0x5f2060e2
> diff --git a/tests/ref/fate/hevc-conformance-CAINIT_C_SHARP_3 b/tests/ref/fate/hevc-conformance-CAINIT_C_SHARP_3
> index c891c44..11c98cb 100644
> --- a/tests/ref/fate/hevc-conformance-CAINIT_C_SHARP_3
> +++ b/tests/ref/fate/hevc-conformance-CAINIT_C_SHARP_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x2b58dee2
>  0,          1,          1,        1,   599040, 0x2b58dee2
>  0,          2,          2,        1,   599040, 0xcd9295f4
> diff --git a/tests/ref/fate/hevc-conformance-CAINIT_D_SHARP_3 b/tests/ref/fate/hevc-conformance-CAINIT_D_SHARP_3
> index 0294a7e..ad303fa 100644
> --- a/tests/ref/fate/hevc-conformance-CAINIT_D_SHARP_3
> +++ b/tests/ref/fate/hevc-conformance-CAINIT_D_SHARP_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x2b58dee2
>  0,          1,          1,        1,   599040, 0x2b58dee2
>  0,          2,          2,        1,   599040, 0xb055b638
> diff --git a/tests/ref/fate/hevc-conformance-CAINIT_E_SHARP_3 b/tests/ref/fate/hevc-conformance-CAINIT_E_SHARP_3
> index 430426b..6dfd221 100644
> --- a/tests/ref/fate/hevc-conformance-CAINIT_E_SHARP_3
> +++ b/tests/ref/fate/hevc-conformance-CAINIT_E_SHARP_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x1cf21d79
>  0,          1,          1,        1,   599040, 0x1cf21d79
>  0,          2,          2,        1,   599040, 0xb54ee9e0
> diff --git a/tests/ref/fate/hevc-conformance-CAINIT_F_SHARP_3 b/tests/ref/fate/hevc-conformance-CAINIT_F_SHARP_3
> index aeba53b..cbe498b 100644
> --- a/tests/ref/fate/hevc-conformance-CAINIT_F_SHARP_3
> +++ b/tests/ref/fate/hevc-conformance-CAINIT_F_SHARP_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x1cf21d79
>  0,          1,          1,        1,   599040, 0x1cf21d79
>  0,          2,          2,        1,   599040, 0xc182eaa8
> diff --git a/tests/ref/fate/hevc-conformance-CAINIT_G_SHARP_3 b/tests/ref/fate/hevc-conformance-CAINIT_G_SHARP_3
> index e0501be..e7cc4bb 100644
> --- a/tests/ref/fate/hevc-conformance-CAINIT_G_SHARP_3
> +++ b/tests/ref/fate/hevc-conformance-CAINIT_G_SHARP_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0xd9b73cbe
>  0,          1,          1,        1,   599040, 0xd9b73cbe
>  0,          2,          2,        1,   599040, 0xe4e5dd7c
> diff --git a/tests/ref/fate/hevc-conformance-CAINIT_H_SHARP_3 b/tests/ref/fate/hevc-conformance-CAINIT_H_SHARP_3
> index 01ab258..aadc24a 100644
> --- a/tests/ref/fate/hevc-conformance-CAINIT_H_SHARP_3
> +++ b/tests/ref/fate/hevc-conformance-CAINIT_H_SHARP_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0xd9b73cbe
>  0,          1,          1,        1,   599040, 0xd9b73cbe
>  0,          2,          2,        1,   599040, 0x93a3fabf
> diff --git a/tests/ref/fate/hevc-conformance-CIP_A_Panasonic_3 b/tests/ref/fate/hevc-conformance-CIP_A_Panasonic_3
> index afa4854..3adef2f 100644
> --- a/tests/ref/fate/hevc-conformance-CIP_A_Panasonic_3
> +++ b/tests/ref/fate/hevc-conformance-CIP_A_Panasonic_3
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x6e1f16d0
>  0,          1,          1,        1,   149760, 0x5be5bde9
> diff --git a/tests/ref/fate/hevc-conformance-CIP_C_Panasonic_2 b/tests/ref/fate/hevc-conformance-CIP_C_Panasonic_2
> index 3346e20..8e6c681 100644
> --- a/tests/ref/fate/hevc-conformance-CIP_C_Panasonic_2
> +++ b/tests/ref/fate/hevc-conformance-CIP_C_Panasonic_2
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xcd1019b2
>  0,          1,          1,        1,   149760, 0xeb39efeb
> diff --git a/tests/ref/fate/hevc-conformance-CONFWIN_A_Sony_1 b/tests/ref/fate/hevc-conformance-CONFWIN_A_Sony_1
> index 3cd7a26..1d4af3d 100644
> --- a/tests/ref/fate/hevc-conformance-CONFWIN_A_Sony_1
> +++ b/tests/ref/fate/hevc-conformance-CONFWIN_A_Sony_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 412x236
> +#sar 0: 0/1
>  0,          0,          0,        1,   145848, 0xad4f07d0
>  0,          1,          1,        1,   145848, 0x5825120c
>  0,          2,          2,        1,   145848, 0x3eeb0da2
> diff --git a/tests/ref/fate/hevc-conformance-DBLK_A_MAIN10_VIXS_3 b/tests/ref/fate/hevc-conformance-DBLK_A_MAIN10_VIXS_3
> index 50be4f1..f33b162 100644
> --- a/tests/ref/fate/hevc-conformance-DBLK_A_MAIN10_VIXS_3
> +++ b/tests/ref/fate/hevc-conformance-DBLK_A_MAIN10_VIXS_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    76032, 0x4313935b
>  0,          1,          1,        1,    76032, 0x4c8071b5
>  0,          2,          2,        1,    76032, 0x5e627edc
> diff --git a/tests/ref/fate/hevc-conformance-DBLK_A_SONY_3 b/tests/ref/fate/hevc-conformance-DBLK_A_SONY_3
> index 589cbf3..4571119 100644
> --- a/tests/ref/fate/hevc-conformance-DBLK_A_SONY_3
> +++ b/tests/ref/fate/hevc-conformance-DBLK_A_SONY_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x154e6dd9
>  0,          1,          1,        1,   599040, 0xcce25693
>  0,          2,          2,        1,   599040, 0x3dd84e88
> diff --git a/tests/ref/fate/hevc-conformance-DBLK_B_SONY_3 b/tests/ref/fate/hevc-conformance-DBLK_B_SONY_3
> index 077b38e..eebb5a3 100644
> --- a/tests/ref/fate/hevc-conformance-DBLK_B_SONY_3
> +++ b/tests/ref/fate/hevc-conformance-DBLK_B_SONY_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0xda0cb5d4
>  0,          1,          1,        1,   599040, 0x352bc397
>  0,          2,          2,        1,   599040, 0x72bc28fe
> diff --git a/tests/ref/fate/hevc-conformance-DBLK_C_SONY_3 b/tests/ref/fate/hevc-conformance-DBLK_C_SONY_3
> index 823988d..c452c19 100644
> --- a/tests/ref/fate/hevc-conformance-DBLK_C_SONY_3
> +++ b/tests/ref/fate/hevc-conformance-DBLK_C_SONY_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x57369bf4
>  0,          1,          1,        1,   599040, 0x319aab9c
>  0,          2,          2,        1,   599040, 0xbc1b7698
> diff --git a/tests/ref/fate/hevc-conformance-DBLK_D_VIXS_2 b/tests/ref/fate/hevc-conformance-DBLK_D_VIXS_2
> index 2bdc548..4a15b95 100644
> --- a/tests/ref/fate/hevc-conformance-DBLK_D_VIXS_2
> +++ b/tests/ref/fate/hevc-conformance-DBLK_D_VIXS_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  1382400, 0x6ef5c76e
>  0,          1,          1,        1,  1382400, 0x1e1926b1
>  0,          2,          2,        1,  1382400, 0x69888786
> diff --git a/tests/ref/fate/hevc-conformance-DBLK_E_VIXS_2 b/tests/ref/fate/hevc-conformance-DBLK_E_VIXS_2
> index 4c8b07d..8bde7a7 100644
> --- a/tests/ref/fate/hevc-conformance-DBLK_E_VIXS_2
> +++ b/tests/ref/fate/hevc-conformance-DBLK_E_VIXS_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  1382400, 0xecfdf606
>  0,          1,          1,        1,  1382400, 0x0b0382e1
>  0,          2,          2,        1,  1382400, 0xbef3afd6
> diff --git a/tests/ref/fate/hevc-conformance-DBLK_F_VIXS_2 b/tests/ref/fate/hevc-conformance-DBLK_F_VIXS_2
> index 3ff62e5..8794dbb 100644
> --- a/tests/ref/fate/hevc-conformance-DBLK_F_VIXS_2
> +++ b/tests/ref/fate/hevc-conformance-DBLK_F_VIXS_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  1382400, 0xea27f7bd
>  0,          1,          1,        1,  1382400, 0x423e555b
>  0,          2,          2,        1,  1382400, 0x87898ae0
> diff --git a/tests/ref/fate/hevc-conformance-DBLK_G_VIXS_2 b/tests/ref/fate/hevc-conformance-DBLK_G_VIXS_2
> index 4c8b07d..8bde7a7 100644
> --- a/tests/ref/fate/hevc-conformance-DBLK_G_VIXS_2
> +++ b/tests/ref/fate/hevc-conformance-DBLK_G_VIXS_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  1382400, 0xecfdf606
>  0,          1,          1,        1,  1382400, 0x0b0382e1
>  0,          2,          2,        1,  1382400, 0xbef3afd6
> diff --git a/tests/ref/fate/hevc-conformance-DELTAQP_A_BRCM_4 b/tests/ref/fate/hevc-conformance-DELTAQP_A_BRCM_4
> index d2ab0f5..2abd58b 100644
> --- a/tests/ref/fate/hevc-conformance-DELTAQP_A_BRCM_4
> +++ b/tests/ref/fate/hevc-conformance-DELTAQP_A_BRCM_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1088
> +#sar 0: 0/1
>  0,          0,          0,        1,  3133440, 0xfbd10331
>  0,          1,          1,        1,  3133440, 0x7764ad70
>  0,          2,          2,        1,  3133440, 0xaeaf44c1
> diff --git a/tests/ref/fate/hevc-conformance-DELTAQP_B_SONY_3 b/tests/ref/fate/hevc-conformance-DELTAQP_B_SONY_3
> index 3ba3bb5..b88c9f8 100644
> --- a/tests/ref/fate/hevc-conformance-DELTAQP_B_SONY_3
> +++ b/tests/ref/fate/hevc-conformance-DELTAQP_B_SONY_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x7ea9597c
>  0,          1,          1,        1,   599040, 0x3e7365e4
>  0,          2,          2,        1,   599040, 0x4a9149c9
> diff --git a/tests/ref/fate/hevc-conformance-DELTAQP_C_SONY_3 b/tests/ref/fate/hevc-conformance-DELTAQP_C_SONY_3
> index d616bac..56d4f05 100644
> --- a/tests/ref/fate/hevc-conformance-DELTAQP_C_SONY_3
> +++ b/tests/ref/fate/hevc-conformance-DELTAQP_C_SONY_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0xcb2969c5
>  0,          1,          1,        1,   599040, 0xd9825d1f
>  0,          2,          2,        1,   599040, 0x5ff4245a
> diff --git a/tests/ref/fate/hevc-conformance-DSLICE_A_HHI_5 b/tests/ref/fate/hevc-conformance-DSLICE_A_HHI_5
> index 6cd113b..999a76a 100644
> --- a/tests/ref/fate/hevc-conformance-DSLICE_A_HHI_5
> +++ b/tests/ref/fate/hevc-conformance-DSLICE_A_HHI_5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  3110400, 0xdc18cd12
>  0,          1,          1,        1,  3110400, 0x42f7020d
>  0,          2,          2,        1,  3110400, 0x6ac4421a
> diff --git a/tests/ref/fate/hevc-conformance-DSLICE_B_HHI_5 b/tests/ref/fate/hevc-conformance-DSLICE_B_HHI_5
> index 7626d76..84a0c79 100644
> --- a/tests/ref/fate/hevc-conformance-DSLICE_B_HHI_5
> +++ b/tests/ref/fate/hevc-conformance-DSLICE_B_HHI_5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  3110400, 0x96995c57
>  0,          1,          1,        1,  3110400, 0x2924a10f
>  0,          2,          2,        1,  3110400, 0x892e146c
> diff --git a/tests/ref/fate/hevc-conformance-DSLICE_C_HHI_5 b/tests/ref/fate/hevc-conformance-DSLICE_C_HHI_5
> index c4275cb..4b0d108 100644
> --- a/tests/ref/fate/hevc-conformance-DSLICE_C_HHI_5
> +++ b/tests/ref/fate/hevc-conformance-DSLICE_C_HHI_5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  3110400, 0x62a2ceab
>  0,          1,          1,        1,  3110400, 0x5e4d6adc
>  0,          2,          2,        1,  3110400, 0x4ad0955d
> diff --git a/tests/ref/fate/hevc-conformance-ENTP_A_Qualcomm_1 b/tests/ref/fate/hevc-conformance-ENTP_A_Qualcomm_1
> index 4454bfa..26848c5 100644
> --- a/tests/ref/fate/hevc-conformance-ENTP_A_Qualcomm_1
> +++ b/tests/ref/fate/hevc-conformance-ENTP_A_Qualcomm_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  3110400, 0x26663e50
>  0,          1,          1,        1,  3110400, 0x64ae36c1
>  0,          2,          2,        1,  3110400, 0x5c72ac0b
> diff --git a/tests/ref/fate/hevc-conformance-ENTP_B_Qualcomm_1 b/tests/ref/fate/hevc-conformance-ENTP_B_Qualcomm_1
> index 547b590..70f0a6d 100644
> --- a/tests/ref/fate/hevc-conformance-ENTP_B_Qualcomm_1
> +++ b/tests/ref/fate/hevc-conformance-ENTP_B_Qualcomm_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  3110400, 0x7d014690
>  0,          1,          1,        1,  3110400, 0xe02cd173
>  0,          2,          2,        1,  3110400, 0x2f9794c5
> diff --git a/tests/ref/fate/hevc-conformance-ENTP_C_Qualcomm_1 b/tests/ref/fate/hevc-conformance-ENTP_C_Qualcomm_1
> index 2c21f35..fd2c47f 100644
> --- a/tests/ref/fate/hevc-conformance-ENTP_C_Qualcomm_1
> +++ b/tests/ref/fate/hevc-conformance-ENTP_C_Qualcomm_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  3110400, 0x4ea3fa57
>  0,          1,          1,        1,  3110400, 0xbe33724f
>  0,          2,          2,        1,  3110400, 0x9011755e
> diff --git a/tests/ref/fate/hevc-conformance-EXT_A_ericsson_4 b/tests/ref/fate/hevc-conformance-EXT_A_ericsson_4
> index bf4616a..4e186d6 100644
> --- a/tests/ref/fate/hevc-conformance-EXT_A_ericsson_4
> +++ b/tests/ref/fate/hevc-conformance-EXT_A_ericsson_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8ce7200b
>  0,          1,          1,        1,   149760, 0xf97412f6
>  0,          2,          2,        1,   149760, 0x0ea132c4
> diff --git a/tests/ref/fate/hevc-conformance-FILLER_A_Sony_1 b/tests/ref/fate/hevc-conformance-FILLER_A_Sony_1
> index 809b4cd..08c3375 100644
> --- a/tests/ref/fate/hevc-conformance-FILLER_A_Sony_1
> +++ b/tests/ref/fate/hevc-conformance-FILLER_A_Sony_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x83261e41
>  0,          1,          1,        1,   149760, 0xa8c02e8e
>  0,          2,          2,        1,   149760, 0xb89d1fa0
> diff --git a/tests/ref/fate/hevc-conformance-HRD_A_Fujitsu_2 b/tests/ref/fate/hevc-conformance-HRD_A_Fujitsu_2
> index d887df2..81f25a5 100644
> --- a/tests/ref/fate/hevc-conformance-HRD_A_Fujitsu_2
> +++ b/tests/ref/fate/hevc-conformance-HRD_A_Fujitsu_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x49bcac59
>  0,          1,          1,        1,   149760, 0x30ffadcd
>  0,          2,          2,        1,   149760, 0x85ccc14a
> diff --git a/tests/ref/fate/hevc-conformance-HRD_A_Fujitsu_3 b/tests/ref/fate/hevc-conformance-HRD_A_Fujitsu_3
> index 7446ae8..534874b 100644
> --- a/tests/ref/fate/hevc-conformance-HRD_A_Fujitsu_3
> +++ b/tests/ref/fate/hevc-conformance-HRD_A_Fujitsu_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xa329afaa
>  0,          1,          1,        1,   149760, 0xb326c405
>  0,          2,          2,        1,   149760, 0x7834b936
> diff --git a/tests/ref/fate/hevc-conformance-INITQP_A_Sony_1 b/tests/ref/fate/hevc-conformance-INITQP_A_Sony_1
> index e99e389..8cc652f 100644
> --- a/tests/ref/fate/hevc-conformance-INITQP_A_Sony_1
> +++ b/tests/ref/fate/hevc-conformance-INITQP_A_Sony_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x59891e4e
>  0,          1,          1,        1,   149760, 0x6c152de8
>  0,          2,          2,        1,   149760, 0x6f2c0f37
> diff --git a/tests/ref/fate/hevc-conformance-INITQP_B_Sony_1 b/tests/ref/fate/hevc-conformance-INITQP_B_Sony_1
> index e00c29f..ca98245 100644
> --- a/tests/ref/fate/hevc-conformance-INITQP_B_Sony_1
> +++ b/tests/ref/fate/hevc-conformance-INITQP_B_Sony_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   299520, 0x5514958a
>  0,          1,          1,        1,   299520, 0x06725ede
>  0,          2,          2,        1,   299520, 0xa71d1493
> diff --git a/tests/ref/fate/hevc-conformance-IPCM_A_RExt_NEC b/tests/ref/fate/hevc-conformance-IPCM_A_RExt_NEC
> index d05de74..a0ed530 100644
> --- a/tests/ref/fate/hevc-conformance-IPCM_A_RExt_NEC
> +++ b/tests/ref/fate/hevc-conformance-IPCM_A_RExt_NEC
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   399360, 0xbac29a51
> diff --git a/tests/ref/fate/hevc-conformance-IPCM_B_RExt_NEC b/tests/ref/fate/hevc-conformance-IPCM_B_RExt_NEC
> index a01c3b5..94c1247 100644
> --- a/tests/ref/fate/hevc-conformance-IPCM_B_RExt_NEC
> +++ b/tests/ref/fate/hevc-conformance-IPCM_B_RExt_NEC
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x1f808406
> diff --git a/tests/ref/fate/hevc-conformance-IPRED_A_docomo_2 b/tests/ref/fate/hevc-conformance-IPRED_A_docomo_2
> index 33878fd..a666524 100644
> --- a/tests/ref/fate/hevc-conformance-IPRED_A_docomo_2
> +++ b/tests/ref/fate/hevc-conformance-IPRED_A_docomo_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0xac658d10
>  0,          1,          1,        1,   599040, 0xe3f65389
>  0,          2,          2,        1,   599040, 0xfbd644b0
> diff --git a/tests/ref/fate/hevc-conformance-IPRED_B_Nokia_3 b/tests/ref/fate/hevc-conformance-IPRED_B_Nokia_3
> index 4de7c3c..f3e8d6b 100644
> --- a/tests/ref/fate/hevc-conformance-IPRED_B_Nokia_3
> +++ b/tests/ref/fate/hevc-conformance-IPRED_B_Nokia_3
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  3110400, 0x11ef5ddd
> diff --git a/tests/ref/fate/hevc-conformance-IPRED_C_Mitsubishi_3 b/tests/ref/fate/hevc-conformance-IPRED_C_Mitsubishi_3
> index 72a12e8..9426a72 100644
> --- a/tests/ref/fate/hevc-conformance-IPRED_C_Mitsubishi_3
> +++ b/tests/ref/fate/hevc-conformance-IPRED_C_Mitsubishi_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x6b61371d
>  0,          1,          1,        1,   599040, 0xd38a2e50
>  0,          2,          2,        1,   599040, 0xe8eb34bd
> diff --git a/tests/ref/fate/hevc-conformance-LS_A_Orange_2 b/tests/ref/fate/hevc-conformance-LS_A_Orange_2
> index 4dd4ad4..f49ae01 100644
> --- a/tests/ref/fate/hevc-conformance-LS_A_Orange_2
> +++ b/tests/ref/fate/hevc-conformance-LS_A_Orange_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x94a51701
>  0,          1,          1,        1,   149760, 0x67c71885
>  0,          2,          2,        1,   149760, 0x218f1751
> diff --git a/tests/ref/fate/hevc-conformance-LS_B_ORANGE_4 b/tests/ref/fate/hevc-conformance-LS_B_ORANGE_4
> index 34dc379..e8d815b 100644
> --- a/tests/ref/fate/hevc-conformance-LS_B_ORANGE_4
> +++ b/tests/ref/fate/hevc-conformance-LS_B_ORANGE_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x25267761
>  0,          1,          1,        1,   599040, 0x4b4b6846
>  0,          2,          2,        1,   599040, 0x78e251e8
> diff --git a/tests/ref/fate/hevc-conformance-LTRPSPS_A_Qualcomm_1 b/tests/ref/fate/hevc-conformance-LTRPSPS_A_Qualcomm_1
> index ddf25c9..3479d62 100644
> --- a/tests/ref/fate/hevc-conformance-LTRPSPS_A_Qualcomm_1
> +++ b/tests/ref/fate/hevc-conformance-LTRPSPS_A_Qualcomm_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xcfffa013
>  0,          1,          1,        1,   149760, 0x8ae80654
>  0,          2,          2,        1,   149760, 0xa79915b8
> diff --git a/tests/ref/fate/hevc-conformance-MAXBINS_A_TI_4 b/tests/ref/fate/hevc-conformance-MAXBINS_A_TI_4
> index 9110cf6..433e215 100644
> --- a/tests/ref/fate/hevc-conformance-MAXBINS_A_TI_4
> +++ b/tests/ref/fate/hevc-conformance-MAXBINS_A_TI_4
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x9cad90f9
>  0,          1,          1,        1,   149760, 0x7deeab1c
> diff --git a/tests/ref/fate/hevc-conformance-MAXBINS_B_TI_4 b/tests/ref/fate/hevc-conformance-MAXBINS_B_TI_4
> index 5cad961..c18c13a 100644
> --- a/tests/ref/fate/hevc-conformance-MAXBINS_B_TI_4
> +++ b/tests/ref/fate/hevc-conformance-MAXBINS_B_TI_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x211e8487
>  0,          1,          1,        1,   149760, 0xa53b13d8
>  0,          2,          2,        1,   149760, 0xb63cc103
> diff --git a/tests/ref/fate/hevc-conformance-MAXBINS_C_TI_4 b/tests/ref/fate/hevc-conformance-MAXBINS_C_TI_4
> index 2eb3843..db0e3f7 100644
> --- a/tests/ref/fate/hevc-conformance-MAXBINS_C_TI_4
> +++ b/tests/ref/fate/hevc-conformance-MAXBINS_C_TI_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xa8d7adfa
>  0,          1,          1,        1,   149760, 0x76d1ddfe
>  0,          2,          2,        1,   149760, 0x56599cae
> diff --git a/tests/ref/fate/hevc-conformance-MERGE_A_TI_3 b/tests/ref/fate/hevc-conformance-MERGE_A_TI_3
> index 0ab6acc..447fb6b 100644
> --- a/tests/ref/fate/hevc-conformance-MERGE_A_TI_3
> +++ b/tests/ref/fate/hevc-conformance-MERGE_A_TI_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8edb27d7
>  0,          1,          1,        1,   149760, 0x16eb25a8
>  0,          2,          2,        1,   149760, 0xcfff29c8
> diff --git a/tests/ref/fate/hevc-conformance-MERGE_B_TI_3 b/tests/ref/fate/hevc-conformance-MERGE_B_TI_3
> index 2f9395f..dcab89e 100644
> --- a/tests/ref/fate/hevc-conformance-MERGE_B_TI_3
> +++ b/tests/ref/fate/hevc-conformance-MERGE_B_TI_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8edb27d7
>  0,          1,          1,        1,   149760, 0xb5932505
>  0,          2,          2,        1,   149760, 0xa5b20e66
> diff --git a/tests/ref/fate/hevc-conformance-MERGE_C_TI_3 b/tests/ref/fate/hevc-conformance-MERGE_C_TI_3
> index bcc5a1a..703480c 100644
> --- a/tests/ref/fate/hevc-conformance-MERGE_C_TI_3
> +++ b/tests/ref/fate/hevc-conformance-MERGE_C_TI_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8edb27d7
>  0,          1,          1,        1,   149760, 0x88cb1216
>  0,          2,          2,        1,   149760, 0x6d1024da
> diff --git a/tests/ref/fate/hevc-conformance-MERGE_D_TI_3 b/tests/ref/fate/hevc-conformance-MERGE_D_TI_3
> index 7b4df26..c74094b 100644
> --- a/tests/ref/fate/hevc-conformance-MERGE_D_TI_3
> +++ b/tests/ref/fate/hevc-conformance-MERGE_D_TI_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8edb27d7
>  0,          1,          1,        1,   149760, 0x3220183c
>  0,          2,          2,        1,   149760, 0x43a21acc
> diff --git a/tests/ref/fate/hevc-conformance-MERGE_E_TI_3 b/tests/ref/fate/hevc-conformance-MERGE_E_TI_3
> index 8491172..b300f87 100644
> --- a/tests/ref/fate/hevc-conformance-MERGE_E_TI_3
> +++ b/tests/ref/fate/hevc-conformance-MERGE_E_TI_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8edb27d7
>  0,          1,          1,        1,   149760, 0x187419b5
>  0,          2,          2,        1,   149760, 0x61100980
> diff --git a/tests/ref/fate/hevc-conformance-MERGE_F_MTK_4 b/tests/ref/fate/hevc-conformance-MERGE_F_MTK_4
> index 34a0979..005ba59 100644
> --- a/tests/ref/fate/hevc-conformance-MERGE_F_MTK_4
> +++ b/tests/ref/fate/hevc-conformance-MERGE_F_MTK_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xcfffa013
>  0,          1,          1,        1,   149760, 0xec800e71
>  0,          2,          2,        1,   149760, 0x9fb014c7
> diff --git a/tests/ref/fate/hevc-conformance-MERGE_G_HHI_4 b/tests/ref/fate/hevc-conformance-MERGE_G_HHI_4
> index 2e88350..6f66e4b 100644
> --- a/tests/ref/fate/hevc-conformance-MERGE_G_HHI_4
> +++ b/tests/ref/fate/hevc-conformance-MERGE_G_HHI_4
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x65433cfe
>  0,          1,          1,        1,   599040, 0x9309e2c5
> diff --git a/tests/ref/fate/hevc-conformance-MVCLIP_A_qualcomm_3 b/tests/ref/fate/hevc-conformance-MVCLIP_A_qualcomm_3
> index 6756221..f1cf7e3 100644
> --- a/tests/ref/fate/hevc-conformance-MVCLIP_A_qualcomm_3
> +++ b/tests/ref/fate/hevc-conformance-MVCLIP_A_qualcomm_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xa5b11720
>  0,          1,          1,        1,   149760, 0x42e52c6e
>  0,          2,          2,        1,   149760, 0x27b15a30
> diff --git a/tests/ref/fate/hevc-conformance-MVDL1ZERO_A_docomo_3 b/tests/ref/fate/hevc-conformance-MVDL1ZERO_A_docomo_3
> index 2019db2..789cd7c 100644
> --- a/tests/ref/fate/hevc-conformance-MVDL1ZERO_A_docomo_3
> +++ b/tests/ref/fate/hevc-conformance-MVDL1ZERO_A_docomo_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x9b27dc7d
>  0,          1,          1,        1,   599040, 0x796cdd26
>  0,          2,          2,        1,   599040, 0xd3c9dca9
> diff --git a/tests/ref/fate/hevc-conformance-MVEDGE_A_qualcomm_3 b/tests/ref/fate/hevc-conformance-MVEDGE_A_qualcomm_3
> index 0db06c5..4c676ea 100644
> --- a/tests/ref/fate/hevc-conformance-MVEDGE_A_qualcomm_3
> +++ b/tests/ref/fate/hevc-conformance-MVEDGE_A_qualcomm_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x1d68213a
>  0,          1,          1,        1,   149760, 0x9cc81d30
>  0,          2,          2,        1,   149760, 0xa3cf6438
> diff --git a/tests/ref/fate/hevc-conformance-Main_422_10_A_RExt_Sony_1 b/tests/ref/fate/hevc-conformance-Main_422_10_A_RExt_Sony_1
> index 6c43693..43cfb61 100644
> --- a/tests/ref/fate/hevc-conformance-Main_422_10_A_RExt_Sony_1
> +++ b/tests/ref/fate/hevc-conformance-Main_422_10_A_RExt_Sony_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  8294400, 0xa189c341
>  0,          1,          1,        1,  8294400, 0xefe07f3f
>  0,          2,          2,        1,  8294400, 0xf11cd41f
> diff --git a/tests/ref/fate/hevc-conformance-Main_422_10_B_RExt_Sony_1 b/tests/ref/fate/hevc-conformance-Main_422_10_B_RExt_Sony_1
> index 2267a09..dd95b52 100644
> --- a/tests/ref/fate/hevc-conformance-Main_422_10_B_RExt_Sony_1
> +++ b/tests/ref/fate/hevc-conformance-Main_422_10_B_RExt_Sony_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 2560x1600
> +#sar 0: 0/1
>  0,          0,          0,        1, 16384000, 0xbf300829
>  0,          1,          1,        1, 16384000, 0x7beeab61
>  0,          2,          2,        1, 16384000, 0x5e55cd13
> diff --git a/tests/ref/fate/hevc-conformance-NUT_A_ericsson_5 b/tests/ref/fate/hevc-conformance-NUT_A_ericsson_5
> index fe65880..7ac223e 100644
> --- a/tests/ref/fate/hevc-conformance-NUT_A_ericsson_5
> +++ b/tests/ref/fate/hevc-conformance-NUT_A_ericsson_5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8ce7200b
>  0,          1,          1,        1,   149760, 0x73610669
>  0,          2,          2,        1,   149760, 0x42942047
> diff --git a/tests/ref/fate/hevc-conformance-NoOutPrior_A_Qualcomm_1 b/tests/ref/fate/hevc-conformance-NoOutPrior_A_Qualcomm_1
> index 48ca5ad..5de9da9 100644
> --- a/tests/ref/fate/hevc-conformance-NoOutPrior_A_Qualcomm_1
> +++ b/tests/ref/fate/hevc-conformance-NoOutPrior_A_Qualcomm_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x91d452d5
>  0,          1,          1,        1,   599040, 0x1b482509
>  0,          2,          2,        1,   599040, 0xbc51425c
> diff --git a/tests/ref/fate/hevc-conformance-NoOutPrior_B_Qualcomm_1 b/tests/ref/fate/hevc-conformance-NoOutPrior_B_Qualcomm_1
> index 872c5c2..f107e93 100644
> --- a/tests/ref/fate/hevc-conformance-NoOutPrior_B_Qualcomm_1
> +++ b/tests/ref/fate/hevc-conformance-NoOutPrior_B_Qualcomm_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x91d452d5
>  0,          1,          1,        1,   599040, 0x1b482509
>  0,          2,          2,        1,   599040, 0xbc51425c
> diff --git a/tests/ref/fate/hevc-conformance-OPFLAG_A_Qualcomm_1 b/tests/ref/fate/hevc-conformance-OPFLAG_A_Qualcomm_1
> index 74849eb..ed2e9ec 100644
> --- a/tests/ref/fate/hevc-conformance-OPFLAG_A_Qualcomm_1
> +++ b/tests/ref/fate/hevc-conformance-OPFLAG_A_Qualcomm_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xcfffa013
>  0,          1,          1,        1,   149760, 0x8ae80654
>  0,          2,          2,        1,   149760, 0xa79915b8
> diff --git a/tests/ref/fate/hevc-conformance-OPFLAG_B_Qualcomm_1 b/tests/ref/fate/hevc-conformance-OPFLAG_B_Qualcomm_1
> index 55e4be0..cc4a22f 100644
> --- a/tests/ref/fate/hevc-conformance-OPFLAG_B_Qualcomm_1
> +++ b/tests/ref/fate/hevc-conformance-OPFLAG_B_Qualcomm_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x4246702a
>  0,          1,          1,        1,   599040, 0x25e02747
>  0,          2,          2,        1,   599040, 0x0894b9de
> diff --git a/tests/ref/fate/hevc-conformance-OPFLAG_C_Qualcomm_1 b/tests/ref/fate/hevc-conformance-OPFLAG_C_Qualcomm_1
> index e45005f..233b042 100644
> --- a/tests/ref/fate/hevc-conformance-OPFLAG_C_Qualcomm_1
> +++ b/tests/ref/fate/hevc-conformance-OPFLAG_C_Qualcomm_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x91d452d5
>  0,          1,          1,        1,   599040, 0x1b482509
>  0,          2,          2,        1,   599040, 0xbc51425c
> diff --git a/tests/ref/fate/hevc-conformance-PERSIST_RPARAM_A_RExt_Sony_1 b/tests/ref/fate/hevc-conformance-PERSIST_RPARAM_A_RExt_Sony_1
> index 4e49caa..54f4db8 100644
> --- a/tests/ref/fate/hevc-conformance-PERSIST_RPARAM_A_RExt_Sony_1
> +++ b/tests/ref/fate/hevc-conformance-PERSIST_RPARAM_A_RExt_Sony_1
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 400x384
> +#sar 0: 0/1
>  0,          0,          0,        1,   921600, 0x702f0d67
>  0,          1,          1,        1,   921600, 0x99822b52
> diff --git a/tests/ref/fate/hevc-conformance-PICSIZE_A_Bossen_1 b/tests/ref/fate/hevc-conformance-PICSIZE_A_Bossen_1
> index 4c09ca5..5bb3f53 100644
> --- a/tests/ref/fate/hevc-conformance-PICSIZE_A_Bossen_1
> +++ b/tests/ref/fate/hevc-conformance-PICSIZE_A_Bossen_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1056x8440
> +#sar 0: 0/1
>  0,          0,          0,        1, 13368960, 0x830b3a1d
>  0,          1,          1,        1, 13368960, 0x120ca009
>  0,          2,          2,        1, 13368960, 0xc94e0d86
> diff --git a/tests/ref/fate/hevc-conformance-PICSIZE_B_Bossen_1 b/tests/ref/fate/hevc-conformance-PICSIZE_B_Bossen_1
> index a3ab7c8..c1c6170 100644
> --- a/tests/ref/fate/hevc-conformance-PICSIZE_B_Bossen_1
> +++ b/tests/ref/fate/hevc-conformance-PICSIZE_B_Bossen_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 8440x1056
> +#sar 0: 0/1
>  0,          0,          0,        1, 13368960, 0xe1e32c3d
>  0,          1,          1,        1, 13368960, 0x75a503d3
>  0,          2,          2,        1, 13368960, 0x71f33a0a
> diff --git a/tests/ref/fate/hevc-conformance-PICSIZE_C_Bossen_1 b/tests/ref/fate/hevc-conformance-PICSIZE_C_Bossen_1
> index 10520d1..f3e2e02 100644
> --- a/tests/ref/fate/hevc-conformance-PICSIZE_C_Bossen_1
> +++ b/tests/ref/fate/hevc-conformance-PICSIZE_C_Bossen_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 528x4216
> +#sar 0: 0/1
>  0,          0,          0,        1,  3339072, 0x28be238d
>  0,          1,          1,        1,  3339072, 0x43b62aae
>  0,          2,          2,        1,  3339072, 0x36259da6
> diff --git a/tests/ref/fate/hevc-conformance-PICSIZE_D_Bossen_1 b/tests/ref/fate/hevc-conformance-PICSIZE_D_Bossen_1
> index 6f1c4fb..a73a969 100644
> --- a/tests/ref/fate/hevc-conformance-PICSIZE_D_Bossen_1
> +++ b/tests/ref/fate/hevc-conformance-PICSIZE_D_Bossen_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 4216x528
> +#sar 0: 0/1
>  0,          0,          0,        1,  3339072, 0xcb16f53e
>  0,          1,          1,        1,  3339072, 0x6f1da8ec
>  0,          2,          2,        1,  3339072, 0x978dae98
> diff --git a/tests/ref/fate/hevc-conformance-PMERGE_A_TI_3 b/tests/ref/fate/hevc-conformance-PMERGE_A_TI_3
> index 8491172..b300f87 100644
> --- a/tests/ref/fate/hevc-conformance-PMERGE_A_TI_3
> +++ b/tests/ref/fate/hevc-conformance-PMERGE_A_TI_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8edb27d7
>  0,          1,          1,        1,   149760, 0x187419b5
>  0,          2,          2,        1,   149760, 0x61100980
> diff --git a/tests/ref/fate/hevc-conformance-PMERGE_B_TI_3 b/tests/ref/fate/hevc-conformance-PMERGE_B_TI_3
> index 1f15a02..046c90a 100644
> --- a/tests/ref/fate/hevc-conformance-PMERGE_B_TI_3
> +++ b/tests/ref/fate/hevc-conformance-PMERGE_B_TI_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8edb27d7
>  0,          1,          1,        1,   149760, 0xcebf1b76
>  0,          2,          2,        1,   149760, 0x33930fb0
> diff --git a/tests/ref/fate/hevc-conformance-PMERGE_C_TI_3 b/tests/ref/fate/hevc-conformance-PMERGE_C_TI_3
> index bf474cc..1269e53 100644
> --- a/tests/ref/fate/hevc-conformance-PMERGE_C_TI_3
> +++ b/tests/ref/fate/hevc-conformance-PMERGE_C_TI_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8edb27d7
>  0,          1,          1,        1,   149760, 0x2c271a9b
>  0,          2,          2,        1,   149760, 0x53e419f3
> diff --git a/tests/ref/fate/hevc-conformance-PMERGE_D_TI_3 b/tests/ref/fate/hevc-conformance-PMERGE_D_TI_3
> index 2af0e1f..474626c 100644
> --- a/tests/ref/fate/hevc-conformance-PMERGE_D_TI_3
> +++ b/tests/ref/fate/hevc-conformance-PMERGE_D_TI_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8edb27d7
>  0,          1,          1,        1,   149760, 0xf11a32ce
>  0,          2,          2,        1,   149760, 0x0802237c
> diff --git a/tests/ref/fate/hevc-conformance-PMERGE_E_TI_3 b/tests/ref/fate/hevc-conformance-PMERGE_E_TI_3
> index df97237..e859699 100644
> --- a/tests/ref/fate/hevc-conformance-PMERGE_E_TI_3
> +++ b/tests/ref/fate/hevc-conformance-PMERGE_E_TI_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8edb27d7
>  0,          1,          1,        1,   149760, 0xea7b30bf
>  0,          2,          2,        1,   149760, 0x273d092a
> diff --git a/tests/ref/fate/hevc-conformance-POC_A_Bossen_3 b/tests/ref/fate/hevc-conformance-POC_A_Bossen_3
> index 885d0e4..940eede 100644
> --- a/tests/ref/fate/hevc-conformance-POC_A_Bossen_3
> +++ b/tests/ref/fate/hevc-conformance-POC_A_Bossen_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xda17acd4
>  0,          1,          1,        1,   149760, 0x1691b47f
>  0,          2,          2,        1,   149760, 0xeebeac0c
> diff --git a/tests/ref/fate/hevc-conformance-PPS_A_qualcomm_7 b/tests/ref/fate/hevc-conformance-PPS_A_qualcomm_7
> index ef57f74..de68310 100644
> --- a/tests/ref/fate/hevc-conformance-PPS_A_qualcomm_7
> +++ b/tests/ref/fate/hevc-conformance-PPS_A_qualcomm_7
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x87159328
>  0,          1,          1,        1,   599040, 0x825672ff
>  0,          2,          2,        1,   599040, 0x2f4224ff
> diff --git a/tests/ref/fate/hevc-conformance-PS_A_VIDYO_3 b/tests/ref/fate/hevc-conformance-PS_A_VIDYO_3
> index 8f7e5e6..59b82b7 100644
> --- a/tests/ref/fate/hevc-conformance-PS_A_VIDYO_3
> +++ b/tests/ref/fate/hevc-conformance-PS_A_VIDYO_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x88619f80
>  0,          1,          1,        1,   149760, 0x550bdaf0
>  0,          2,          2,        1,   149760, 0x4121f7a2
> diff --git a/tests/ref/fate/hevc-conformance-PS_B_VIDYO_3 b/tests/ref/fate/hevc-conformance-PS_B_VIDYO_3
> index 8f7e5e6..59b82b7 100644
> --- a/tests/ref/fate/hevc-conformance-PS_B_VIDYO_3
> +++ b/tests/ref/fate/hevc-conformance-PS_B_VIDYO_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x88619f80
>  0,          1,          1,        1,   149760, 0x550bdaf0
>  0,          2,          2,        1,   149760, 0x4121f7a2
> diff --git a/tests/ref/fate/hevc-conformance-QMATRIX_A_RExt_Sony_1 b/tests/ref/fate/hevc-conformance-QMATRIX_A_RExt_Sony_1
> index 63baa95..98d0bb3 100644
> --- a/tests/ref/fate/hevc-conformance-QMATRIX_A_RExt_Sony_1
> +++ b/tests/ref/fate/hevc-conformance-QMATRIX_A_RExt_Sony_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  2764800, 0xde442361
>  0,          1,          1,        1,  2764800, 0x8d482fdf
>  0,          2,          2,        1,  2764800, 0x9b431e37
> diff --git a/tests/ref/fate/hevc-conformance-RAP_A_docomo_4 b/tests/ref/fate/hevc-conformance-RAP_A_docomo_4
> index 268f4cd..51ea08b 100644
> --- a/tests/ref/fate/hevc-conformance-RAP_A_docomo_4
> +++ b/tests/ref/fate/hevc-conformance-RAP_A_docomo_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x1ae5f13d
>  0,          1,          1,        1,   149760, 0x0a6ad0e3
>  0,          2,          2,        1,   149760, 0x2415af05
> diff --git a/tests/ref/fate/hevc-conformance-RAP_B_Bossen_1 b/tests/ref/fate/hevc-conformance-RAP_B_Bossen_1
> index 56f5b44..53e733b 100644
> --- a/tests/ref/fate/hevc-conformance-RAP_B_Bossen_1
> +++ b/tests/ref/fate/hevc-conformance-RAP_B_Bossen_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xb989ae7a
>  0,          1,          1,        1,   149760, 0x4765caed
>  0,          2,          2,        1,   149760, 0xd908c148
> diff --git a/tests/ref/fate/hevc-conformance-RPLM_A_qualcomm_4 b/tests/ref/fate/hevc-conformance-RPLM_A_qualcomm_4
> index 372d120..7cb2bdf 100644
> --- a/tests/ref/fate/hevc-conformance-RPLM_A_qualcomm_4
> +++ b/tests/ref/fate/hevc-conformance-RPLM_A_qualcomm_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xdb5e3b56
>  0,          1,          1,        1,   149760, 0xd5320970
>  0,          2,          2,        1,   149760, 0x9387ed18
> diff --git a/tests/ref/fate/hevc-conformance-RPLM_B_qualcomm_4 b/tests/ref/fate/hevc-conformance-RPLM_B_qualcomm_4
> index a34dcc0..5515c67 100644
> --- a/tests/ref/fate/hevc-conformance-RPLM_B_qualcomm_4
> +++ b/tests/ref/fate/hevc-conformance-RPLM_B_qualcomm_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x82ff0cca
>  0,          1,          1,        1,   149760, 0xcd05ba17
>  0,          2,          2,        1,   149760, 0x33a5b924
> diff --git a/tests/ref/fate/hevc-conformance-RPS_A_docomo_4 b/tests/ref/fate/hevc-conformance-RPS_A_docomo_4
> index e29a74b..5ec1474 100644
> --- a/tests/ref/fate/hevc-conformance-RPS_A_docomo_4
> +++ b/tests/ref/fate/hevc-conformance-RPS_A_docomo_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8edb27d7
>  0,          1,          1,        1,   149760, 0x0bdf13f8
>  0,          2,          2,        1,   149760, 0x45e702c7
> diff --git a/tests/ref/fate/hevc-conformance-RPS_B_qualcomm_5 b/tests/ref/fate/hevc-conformance-RPS_B_qualcomm_5
> index 3b24e75..9c9d894 100644
> --- a/tests/ref/fate/hevc-conformance-RPS_B_qualcomm_5
> +++ b/tests/ref/fate/hevc-conformance-RPS_B_qualcomm_5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xdb5e3b56
>  0,          1,          1,        1,   149760, 0xe328e677
>  0,          2,          2,        1,   149760, 0x8f18f4c0
> diff --git a/tests/ref/fate/hevc-conformance-RPS_C_ericsson_5 b/tests/ref/fate/hevc-conformance-RPS_C_ericsson_5
> index e97e7ea..840d816 100644
> --- a/tests/ref/fate/hevc-conformance-RPS_C_ericsson_5
> +++ b/tests/ref/fate/hevc-conformance-RPS_C_ericsson_5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8ce7200b
>  0,          1,          1,        1,   149760, 0x85340cda
>  0,          2,          2,        1,   149760, 0x16fd1f91
> diff --git a/tests/ref/fate/hevc-conformance-RPS_D_ericsson_6 b/tests/ref/fate/hevc-conformance-RPS_D_ericsson_6
> index 2851704..9c0fc6c 100644
> --- a/tests/ref/fate/hevc-conformance-RPS_D_ericsson_6
> +++ b/tests/ref/fate/hevc-conformance-RPS_D_ericsson_6
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8ce7200b
>  0,          1,          1,        1,   149760, 0x73610669
>  0,          2,          2,        1,   149760, 0xc01620f4
> diff --git a/tests/ref/fate/hevc-conformance-RPS_E_qualcomm_5 b/tests/ref/fate/hevc-conformance-RPS_E_qualcomm_5
> index 82c25e1..51c6300 100644
> --- a/tests/ref/fate/hevc-conformance-RPS_E_qualcomm_5
> +++ b/tests/ref/fate/hevc-conformance-RPS_E_qualcomm_5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8edb27d7
>  0,          1,          1,        1,   149760, 0xd62a31bc
>  0,          2,          2,        1,   149760, 0xec822f84
> diff --git a/tests/ref/fate/hevc-conformance-RPS_F_docomo_1 b/tests/ref/fate/hevc-conformance-RPS_F_docomo_1
> index 06ae9c1..0270e9d 100644
> --- a/tests/ref/fate/hevc-conformance-RPS_F_docomo_1
> +++ b/tests/ref/fate/hevc-conformance-RPS_F_docomo_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x8edb27d7
>  0,          1,          1,        1,   149760, 0x0bdf13f8
>  0,          2,          2,        1,   149760, 0x45e702c7
> diff --git a/tests/ref/fate/hevc-conformance-RQT_A_HHI_4 b/tests/ref/fate/hevc-conformance-RQT_A_HHI_4
> index 5f2b9da..c5a106e 100644
> --- a/tests/ref/fate/hevc-conformance-RQT_A_HHI_4
> +++ b/tests/ref/fate/hevc-conformance-RQT_A_HHI_4
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x5c0f5423
>  0,          1,          1,        1,   599040, 0x3d23be58
> diff --git a/tests/ref/fate/hevc-conformance-RQT_B_HHI_4 b/tests/ref/fate/hevc-conformance-RQT_B_HHI_4
> index dcf2691..f4f0c26 100644
> --- a/tests/ref/fate/hevc-conformance-RQT_B_HHI_4
> +++ b/tests/ref/fate/hevc-conformance-RQT_B_HHI_4
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x69854954
>  0,          1,          1,        1,   599040, 0x695ebc85
> diff --git a/tests/ref/fate/hevc-conformance-RQT_C_HHI_4 b/tests/ref/fate/hevc-conformance-RQT_C_HHI_4
> index 2e88350..6f66e4b 100644
> --- a/tests/ref/fate/hevc-conformance-RQT_C_HHI_4
> +++ b/tests/ref/fate/hevc-conformance-RQT_C_HHI_4
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x65433cfe
>  0,          1,          1,        1,   599040, 0x9309e2c5
> diff --git a/tests/ref/fate/hevc-conformance-RQT_D_HHI_4 b/tests/ref/fate/hevc-conformance-RQT_D_HHI_4
> index 7f73896..016d9eb 100644
> --- a/tests/ref/fate/hevc-conformance-RQT_D_HHI_4
> +++ b/tests/ref/fate/hevc-conformance-RQT_D_HHI_4
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x88d741bf
>  0,          1,          1,        1,   599040, 0xbbd9ab22
> diff --git a/tests/ref/fate/hevc-conformance-RQT_E_HHI_4 b/tests/ref/fate/hevc-conformance-RQT_E_HHI_4
> index f062318..0cb3767 100644
> --- a/tests/ref/fate/hevc-conformance-RQT_E_HHI_4
> +++ b/tests/ref/fate/hevc-conformance-RQT_E_HHI_4
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0xce2e511d
>  0,          1,          1,        1,   599040, 0xe55192d0
> diff --git a/tests/ref/fate/hevc-conformance-RQT_F_HHI_4 b/tests/ref/fate/hevc-conformance-RQT_F_HHI_4
> index 26bf5ac..f6904c6 100644
> --- a/tests/ref/fate/hevc-conformance-RQT_F_HHI_4
> +++ b/tests/ref/fate/hevc-conformance-RQT_F_HHI_4
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x65433cfe
>  0,          1,          1,        1,   599040, 0x6f99cc5f
> diff --git a/tests/ref/fate/hevc-conformance-RQT_G_HHI_4 b/tests/ref/fate/hevc-conformance-RQT_G_HHI_4
> index d36ea01..ed67f43 100644
> --- a/tests/ref/fate/hevc-conformance-RQT_G_HHI_4
> +++ b/tests/ref/fate/hevc-conformance-RQT_G_HHI_4
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x5c0f5423
>  0,          1,          1,        1,   599040, 0xe805b181
> diff --git a/tests/ref/fate/hevc-conformance-SAO_A_MediaTek_4 b/tests/ref/fate/hevc-conformance-SAO_A_MediaTek_4
> index 01226d9..d9066ff 100644
> --- a/tests/ref/fate/hevc-conformance-SAO_A_MediaTek_4
> +++ b/tests/ref/fate/hevc-conformance-SAO_A_MediaTek_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x304198c2
>  0,          1,          1,        1,   149760, 0xe765e30d
>  0,          2,          2,        1,   149760, 0x0130a054
> diff --git a/tests/ref/fate/hevc-conformance-SAO_A_RExt_MediaTek_1 b/tests/ref/fate/hevc-conformance-SAO_A_RExt_MediaTek_1
> index b6ed211..24736a9 100644
> --- a/tests/ref/fate/hevc-conformance-SAO_A_RExt_MediaTek_1
> +++ b/tests/ref/fate/hevc-conformance-SAO_A_RExt_MediaTek_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 2560x1600
> +#sar 0: 0/1
>  0,          0,          0,        1, 24576000, 0x5b01ceed
>  0,          1,          1,        1, 24576000, 0x043fa798
>  0,          2,          2,        1, 24576000, 0x9ec62721
> diff --git a/tests/ref/fate/hevc-conformance-SAO_B_MediaTek_5 b/tests/ref/fate/hevc-conformance-SAO_B_MediaTek_5
> index 9da0268..1e593b1 100644
> --- a/tests/ref/fate/hevc-conformance-SAO_B_MediaTek_5
> +++ b/tests/ref/fate/hevc-conformance-SAO_B_MediaTek_5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0xe56f6a5c
>  0,          1,          1,        1,   599040, 0x31ec1bb9
>  0,          2,          2,        1,   599040, 0xf3ce0311
> diff --git a/tests/ref/fate/hevc-conformance-SAO_C_Samsung_4 b/tests/ref/fate/hevc-conformance-SAO_C_Samsung_4
> index f87921d..fa4cdfc 100644
> --- a/tests/ref/fate/hevc-conformance-SAO_C_Samsung_4
> +++ b/tests/ref/fate/hevc-conformance-SAO_C_Samsung_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xf923a1a0
>  0,          1,          1,        1,   149760, 0x614d851a
>  0,          2,          2,        1,   149760, 0xc3976ce4
> diff --git a/tests/ref/fate/hevc-conformance-SAO_C_Samsung_5 b/tests/ref/fate/hevc-conformance-SAO_C_Samsung_5
> index 4cb1f78..2344dce 100644
> --- a/tests/ref/fate/hevc-conformance-SAO_C_Samsung_5
> +++ b/tests/ref/fate/hevc-conformance-SAO_C_Samsung_5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  3110400, 0x6fe6508f
>  0,          1,          1,        1,  3110400, 0xa56a3403
>  0,          2,          2,        1,  3110400, 0x45db0973
> diff --git a/tests/ref/fate/hevc-conformance-SAO_D_Samsung_4 b/tests/ref/fate/hevc-conformance-SAO_D_Samsung_4
> index ce1cefe..df3e417 100644
> --- a/tests/ref/fate/hevc-conformance-SAO_D_Samsung_4
> +++ b/tests/ref/fate/hevc-conformance-SAO_D_Samsung_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x0d2edbbc
>  0,          1,          1,        1,   149760, 0x4830af95
>  0,          2,          2,        1,   149760, 0x39e8d3bb
> diff --git a/tests/ref/fate/hevc-conformance-SAO_D_Samsung_5 b/tests/ref/fate/hevc-conformance-SAO_D_Samsung_5
> index a1884dd..1a51cf3 100644
> --- a/tests/ref/fate/hevc-conformance-SAO_D_Samsung_5
> +++ b/tests/ref/fate/hevc-conformance-SAO_D_Samsung_5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  3110400, 0xcfb2f251
>  0,          1,          1,        1,  3110400, 0xc2621936
>  0,          2,          2,        1,  3110400, 0x5cb42788
> diff --git a/tests/ref/fate/hevc-conformance-SAO_E_Canon_4 b/tests/ref/fate/hevc-conformance-SAO_E_Canon_4
> index 92aa7f4..7051b43 100644
> --- a/tests/ref/fate/hevc-conformance-SAO_E_Canon_4
> +++ b/tests/ref/fate/hevc-conformance-SAO_E_Canon_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x1613b277
>  0,          1,          1,        1,   149760, 0xf92d5543
>  0,          2,          2,        1,   149760, 0xf119ba8e
> diff --git a/tests/ref/fate/hevc-conformance-SAO_F_Canon_3 b/tests/ref/fate/hevc-conformance-SAO_F_Canon_3
> index cf24055..613e70d 100644
> --- a/tests/ref/fate/hevc-conformance-SAO_F_Canon_3
> +++ b/tests/ref/fate/hevc-conformance-SAO_F_Canon_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x92b5107a
>  0,          1,          1,        1,   149760, 0x97eb31ef
>  0,          2,          2,        1,   149760, 0xeb743e30
> diff --git a/tests/ref/fate/hevc-conformance-SAO_G_Canon_3 b/tests/ref/fate/hevc-conformance-SAO_G_Canon_3
> index 5ce6772..8f3f9ac 100644
> --- a/tests/ref/fate/hevc-conformance-SAO_G_Canon_3
> +++ b/tests/ref/fate/hevc-conformance-SAO_G_Canon_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xc4f239e0
>  0,          1,          1,        1,   149760, 0xf57a2e44
>  0,          2,          2,        1,   149760, 0xbf1e9995
> diff --git a/tests/ref/fate/hevc-conformance-SDH_A_Orange_3 b/tests/ref/fate/hevc-conformance-SDH_A_Orange_3
> index caf90ee..f3ef192 100644
> --- a/tests/ref/fate/hevc-conformance-SDH_A_Orange_3
> +++ b/tests/ref/fate/hevc-conformance-SDH_A_Orange_3
> @@ -1,3 +1,7 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  3110400, 0x0117aa5d
>  0,          1,          1,        1,  3110400, 0xa737bc56
> diff --git a/tests/ref/fate/hevc-conformance-SLICES_A_Rovi_3 b/tests/ref/fate/hevc-conformance-SLICES_A_Rovi_3
> index f884f7f..c45dfd6 100644
> --- a/tests/ref/fate/hevc-conformance-SLICES_A_Rovi_3
> +++ b/tests/ref/fate/hevc-conformance-SLICES_A_Rovi_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   460800, 0x7f06cb02
>  0,          1,          1,        1,   460800, 0x1ad483aa
>  0,          2,          2,        1,   460800, 0x1bbbc991
> diff --git a/tests/ref/fate/hevc-conformance-SLIST_A_Sony_4 b/tests/ref/fate/hevc-conformance-SLIST_A_Sony_4
> index ebb65c3..9e68d0d 100644
> --- a/tests/ref/fate/hevc-conformance-SLIST_A_Sony_4
> +++ b/tests/ref/fate/hevc-conformance-SLIST_A_Sony_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0xbd0eb43e
>  0,          1,          1,        1,   599040, 0x4c3a98b5
>  0,          2,          2,        1,   599040, 0x105410dc
> diff --git a/tests/ref/fate/hevc-conformance-SLIST_B_Sony_8 b/tests/ref/fate/hevc-conformance-SLIST_B_Sony_8
> index fc39039..0164b31 100644
> --- a/tests/ref/fate/hevc-conformance-SLIST_B_Sony_8
> +++ b/tests/ref/fate/hevc-conformance-SLIST_B_Sony_8
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0xbd0eb43e
>  0,          1,          1,        1,   599040, 0x3ea696c4
>  0,          2,          2,        1,   599040, 0x866beffc
> diff --git a/tests/ref/fate/hevc-conformance-SLIST_C_Sony_3 b/tests/ref/fate/hevc-conformance-SLIST_C_Sony_3
> index 482e56f..b40fa41 100644
> --- a/tests/ref/fate/hevc-conformance-SLIST_C_Sony_3
> +++ b/tests/ref/fate/hevc-conformance-SLIST_C_Sony_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0xc3e98658
>  0,          1,          1,        1,   599040, 0x621fa0b7
>  0,          2,          2,        1,   599040, 0x53b2e637
> diff --git a/tests/ref/fate/hevc-conformance-SLIST_D_Sony_9 b/tests/ref/fate/hevc-conformance-SLIST_D_Sony_9
> index 384f81f..d26b75f 100644
> --- a/tests/ref/fate/hevc-conformance-SLIST_D_Sony_9
> +++ b/tests/ref/fate/hevc-conformance-SLIST_D_Sony_9
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0xf3038515
>  0,          1,          1,        1,   599040, 0xb1bc9386
>  0,          2,          2,        1,   599040, 0xa069e86f
> diff --git a/tests/ref/fate/hevc-conformance-SLPPLP_A_VIDYO_1 b/tests/ref/fate/hevc-conformance-SLPPLP_A_VIDYO_1
> index bbb3cfe..6cd9643 100644
> --- a/tests/ref/fate/hevc-conformance-SLPPLP_A_VIDYO_1
> +++ b/tests/ref/fate/hevc-conformance-SLPPLP_A_VIDYO_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x88619f80
>  0,          1,          1,        1,   149760, 0x550bdaf0
>  0,          2,          2,        1,   149760, 0x99440a14
> diff --git a/tests/ref/fate/hevc-conformance-SLPPLP_A_VIDYO_2 b/tests/ref/fate/hevc-conformance-SLPPLP_A_VIDYO_2
> index bbb3cfe..6cd9643 100644
> --- a/tests/ref/fate/hevc-conformance-SLPPLP_A_VIDYO_2
> +++ b/tests/ref/fate/hevc-conformance-SLPPLP_A_VIDYO_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x88619f80
>  0,          1,          1,        1,   149760, 0x550bdaf0
>  0,          2,          2,        1,   149760, 0x99440a14
> diff --git a/tests/ref/fate/hevc-conformance-STRUCT_A_Samsung_5 b/tests/ref/fate/hevc-conformance-STRUCT_A_Samsung_5
> index da5cfa1..0916a9d 100644
> --- a/tests/ref/fate/hevc-conformance-STRUCT_A_Samsung_5
> +++ b/tests/ref/fate/hevc-conformance-STRUCT_A_Samsung_5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x479fa7ca
>  0,          1,          1,        1,   149760, 0x761fb3a3
>  0,          2,          2,        1,   149760, 0xa0f4cd97
> diff --git a/tests/ref/fate/hevc-conformance-STRUCT_B_Samsung_4 b/tests/ref/fate/hevc-conformance-STRUCT_B_Samsung_4
> index c03111c..b95c176 100644
> --- a/tests/ref/fate/hevc-conformance-STRUCT_B_Samsung_4
> +++ b/tests/ref/fate/hevc-conformance-STRUCT_B_Samsung_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x4b489a60
>  0,          1,          1,        1,   599040, 0x80369c9a
>  0,          2,          2,        1,   599040, 0x33189b1a
> diff --git a/tests/ref/fate/hevc-conformance-STRUCT_B_Samsung_6 b/tests/ref/fate/hevc-conformance-STRUCT_B_Samsung_6
> index 811c790..6127f76 100644
> --- a/tests/ref/fate/hevc-conformance-STRUCT_B_Samsung_6
> +++ b/tests/ref/fate/hevc-conformance-STRUCT_B_Samsung_6
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 832x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   599040, 0x10e6d882
>  0,          1,          1,        1,   599040, 0x10e6d882
>  0,          2,          2,        1,   599040, 0x10e6d882
> diff --git a/tests/ref/fate/hevc-conformance-TILES_A_Cisco_2 b/tests/ref/fate/hevc-conformance-TILES_A_Cisco_2
> index 63c9722..8d0b527 100644
> --- a/tests/ref/fate/hevc-conformance-TILES_A_Cisco_2
> +++ b/tests/ref/fate/hevc-conformance-TILES_A_Cisco_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  3110400, 0xfc052e85
>  0,          1,          1,        1,  3110400, 0xfb49bf20
>  0,          2,          2,        1,  3110400, 0x549eef2b
> diff --git a/tests/ref/fate/hevc-conformance-TILES_B_Cisco_1 b/tests/ref/fate/hevc-conformance-TILES_B_Cisco_1
> index 9c37121..b03a9c3 100644
> --- a/tests/ref/fate/hevc-conformance-TILES_B_Cisco_1
> +++ b/tests/ref/fate/hevc-conformance-TILES_B_Cisco_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  3110400, 0x3471f473
>  0,          1,          1,        1,  3110400, 0xb371a3e8
>  0,          2,          2,        1,  3110400, 0x6d83c623
> diff --git a/tests/ref/fate/hevc-conformance-TMVP_A_MS_3 b/tests/ref/fate/hevc-conformance-TMVP_A_MS_3
> index 531370d..d037d38 100644
> --- a/tests/ref/fate/hevc-conformance-TMVP_A_MS_3
> +++ b/tests/ref/fate/hevc-conformance-TMVP_A_MS_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xdb5e3b56
>  0,          1,          1,        1,   149760, 0x6d4418eb
>  0,          2,          2,        1,   149760, 0x0473e366
> diff --git a/tests/ref/fate/hevc-conformance-TSCL_A_VIDYO_5 b/tests/ref/fate/hevc-conformance-TSCL_A_VIDYO_5
> index 84d4219..7f87584 100644
> --- a/tests/ref/fate/hevc-conformance-TSCL_A_VIDYO_5
> +++ b/tests/ref/fate/hevc-conformance-TSCL_A_VIDYO_5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xcfffa013
>  0,          1,          1,        1,   149760, 0x5166146a
>  0,          2,          2,        1,   149760, 0xc3cc318e
> diff --git a/tests/ref/fate/hevc-conformance-TSCL_B_VIDYO_4 b/tests/ref/fate/hevc-conformance-TSCL_B_VIDYO_4
> index 6ee24ac..c8b1924 100644
> --- a/tests/ref/fate/hevc-conformance-TSCL_B_VIDYO_4
> +++ b/tests/ref/fate/hevc-conformance-TSCL_B_VIDYO_4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x88619f80
>  0,          1,          1,        1,   149760, 0x550bdaf0
>  0,          2,          2,        1,   149760, 0x99440a14
> diff --git a/tests/ref/fate/hevc-conformance-TSKIP_A_MS_3 b/tests/ref/fate/hevc-conformance-TSKIP_A_MS_3
> index b5eca3c..2f7ee57 100644
> --- a/tests/ref/fate/hevc-conformance-TSKIP_A_MS_3
> +++ b/tests/ref/fate/hevc-conformance-TSKIP_A_MS_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  1382400, 0xaea37937
>  0,          1,          1,        1,  1382400, 0xea5c7b5d
>  0,          2,          2,        1,  1382400, 0x4e41e421
> diff --git a/tests/ref/fate/hevc-conformance-TUSIZE_A_Samsung_1 b/tests/ref/fate/hevc-conformance-TUSIZE_A_Samsung_1
> index 4886a40..f0498e1 100644
> --- a/tests/ref/fate/hevc-conformance-TUSIZE_A_Samsung_1
> +++ b/tests/ref/fate/hevc-conformance-TUSIZE_A_Samsung_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 2560x1600
> +#sar 0: 0/1
>  0,          0,          0,        1,  6144000, 0x3681421d
>  0,          1,          1,        1,  6144000, 0xecf3f343
>  0,          2,          2,        1,  6144000, 0x53742db2
> diff --git a/tests/ref/fate/hevc-conformance-VPSID_A_VIDYO_1 b/tests/ref/fate/hevc-conformance-VPSID_A_VIDYO_1
> index bbb3cfe..6cd9643 100644
> --- a/tests/ref/fate/hevc-conformance-VPSID_A_VIDYO_1
> +++ b/tests/ref/fate/hevc-conformance-VPSID_A_VIDYO_1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x88619f80
>  0,          1,          1,        1,   149760, 0x550bdaf0
>  0,          2,          2,        1,   149760, 0x99440a14
> diff --git a/tests/ref/fate/hevc-conformance-VPSID_A_VIDYO_2 b/tests/ref/fate/hevc-conformance-VPSID_A_VIDYO_2
> index bbb3cfe..6cd9643 100644
> --- a/tests/ref/fate/hevc-conformance-VPSID_A_VIDYO_2
> +++ b/tests/ref/fate/hevc-conformance-VPSID_A_VIDYO_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x88619f80
>  0,          1,          1,        1,   149760, 0x550bdaf0
>  0,          2,          2,        1,   149760, 0x99440a14
> diff --git a/tests/ref/fate/hevc-conformance-WPP_A_ericsson_MAIN10_2 b/tests/ref/fate/hevc-conformance-WPP_A_ericsson_MAIN10_2
> index fe46c99..8bed654 100644
> --- a/tests/ref/fate/hevc-conformance-WPP_A_ericsson_MAIN10_2
> +++ b/tests/ref/fate/hevc-conformance-WPP_A_ericsson_MAIN10_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   299520, 0xa3f96d63
>  0,          1,          1,        1,   299520, 0x5f788f3f
>  0,          2,          2,        1,   299520, 0x41c7d0ae
> diff --git a/tests/ref/fate/hevc-conformance-WPP_A_ericsson_MAIN_2 b/tests/ref/fate/hevc-conformance-WPP_A_ericsson_MAIN_2
> index 497c802..1be833d 100644
> --- a/tests/ref/fate/hevc-conformance-WPP_A_ericsson_MAIN_2
> +++ b/tests/ref/fate/hevc-conformance-WPP_A_ericsson_MAIN_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xfbb3d914
>  0,          1,          1,        1,   149760, 0xdccd707b
>  0,          2,          2,        1,   149760, 0x32008963
> diff --git a/tests/ref/fate/hevc-conformance-WPP_B_ericsson_MAIN10_2 b/tests/ref/fate/hevc-conformance-WPP_B_ericsson_MAIN10_2
> index d199d38..b146668 100644
> --- a/tests/ref/fate/hevc-conformance-WPP_B_ericsson_MAIN10_2
> +++ b/tests/ref/fate/hevc-conformance-WPP_B_ericsson_MAIN10_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   299520, 0x66b3cef3
>  0,          1,          1,        1,   299520, 0x99df880f
>  0,          2,          2,        1,   299520, 0xb4a03801
> diff --git a/tests/ref/fate/hevc-conformance-WPP_B_ericsson_MAIN_2 b/tests/ref/fate/hevc-conformance-WPP_B_ericsson_MAIN_2
> index bb61b10..9ac63c1 100644
> --- a/tests/ref/fate/hevc-conformance-WPP_B_ericsson_MAIN_2
> +++ b/tests/ref/fate/hevc-conformance-WPP_B_ericsson_MAIN_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x3772de54
>  0,          1,          1,        1,   149760, 0x571d885e
>  0,          2,          2,        1,   149760, 0x71576f09
> diff --git a/tests/ref/fate/hevc-conformance-WPP_C_ericsson_MAIN10_2 b/tests/ref/fate/hevc-conformance-WPP_C_ericsson_MAIN10_2
> index b1e6312..ee951bb 100644
> --- a/tests/ref/fate/hevc-conformance-WPP_C_ericsson_MAIN10_2
> +++ b/tests/ref/fate/hevc-conformance-WPP_C_ericsson_MAIN10_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   299520, 0xbc71d699
>  0,          1,          1,        1,   299520, 0x3207e1f9
>  0,          2,          2,        1,   299520, 0xdd2087b5
> diff --git a/tests/ref/fate/hevc-conformance-WPP_C_ericsson_MAIN_2 b/tests/ref/fate/hevc-conformance-WPP_C_ericsson_MAIN_2
> index 49c4f21..12fbbf6 100644
> --- a/tests/ref/fate/hevc-conformance-WPP_C_ericsson_MAIN_2
> +++ b/tests/ref/fate/hevc-conformance-WPP_C_ericsson_MAIN_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x0948e521
>  0,          1,          1,        1,   149760, 0x37afb384
>  0,          2,          2,        1,   149760, 0xe1864c4a
> diff --git a/tests/ref/fate/hevc-conformance-WPP_D_ericsson_MAIN10_2 b/tests/ref/fate/hevc-conformance-WPP_D_ericsson_MAIN10_2
> index 83cf10c..6fc9a04 100644
> --- a/tests/ref/fate/hevc-conformance-WPP_D_ericsson_MAIN10_2
> +++ b/tests/ref/fate/hevc-conformance-WPP_D_ericsson_MAIN10_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x240
> +#sar 0: 0/1
>  0,          0,          0,        1,    46080, 0xc50ed6b4
>  0,          1,          1,        1,    46080, 0x2aeac52d
>  0,          2,          2,        1,    46080, 0xe3e36cd3
> diff --git a/tests/ref/fate/hevc-conformance-WPP_D_ericsson_MAIN_2 b/tests/ref/fate/hevc-conformance-WPP_D_ericsson_MAIN_2
> index 6e6fc32..dc469f6 100644
> --- a/tests/ref/fate/hevc-conformance-WPP_D_ericsson_MAIN_2
> +++ b/tests/ref/fate/hevc-conformance-WPP_D_ericsson_MAIN_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x240
> +#sar 0: 0/1
>  0,          0,          0,        1,    23040, 0x6977dbca
>  0,          1,          1,        1,    23040, 0xd9bfcb5c
>  0,          2,          2,        1,    23040, 0xbdd5a346
> diff --git a/tests/ref/fate/hevc-conformance-WPP_E_ericsson_MAIN10_2 b/tests/ref/fate/hevc-conformance-WPP_E_ericsson_MAIN10_2
> index dbf6f78..0dd096c 100644
> --- a/tests/ref/fate/hevc-conformance-WPP_E_ericsson_MAIN10_2
> +++ b/tests/ref/fate/hevc-conformance-WPP_E_ericsson_MAIN10_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x240
> +#sar 0: 0/1
>  0,          0,          0,        1,    92160, 0x591c992e
>  0,          1,          1,        1,    92160, 0xe7a8cd8b
>  0,          2,          2,        1,    92160, 0x2e7528bb
> diff --git a/tests/ref/fate/hevc-conformance-WPP_E_ericsson_MAIN_2 b/tests/ref/fate/hevc-conformance-WPP_E_ericsson_MAIN_2
> index ac478c6..e284c17 100644
> --- a/tests/ref/fate/hevc-conformance-WPP_E_ericsson_MAIN_2
> +++ b/tests/ref/fate/hevc-conformance-WPP_E_ericsson_MAIN_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x240
> +#sar 0: 0/1
>  0,          0,          0,        1,    46080, 0xcd234724
>  0,          1,          1,        1,    46080, 0x66649579
>  0,          2,          2,        1,    46080, 0x4317d38d
> diff --git a/tests/ref/fate/hevc-conformance-WPP_F_ericsson_MAIN10_2 b/tests/ref/fate/hevc-conformance-WPP_F_ericsson_MAIN10_2
> index 2f103b7..aa8452d 100644
> --- a/tests/ref/fate/hevc-conformance-WPP_F_ericsson_MAIN10_2
> +++ b/tests/ref/fate/hevc-conformance-WPP_F_ericsson_MAIN10_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 192x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   138240, 0x99f196ae
>  0,          1,          1,        1,   138240, 0x45f407de
>  0,          2,          2,        1,   138240, 0xdaef815b
> diff --git a/tests/ref/fate/hevc-conformance-WPP_F_ericsson_MAIN_2 b/tests/ref/fate/hevc-conformance-WPP_F_ericsson_MAIN_2
> index 6256d96..1654ec1 100644
> --- a/tests/ref/fate/hevc-conformance-WPP_F_ericsson_MAIN_2
> +++ b/tests/ref/fate/hevc-conformance-WPP_F_ericsson_MAIN_2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 192x240
> +#sar 0: 0/1
>  0,          0,          0,        1,    69120, 0x28326a13
>  0,          1,          1,        1,    69120, 0x1f41a4a7
>  0,          2,          2,        1,    69120, 0x803ceeb4
> diff --git a/tests/ref/fate/hevc-conformance-WP_A_MAIN10_Toshiba_3 b/tests/ref/fate/hevc-conformance-WP_A_MAIN10_Toshiba_3
> index b2dadba..4ca7eb2 100644
> --- a/tests/ref/fate/hevc-conformance-WP_A_MAIN10_Toshiba_3
> +++ b/tests/ref/fate/hevc-conformance-WP_A_MAIN10_Toshiba_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   299520, 0x7750edc7
>  0,          1,          1,        1,   299520, 0x97fb359b
>  0,          2,          2,        1,   299520, 0x89ac22bc
> diff --git a/tests/ref/fate/hevc-conformance-WP_A_Toshiba_3 b/tests/ref/fate/hevc-conformance-WP_A_Toshiba_3
> index a8c5df3..88f319c 100644
> --- a/tests/ref/fate/hevc-conformance-WP_A_Toshiba_3
> +++ b/tests/ref/fate/hevc-conformance-WP_A_Toshiba_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xf4bafc83
>  0,          1,          1,        1,   149760, 0x611ca492
>  0,          2,          2,        1,   149760, 0x8fa9bbb1
> diff --git a/tests/ref/fate/hevc-conformance-WP_B_Toshiba_3 b/tests/ref/fate/hevc-conformance-WP_B_Toshiba_3
> index 7dbc72b..ed69880 100644
> --- a/tests/ref/fate/hevc-conformance-WP_B_Toshiba_3
> +++ b/tests/ref/fate/hevc-conformance-WP_B_Toshiba_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xd8bf0c39
>  0,          1,          1,        1,   149760, 0xad390a29
>  0,          2,          2,        1,   149760, 0x0d310906
> diff --git a/tests/ref/fate/hevc-conformance-WP_MAIN10_B_Toshiba_3 b/tests/ref/fate/hevc-conformance-WP_MAIN10_B_Toshiba_3
> index 332c7df..0277764 100644
> --- a/tests/ref/fate/hevc-conformance-WP_MAIN10_B_Toshiba_3
> +++ b/tests/ref/fate/hevc-conformance-WP_MAIN10_B_Toshiba_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   299520, 0x6ecba46b
>  0,          1,          1,        1,   299520, 0x54e6ef0a
>  0,          2,          2,        1,   299520, 0x7a4d46c5
> diff --git a/tests/ref/fate/hevc-conformance-cip_B_NEC_3 b/tests/ref/fate/hevc-conformance-cip_B_NEC_3
> index 016f0f1..c8dfedf 100644
> --- a/tests/ref/fate/hevc-conformance-cip_B_NEC_3
> +++ b/tests/ref/fate/hevc-conformance-cip_B_NEC_3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xcbda260f
>  0,          1,          1,        1,   149760, 0xbd8d32a9
>  0,          2,          2,        1,   149760, 0x39562006
> diff --git a/tests/ref/fate/hevc-conformance-ipcm_A_NEC_3 b/tests/ref/fate/hevc-conformance-ipcm_A_NEC_3
> index 145f590..4d34d32 100644
> --- a/tests/ref/fate/hevc-conformance-ipcm_A_NEC_3
> +++ b/tests/ref/fate/hevc-conformance-ipcm_A_NEC_3
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0x2356474c
> diff --git a/tests/ref/fate/hevc-conformance-ipcm_B_NEC_3 b/tests/ref/fate/hevc-conformance-ipcm_B_NEC_3
> index d917cbc..0dd1379 100644
> --- a/tests/ref/fate/hevc-conformance-ipcm_B_NEC_3
> +++ b/tests/ref/fate/hevc-conformance-ipcm_B_NEC_3
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xc80d43f8
> diff --git a/tests/ref/fate/hevc-conformance-ipcm_C_NEC_3 b/tests/ref/fate/hevc-conformance-ipcm_C_NEC_3
> index 6c89cea..4bc3fc6 100644
> --- a/tests/ref/fate/hevc-conformance-ipcm_C_NEC_3
> +++ b/tests/ref/fate/hevc-conformance-ipcm_C_NEC_3
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xb92d38ee
> diff --git a/tests/ref/fate/hevc-conformance-ipcm_D_NEC_3 b/tests/ref/fate/hevc-conformance-ipcm_D_NEC_3
> index 2ccff05..23d7aaa 100644
> --- a/tests/ref/fate/hevc-conformance-ipcm_D_NEC_3
> +++ b/tests/ref/fate/hevc-conformance-ipcm_D_NEC_3
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xa24d17f8
> diff --git a/tests/ref/fate/hevc-conformance-ipcm_E_NEC_2 b/tests/ref/fate/hevc-conformance-ipcm_E_NEC_2
> index 794c4ac..3f7d780 100644
> --- a/tests/ref/fate/hevc-conformance-ipcm_E_NEC_2
> +++ b/tests/ref/fate/hevc-conformance-ipcm_E_NEC_2
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 416x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   149760, 0xf4582514
> diff --git a/tests/ref/fate/hevc-paramchange-yuv420p-yuv420p10 b/tests/ref/fate/hevc-paramchange-yuv420p-yuv420p10
> index f3cd550a..73bf868 100644
> --- a/tests/ref/fate/hevc-paramchange-yuv420p-yuv420p10
> +++ b/tests/ref/fate/hevc-paramchange-yuv420p-yuv420p10
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1056x8440
> +#sar 0: 0/1
>  0,          0,          0,        1, 13368960, 0x830b3a1d
>  0,          1,          1,        1, 13368960, 0x120ca009
>  0,          2,          2,        1, 13368960, 0xc94e0d86
> diff --git a/tests/ref/fate/id-cin-video b/tests/ref/fate/id-cin-video
> index f55544f..469e239 100644
> --- a/tests/ref/fate/id-cin-video
> +++ b/tests/ref/fate/id-cin-video
> @@ -1,5 +1,13 @@
>  #tb 0: 1/14
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  #tb 1: 1/22050
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 22050
> +#channel_layout 1: 3
>  0,          0,          0,        1,   230400, 0x00000000
>  1,          0,          0,     1575,     6300, 0xdd759df8
>  0,          1,          1,        1,   230400, 0x3a3486b4
> diff --git a/tests/ref/fate/iff-byterun1 b/tests/ref/fate/iff-byterun1
> index 6f80c72..8e6f949 100644
> --- a/tests/ref/fate/iff-byterun1
> +++ b/tests/ref/fate/iff-byterun1
> @@ -1,2 +1,6 @@
>  #tb 0: 1/90000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 5/6
>  0,          0,          0,        0,   230400, 0x35e51c62
> diff --git a/tests/ref/fate/iff-ilbm b/tests/ref/fate/iff-ilbm
> index a801aff..38c43eb 100644
> --- a/tests/ref/fate/iff-ilbm
> +++ b/tests/ref/fate/iff-ilbm
> @@ -1,2 +1,6 @@
>  #tb 0: 1/90000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        0,   230400, 0x0929e342
> diff --git a/tests/ref/fate/indeo2 b/tests/ref/fate/indeo2
> index 9f80f35..0831d91 100644
> --- a/tests/ref/fate/indeo2
> +++ b/tests/ref/fate/indeo2
> @@ -1,4 +1,8 @@
>  #tb 0: 66667/1000000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x120
> +#sar 0: 0/1
>  0,          0,          0,        1,    21600, 0x57a2ba42
>  0,          1,          1,        1,    21600, 0x61e09615
>  0,          2,          2,        1,    21600, 0x826e4e63
> diff --git a/tests/ref/fate/indeo3 b/tests/ref/fate/indeo3
> index 0f55649..386e530 100644
> --- a/tests/ref/fate/indeo3
> +++ b/tests/ref/fate/indeo3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x120
> +#sar 0: 0/1
>  0,          0,          0,        1,    21600, 0x845098fc
>  0,          1,          1,        1,    21600, 0xc28e8bf0
>  0,          2,          2,        1,    21600, 0x2f418fb4
> diff --git a/tests/ref/fate/indeo3-2 b/tests/ref/fate/indeo3-2
> index 702d06b..78e145e 100644
> --- a/tests/ref/fate/indeo3-2
> +++ b/tests/ref/fate/indeo3-2
> @@ -1,4 +1,8 @@
>  #tb 0: 200/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x188
> +#sar 0: 0/1
>  0,          0,          0,        1,    67680, 0x532a4c40
>  0,         37,         37,        1,    67680, 0x63d2757a
>  0,         38,         38,        1,    67680, 0xb1dcf7d3
> diff --git a/tests/ref/fate/indeo4 b/tests/ref/fate/indeo4
> index 7f60461..0a2b051 100644
> --- a/tests/ref/fate/indeo4
> +++ b/tests/ref/fate/indeo4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,    86400, 0x98f5e422
>  0,          1,          1,        1,    86400, 0x1864cb06
>  0,          2,          2,        1,    86400, 0xb09532ef
> diff --git a/tests/ref/fate/indeo5 b/tests/ref/fate/indeo5
> index 7b91238..6be2818 100644
> --- a/tests/ref/fate/indeo5
> +++ b/tests/ref/fate/indeo5
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 240x180
> +#sar 0: 0/1
>  0,          0,          0,        1,    48600, 0x72d4193b
>  0,          2,          2,        1,    48600, 0x36abd6f3
>  0,          3,          3,        1,    48600, 0x99e582f7
> diff --git a/tests/ref/fate/interplay-mve-16bit b/tests/ref/fate/interplay-mve-16bit
> index b20e998..c1ec1ca 100644
> --- a/tests/ref/fate/interplay-mve-16bit
> +++ b/tests/ref/fate/interplay-mve-16bit
> @@ -1,4 +1,8 @@
>  #tb 0: 417/12500
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x320
> +#sar 0: 0/1
>  0,          0,          0,        1,   614400, 0x00000000
>  0,          1,          1,        1,   614400, 0x00000000
>  0,          2,          2,        1,   614400, 0x3c4ce011
> diff --git a/tests/ref/fate/interplay-mve-8bit b/tests/ref/fate/interplay-mve-8bit
> index b37bd6e..6fb5af3 100644
> --- a/tests/ref/fate/interplay-mve-8bit
> +++ b/tests/ref/fate/interplay-mve-8bit
> @@ -1,4 +1,8 @@
>  #tb 0: 8341/125000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 432x320
> +#sar 0: 0/1
>  0,          0,          0,        1,   414720, 0x2580d574
>  0,          1,          1,        1,   414720, 0x97f55cd3
>  0,          2,          2,        1,   414720, 0x9408fb63
> diff --git a/tests/ref/fate/iv8-demux b/tests/ref/fate/iv8-demux
> index 02b6314..ddb110a 100644
> --- a/tests/ref/fate/iv8-demux
> +++ b/tests/ref/fate/iv8-demux
> @@ -1,5 +1,9 @@
>  #extradata 0:       19, 0x1f2604b9
>  #tb 0: 1/90000
> +#media_type 0: video
> +#codec_id 0: mpeg4
> +#dimensions 0: 704x576
> +#sar 0: 1/1
>  0,          0,          0,        0,    20883, 0x347191e2
>  0,          0,       3600,        0,    20882, 0xe1573905
>  0,       3600,       7200,        0,    20894, 0xd54f516a
> diff --git a/tests/ref/fate/jpeg2000-dcinema b/tests/ref/fate/jpeg2000-dcinema
> index 08bbfdc..cdf8cd4 100644
> --- a/tests/ref/fate/jpeg2000-dcinema
> +++ b/tests/ref/fate/jpeg2000-dcinema
> @@ -1,3 +1,7 @@
>  #tb 0: 1/24
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 1/1
>  0,          0,          0,        1, 12441600, 0xfcf6a127
>  0,          1,          1,        1, 12441600, 0x577b6a64
> diff --git a/tests/ref/fate/jv b/tests/ref/fate/jv
> index b0a6008..d90fe24 100644
> --- a/tests/ref/fate/jv
> +++ b/tests/ref/fate/jv
> @@ -1,4 +1,8 @@
>  #tb 0: 2/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0x00000000
>  0,          2,          2,        1,   192000, 0x331b1c12
>  0,          3,          3,        1,   192000, 0xc2fa2d89
> diff --git a/tests/ref/fate/jv-demux b/tests/ref/fate/jv-demux
> index 51638df..280528c 100644
> --- a/tests/ref/fate/jv-demux
> +++ b/tests/ref/fate/jv-demux
> @@ -1,5 +1,13 @@
>  #tb 0: 2/25
> +#media_type 0: video
> +#codec_id 0: jv
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  #tb 1: 1/22050
> +#media_type 1: audio
> +#codec_id 1: pcm_u8
> +#sample_rate 1: 22050
> +#channel_layout 1: 4
>  0,          0,          0,        1,        6, 0x000a0003
>  1,          0,          0,   131072,   131072, 0x14c664d6
>  0,          1,          1,        1,      773, 0x11802a51
> diff --git a/tests/ref/fate/kgv1 b/tests/ref/fate/kgv1
> index 4f475bb..a3649bc 100644
> --- a/tests/ref/fate/kgv1
> +++ b/tests/ref/fate/kgv1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/60
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   153600, 0x00000000
>  0,          1,          1,        1,   153600, 0x00000000
>  0,          2,          2,        1,   153600, 0x00000000
> diff --git a/tests/ref/fate/kmvc b/tests/ref/fate/kmvc
> index 8a733bb..9c7686b 100644
> --- a/tests/ref/fate/kmvc
> +++ b/tests/ref/fate/kmvc
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x160
> +#sar 0: 0/1
>  0,          0,          0,        1,   153600, 0x00000000
>  0,          1,          1,        1,   153600, 0x00000000
>  0,          2,          2,        1,   153600, 0x00000000
> diff --git a/tests/ref/fate/lagarith-red b/tests/ref/fate/lagarith-red
> index b5fb96b..0e065d6 100644
> --- a/tests/ref/fate/lagarith-red
> +++ b/tests/ref/fate/lagarith-red
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   230400, 0x67dfe576
>  0,          1,          1,        1,   230400, 0x67dfe576
>  0,          2,          2,        1,   230400, 0x67dfe576
> diff --git a/tests/ref/fate/lagarith-rgb24 b/tests/ref/fate/lagarith-rgb24
> index 1eb2bc4..63250c6 100644
> --- a/tests/ref/fate/lagarith-rgb24
> +++ b/tests/ref/fate/lagarith-rgb24
> @@ -1,4 +1,8 @@
>  #tb 0: 100/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 480x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   368640, 0x26f74db2
>  0,          1,          1,        1,   368640, 0x63b29ea4
>  0,          2,          2,        1,   368640, 0x19467f03
> diff --git a/tests/ref/fate/lagarith-rgb32 b/tests/ref/fate/lagarith-rgb32
> index 490e2e5..8a4c4d2 100644
> --- a/tests/ref/fate/lagarith-rgb32
> +++ b/tests/ref/fate/lagarith-rgb32
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/24000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,  1382400, 0x00000000
>  0,          1,          1,        1,  1382400, 0x00000000
>  0,          2,          2,        1,  1382400, 0x00000000
> diff --git a/tests/ref/fate/lagarith-ticket4119 b/tests/ref/fate/lagarith-ticket4119
> index ac74875..c46ef04 100644
> --- a/tests/ref/fate/lagarith-ticket4119
> +++ b/tests/ref/fate/lagarith-ticket4119
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x360
> +#sar 0: 0/1
>  0,          0,          0,        1,   691200, 0x00000000
>  0,         25,         25,        1,   691200, 0xc88a6f24
>  0,         50,         50,        1,   691200, 0x906d474c
> diff --git a/tests/ref/fate/lagarith-ticket4119-cfr b/tests/ref/fate/lagarith-ticket4119-cfr
> index 51e841f..324fe44 100644
> --- a/tests/ref/fate/lagarith-ticket4119-cfr
> +++ b/tests/ref/fate/lagarith-ticket4119-cfr
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x360
> +#sar 0: 0/1
>  0,          0,          0,        1,   691200, 0x00000000
>  0,          1,          1,        1,   691200, 0x00000000
>  0,          2,          2,        1,   691200, 0x00000000
> diff --git a/tests/ref/fate/lagarith-ticket4119-drop b/tests/ref/fate/lagarith-ticket4119-drop
> index ae6309b..abc58d5 100644
> --- a/tests/ref/fate/lagarith-ticket4119-drop
> +++ b/tests/ref/fate/lagarith-ticket4119-drop
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x360
> +#sar 0: 0/1
>  0,          0,          0,        1,   691200, 0x00000000
>  0,          1,          1,        1,   691200, 0xc88a6f24
>  0,          2,          2,        1,   691200, 0x906d474c
> diff --git a/tests/ref/fate/lagarith-ticket4119-pass b/tests/ref/fate/lagarith-ticket4119-pass
> index ac74875..c46ef04 100644
> --- a/tests/ref/fate/lagarith-ticket4119-pass
> +++ b/tests/ref/fate/lagarith-ticket4119-pass
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x360
> +#sar 0: 0/1
>  0,          0,          0,        1,   691200, 0x00000000
>  0,         25,         25,        1,   691200, 0xc88a6f24
>  0,         50,         50,        1,   691200, 0x906d474c
> diff --git a/tests/ref/fate/lagarith-ticket4119-vfr b/tests/ref/fate/lagarith-ticket4119-vfr
> index ac74875..c46ef04 100644
> --- a/tests/ref/fate/lagarith-ticket4119-vfr
> +++ b/tests/ref/fate/lagarith-ticket4119-vfr
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x360
> +#sar 0: 0/1
>  0,          0,          0,        1,   691200, 0x00000000
>  0,         25,         25,        1,   691200, 0xc88a6f24
>  0,         50,         50,        1,   691200, 0x906d474c
> diff --git a/tests/ref/fate/lagarith-yuy2 b/tests/ref/fate/lagarith-yuy2
> index c5aed92..64a211e 100644
> --- a/tests/ref/fate/lagarith-yuy2
> +++ b/tests/ref/fate/lagarith-yuy2
> @@ -1,2 +1,6 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1024x768
> +#sar 0: 0/1
>  0,          0,          0,        1,  1572864, 0xeed76a7d
> diff --git a/tests/ref/fate/lagarith-yv12 b/tests/ref/fate/lagarith-yv12
> index c9c9ff3..a79a3ba 100644
> --- a/tests/ref/fate/lagarith-yv12
> +++ b/tests/ref/fate/lagarith-yv12
> @@ -1,3 +1,7 @@
>  #tb 0: 1/60
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x240
> +#sar 0: 0/1
>  0,          0,          0,        1,    92160, 0x1dfdf5c1
>  0,          1,          1,        1,    92160, 0x6965884f
> diff --git a/tests/ref/fate/lmlm4-demux b/tests/ref/fate/lmlm4-demux
> index 95df3e6..79cb539 100644
> --- a/tests/ref/fate/lmlm4-demux
> +++ b/tests/ref/fate/lmlm4-demux
> @@ -1,6 +1,14 @@
>  #extradata 0:       28, 0x2f140538
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: mpeg4
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  #tb 1: 1/90000
> +#media_type 1: audio
> +#codec_id 1: mp2
> +#sample_rate 1: 48000
> +#channel_layout 1: 3
>  0,          0, -9223372036854775808,        1,     5951, 0xe9118e0d
>  1,          0,          0,     2160,      768, 0xaebcbebb
>  1,       2160,       2160,     2160,      768, 0xaebcbebb
> diff --git a/tests/ref/fate/loco-rgb b/tests/ref/fate/loco-rgb
> index ad199f1..289e73f 100644
> --- a/tests/ref/fate/loco-rgb
> +++ b/tests/ref/fate/loco-rgb
> @@ -1,4 +1,8 @@
>  #tb 0: 71/500
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 188x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    72192, 0x1847500c
>  0,          1,          1,        1,    72192, 0x1b0e2e87
>  0,          2,          2,        1,    72192, 0x293276c8
> diff --git a/tests/ref/fate/loco-yuy2 b/tests/ref/fate/loco-yuy2
> index 60a06bc..e963cda 100644
> --- a/tests/ref/fate/loco-yuy2
> +++ b/tests/ref/fate/loco-yuy2
> @@ -1,4 +1,8 @@
>  #tb 0: 71/500
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 188x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    48128, 0x7795782d
>  0,          1,          1,        1,    48128, 0x3d89bcf7
>  0,          2,          2,        1,    48128, 0x170d200a
> diff --git a/tests/ref/fate/m4v b/tests/ref/fate/m4v
> index 7c3b308..cebe443a 100644
> --- a/tests/ref/fate/m4v
> +++ b/tests/ref/fate/m4v
> @@ -1,4 +1,8 @@
>  #tb 0: 1/60
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        1,   115200, 0x7262156b
>  0,         11,         11,        1,   115200, 0xa6aebc2f
>  0,         22,         22,        1,   115200, 0x9c7beba1
> diff --git a/tests/ref/fate/m4v-cfr b/tests/ref/fate/m4v-cfr
> index e19b2d7..4eee84d 100644
> --- a/tests/ref/fate/m4v-cfr
> +++ b/tests/ref/fate/m4v-cfr
> @@ -1,4 +1,8 @@
>  #tb 0: 1/5
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        1,   115200, 0x7262156b
>  0,          1,          1,        1,   115200, 0xa6aebc2f
>  0,          2,          2,        1,   115200, 0x9c7beba1
> diff --git a/tests/ref/fate/maxis-xa b/tests/ref/fate/maxis-xa
> index c29738c..ae8124d 100644
> --- a/tests/ref/fate/maxis-xa
> +++ b/tests/ref/fate/maxis-xa
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: adpcm_ea_maxis_xa
> +#sample_rate 0: 22050
> +#channel_layout 0: 3
>  0,          0,          0,       28,       30, 0x51750711
>  0,         28,         28,       28,       30, 0x9ca20c2a
>  0,         56,         56,       28,       30, 0x7551081f
> diff --git a/tests/ref/fate/mdec b/tests/ref/fate/mdec
> index b7aab62..ae438ed 100644
> --- a/tests/ref/fate/mdec
> +++ b/tests/ref/fate/mdec
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 304x224
> +#sar 0: 0/1
>  0,          0,          0,        1,   102144, 0x6edc83de
>  0,          1,          1,        1,   102144, 0xd0534fda
>  0,          2,          2,        1,   102144, 0x6447911f
> diff --git a/tests/ref/fate/mdec-v3 b/tests/ref/fate/mdec-v3
> index 7e4bbdb..471303f 100644
> --- a/tests/ref/fate/mdec-v3
> +++ b/tests/ref/fate/mdec-v3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x160
> +#sar 0: 0/1
>  0,          0,          0,        1,    76800, 0x2677be82
>  0,          1,          1,        1,    76800, 0x1f323c75
>  0,          2,          2,        1,    76800, 0xc8be3be9
> diff --git a/tests/ref/fate/mimic b/tests/ref/fate/mimic
> index 217d487..e36e6a8 100644
> --- a/tests/ref/fate/mimic
> +++ b/tests/ref/fate/mimic
> @@ -1,4 +1,8 @@
>  #tb 0: 1/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        0,   115200, 0xa974d407
>  0,        548,        548,        0,   115200, 0x72618b84
>  0,       1088,       1088,        0,   115200, 0x87768573
> diff --git a/tests/ref/fate/mjpegb b/tests/ref/fate/mjpegb
> index ef8a00b..0298274 100644
> --- a/tests/ref/fate/mjpegb
> +++ b/tests/ref/fate/mjpegb
> @@ -1,4 +1,8 @@
>  #tb 0: 1/12
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x120
> +#sar 0: 0/1
>  0,          0,          0,        1,    38400, 0x45311080
>  0,          1,          1,        1,    38400, 0x9474f731
>  0,          2,          2,        1,    38400, 0x429ebb12
> diff --git a/tests/ref/fate/mkv b/tests/ref/fate/mkv
> index 765798c..0e7f651 100644
> --- a/tests/ref/fate/mkv
> +++ b/tests/ref/fate/mkv
> @@ -1,7 +1,15 @@
>  #extradata 0:       35, 0xc3b20b70
>  #extradata 1:        2, 0x00b200a1
>  #tb 0: 1/1000
> +#media_type 0: video
> +#codec_id 0: h264
> +#dimensions 0: 1024x576
> +#sar 0: 1/1
>  #tb 1: 1/1000
> +#media_type 1: audio
> +#codec_id 1: aac
> +#sample_rate 1: 48000
> +#channel_layout 1: 3
>  0,        -42,          0,       41,    63501, 0x139d4c99
>  0,          0,         84,       41,     5368, 0xd964b678, F=0x0
>  1,          8,          8,       21,      528, 0x3c990ddf
> diff --git a/tests/ref/fate/mkv-1242 b/tests/ref/fate/mkv-1242
> index 0ba2beb..1ba41a0 100644
> --- a/tests/ref/fate/mkv-1242
> +++ b/tests/ref/fate/mkv-1242
> @@ -1,7 +1,15 @@
>  #extradata 0:       93, 0xc2a32e14
>  #extradata 1:        2, 0x00b200a1
>  #tb 0: 1/1000
> +#media_type 0: video
> +#codec_id 0: h264
> +#dimensions 0: 1280x718
> +#sar 0: 1/1
>  #tb 1: 1/1000
> +#media_type 1: audio
> +#codec_id 1: aac
> +#sample_rate 1: 48000
> +#channel_layout 1: 3
>  0,        -42,          0,       41,     2969, 0xa7016742
>  0,          0,         42,       41,      135, 0x33af1a9e, F=0x0
>  1,          0,          0,       21,        6, 0x027e00e8
> diff --git a/tests/ref/fate/motionpixels b/tests/ref/fate/motionpixels
> index c875275..b376cc2 100644
> --- a/tests/ref/fate/motionpixels
> +++ b/tests/ref/fate/motionpixels
> @@ -1,4 +1,8 @@
>  #tb 0: 66667/1000000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   230400, 0xee05b509
>  0,          1,          1,        1,   230400, 0x23b28b24
>  0,          2,          2,        1,   230400, 0x4a4d6007
> diff --git a/tests/ref/fate/mov-mp3-demux b/tests/ref/fate/mov-mp3-demux
> index b4b2cef..fc96c58 100644
> --- a/tests/ref/fate/mov-mp3-demux
> +++ b/tests/ref/fate/mov-mp3-demux
> @@ -1,4 +1,8 @@
>  #tb 0: 1/44100
> +#media_type 0: audio
> +#codec_id 0: mp3
> +#sample_rate 0: 44100
> +#channel_layout 0: 3
>  0,          0,          0,     1152,       36, 0x8e260589
>  0,       1152,       1152,     1152,       36, 0x8e260589
>  0,       2304,       2304,     1152,       36, 0x8e260589
> diff --git a/tests/ref/fate/mpeg2-field-enc b/tests/ref/fate/mpeg2-field-enc
> index bf8a01a..4c288a8 100644
> --- a/tests/ref/fate/mpeg2-field-enc
> +++ b/tests/ref/fate/mpeg2-field-enc
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 16/15
>  0,          9,          9,        1,   622080, 0xb3b66c5c
>  0,         10,         10,        1,   622080, 0x088ec02b
>  0,         11,         11,        1,   622080, 0x7a36db21
> diff --git a/tests/ref/fate/mpeg4-packed b/tests/ref/fate/mpeg4-packed
> index faf8f5d..4336da0 100644
> --- a/tests/ref/fate/mpeg4-packed
> +++ b/tests/ref/fate/mpeg4-packed
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 544x352
> +#sar 0: 1/1
>  0,          0,          0,        1,   287232, 0x17288ed1
>  0,          1,          1,        1,   287232, 0x17288ed1
>  0,          2,          2,        1,   287232, 0x232dfda4
> diff --git a/tests/ref/fate/mpeg4-resolution-change-down-down b/tests/ref/fate/mpeg4-resolution-change-down-down
> index 02fcda5..c95491e 100644
> --- a/tests/ref/fate/mpeg4-resolution-change-down-down
> +++ b/tests/ref/fate/mpeg4-resolution-change-down-down
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   460800, d65fcc79c7eb9ebd9d88dca3ebb15bf4
>  0,          1,          1,        1,   460800, 6c86b8c7e8eae3d63b21342f233fb44e
> diff --git a/tests/ref/fate/mpeg4-resolution-change-down-up b/tests/ref/fate/mpeg4-resolution-change-down-up
> index 37e56d8..dd9418f 100644
> --- a/tests/ref/fate/mpeg4-resolution-change-down-up
> +++ b/tests/ref/fate/mpeg4-resolution-change-down-up
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   460800, d65fcc79c7eb9ebd9d88dca3ebb15bf4
>  0,          1,          1,        1,   460800, 6c86b8c7e8eae3d63b21342f233fb44e
> diff --git a/tests/ref/fate/mpeg4-resolution-change-up-down b/tests/ref/fate/mpeg4-resolution-change-up-down
> index 36110c3..2ca0735 100644
> --- a/tests/ref/fate/mpeg4-resolution-change-up-down
> +++ b/tests/ref/fate/mpeg4-resolution-change-up-down
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 400x300
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   180000, 9fc6302026cf2a2dd310646b83c5dfa1
>  0,          1,          1,        1,   180000, b1b2646c8df579ddf8676bc2488411a5
> diff --git a/tests/ref/fate/mpeg4-resolution-change-up-up b/tests/ref/fate/mpeg4-resolution-change-up-up
> index 8d1bbcd..8aaaec4 100644
> --- a/tests/ref/fate/mpeg4-resolution-change-up-up
> +++ b/tests/ref/fate/mpeg4-resolution-change-up-up
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 7f952fd8bd40c32197afc21e2fa66404
>  0,          1,          1,        1,   152064, 5b2cc25b04d9a9d33bcf5fe480505d68
> diff --git a/tests/ref/fate/msmpeg4v1 b/tests/ref/fate/msmpeg4v1
> index d67a0ef..946ede9 100644
> --- a/tests/ref/fate/msmpeg4v1
> +++ b/tests/ref/fate/msmpeg4v1
> @@ -1,4 +1,8 @@
>  #tb 0: 100/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   126720, 0x84284323
>  0,          1,          1,        1,   126720, 0x336fe236
>  0,          2,          2,        1,   126720, 0x901f1299
> diff --git a/tests/ref/fate/msrle-8bit b/tests/ref/fate/msrle-8bit
> index 5db1c24..202b3f0 100644
> --- a/tests/ref/fate/msrle-8bit
> +++ b/tests/ref/fate/msrle-8bit
> @@ -1,4 +1,8 @@
>  #tb 0: 83333/500000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 80x48
> +#sar 0: 0/1
>  0,          0,          0,        1,    11520, 0xaf416a66
>  0,          1,          1,        1,    11520, 0x8ab76654
>  0,          2,          2,        1,    11520, 0xd22880c4
> diff --git a/tests/ref/fate/mss2-pal b/tests/ref/fate/mss2-pal
> index ae8bd6f..a2fb12f 100644
> --- a/tests/ref/fate/mss2-pal
> +++ b/tests/ref/fate/mss2-pal
> @@ -1,3 +1,7 @@
>  #tb 0: 1/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x48
> +#sar 0: 0/1
>  0,          0,          0,        0,     9216, 0xd3c106ef
>  0,        100,        100,        0,     9216, 0x8871f7c2
> diff --git a/tests/ref/fate/mss2-pals b/tests/ref/fate/mss2-pals
> index ae8bd6f..a2fb12f 100644
> --- a/tests/ref/fate/mss2-pals
> +++ b/tests/ref/fate/mss2-pals
> @@ -1,3 +1,7 @@
>  #tb 0: 1/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x48
> +#sar 0: 0/1
>  0,          0,          0,        0,     9216, 0xd3c106ef
>  0,        100,        100,        0,     9216, 0x8871f7c2
> diff --git a/tests/ref/fate/mss2-rgb555 b/tests/ref/fate/mss2-rgb555
> index d15b3b4..10f1f03 100644
> --- a/tests/ref/fate/mss2-rgb555
> +++ b/tests/ref/fate/mss2-rgb555
> @@ -1,3 +1,7 @@
>  #tb 0: 1/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x48
> +#sar 0: 0/1
>  0,          0,          0,        0,     6144, 0x4145b7ae
>  0,        100,        100,        0,     6144, 0x3b2b38de
> diff --git a/tests/ref/fate/mss2-rgb555s b/tests/ref/fate/mss2-rgb555s
> index d15b3b4..10f1f03 100644
> --- a/tests/ref/fate/mss2-rgb555s
> +++ b/tests/ref/fate/mss2-rgb555s
> @@ -1,3 +1,7 @@
>  #tb 0: 1/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x48
> +#sar 0: 0/1
>  0,          0,          0,        0,     6144, 0x4145b7ae
>  0,        100,        100,        0,     6144, 0x3b2b38de
> diff --git a/tests/ref/fate/mss2-wmv b/tests/ref/fate/mss2-wmv
> index c54cff6..d9abbb3 100644
> --- a/tests/ref/fate/mss2-wmv
> +++ b/tests/ref/fate/mss2-wmv
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        1,   230400, 0x00000000
>  0,          3,          3,        1,   230400, 0xaf950008
>  0,          4,          4,        1,   230400, 0x8d2a0010
> diff --git a/tests/ref/fate/msvideo1-16bit b/tests/ref/fate/msvideo1-16bit
> index f5c0e647..d28d92e 100644
> --- a/tests/ref/fate/msvideo1-16bit
> +++ b/tests/ref/fate/msvideo1-16bit
> @@ -1,4 +1,8 @@
>  #tb 0: 33369/500000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 148x148
> +#sar 0: 0/1
>  0,          0,          0,        1,    65712, 0x03ff25b8
>  0,          1,          1,        1,    65712, 0xfca02276
>  0,          2,          2,        1,    65712, 0xd23646e4
> diff --git a/tests/ref/fate/msvideo1-8bit b/tests/ref/fate/msvideo1-8bit
> index 74d54e8..b271438 100644
> --- a/tests/ref/fate/msvideo1-8bit
> +++ b/tests/ref/fate/msvideo1-8bit
> @@ -1,4 +1,8 @@
>  #tb 0: 10000/300003
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x120
> +#sar 0: 0/1
>  0,          0,          0,        1,    57600, 0x8c3c5ee8
>  0,          1,          1,        1,    57600, 0xb79800b1
>  0,          2,          2,        1,    57600, 0x54a221be
> diff --git a/tests/ref/fate/mszh b/tests/ref/fate/mszh
> index 4ff76ff..007fe00 100644
> --- a/tests/ref/fate/mszh
> +++ b/tests/ref/fate/mszh
> @@ -1,2 +1,6 @@
>  #tb 0: 100/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   253440, 0x94af61e5
> diff --git a/tests/ref/fate/mtv b/tests/ref/fate/mtv
> index 9e898ff..81711f7 100644
> --- a/tests/ref/fate/mtv
> +++ b/tests/ref/fate/mtv
> @@ -1,6 +1,14 @@
>  #extradata 0:        9, 0x116c033a
>  #tb 0: 1/16
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 96x64
> +#sar 0: 0/1
>  #tb 1: 1/44100
> +#media_type 1: audio
> +#codec_id 1: mp3
> +#sample_rate 1: 44100
> +#channel_layout 1: 3
>  0,          0,          0,        1,    12288, 0xc2258ebc
>  1,          0,          0,     1152,      417, 0xae1cc66a
>  1,       1152,       1152,     1152,      418, 0xdc3ec850
> diff --git a/tests/ref/fate/mv-mvc1 b/tests/ref/fate/mv-mvc1
> index 073c95a..5327af0 100644
> --- a/tests/ref/fate/mv-mvc1
> +++ b/tests/ref/fate/mv-mvc1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 384x288
> +#sar 0: 0/1
>  0,          0,          0,        1,   221184, 0x340ab080
>  0,          1,          1,        1,   221184, 0xc21105a0
>  0,          2,          2,        1,   221184, 0xa7482ab3
> diff --git a/tests/ref/fate/mv-mvc2 b/tests/ref/fate/mv-mvc2
> index 99acdc0..7639f3d 100644
> --- a/tests/ref/fate/mv-mvc2
> +++ b/tests/ref/fate/mv-mvc2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/60
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 168x188
> +#sar 0: 1/1
>  0,          0,          0,        1,   126336, 0xb50e8bb0
>  0,          1,          1,        1,   126336, 0xdc260cfa
>  0,          2,          2,        1,   126336, 0x2762f0d9
> diff --git a/tests/ref/fate/mv-sgirle b/tests/ref/fate/mv-sgirle
> index 60aff0a..3f5de2b 100644
> --- a/tests/ref/fate/mv-sgirle
> +++ b/tests/ref/fate/mv-sgirle
> @@ -1,4 +1,8 @@
>  #tb 0: 1/4
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 500x375
> +#sar 0: 1/1
>  0,          0,          0,        1,   187500, 0xf2c26a39
>  0,          1,          1,        1,   187500, 0xf65e6ea5
>  0,          2,          2,        1,   187500, 0x804f78d0
> diff --git a/tests/ref/fate/mxf-demux b/tests/ref/fate/mxf-demux
> index 3d9a2dc..66dea10 100644
> --- a/tests/ref/fate/mxf-demux
> +++ b/tests/ref/fate/mxf-demux
> @@ -1,6 +1,14 @@
>  #extradata 0:       18, 0x0b150244
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: mpeg4
> +#dimensions 0: 352x288
> +#sar 0: 16/11
>  #tb 1: 1/8000
> +#media_type 1: audio
> +#codec_id 1: pcm_alaw
> +#sample_rate 1: 8000
> +#channel_layout 1: 3
>  0,          0, -9223372036854775808,        1,     8468, 0xc0855553
>  1,          0,          0,    16000,    32000, 0x479155e6
>  0,          1, -9223372036854775808,        1,     3814, 0xa10783b4, F=0x0
> diff --git a/tests/ref/fate/mxf-essencegroup-demux b/tests/ref/fate/mxf-essencegroup-demux
> index 8420db9..8045cdd 100644
> --- a/tests/ref/fate/mxf-essencegroup-demux
> +++ b/tests/ref/fate/mxf-essencegroup-demux
> @@ -1,2 +1,6 @@
>  #tb 0: 1001/24000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 1/1
>  0,          0,          0,        1,  2080768, 0xe99233d9
> diff --git a/tests/ref/fate/mxpeg b/tests/ref/fate/mxpeg
> index 90af90f..9c5c1fa 100644
> --- a/tests/ref/fate/mxpeg
> +++ b/tests/ref/fate/mxpeg
> @@ -1,4 +1,8 @@
>  #tb 0: 4/63
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x960
> +#sar 0: 0/1
>  0,          0,          0,        1,  1843200, 0x868a4e64
>  0,          4,          4,        1,  1843200, 0x8dda4373
>  0,          6,          6,        1,  1843200, 0xfcde3afc
> diff --git a/tests/ref/fate/nc-demux b/tests/ref/fate/nc-demux
> index 98318ac..571665e 100644
> --- a/tests/ref/fate/nc-demux
> +++ b/tests/ref/fate/nc-demux
> @@ -1,5 +1,9 @@
>  #extradata 0:       19, 0x1afd0446
>  #tb 0: 1/100
> +#media_type 0: video
> +#codec_id 0: mpeg4
> +#dimensions 0: 720x576
> +#sar 0: 1/1
>  0,          0, -9223372036854775808,        1,    19787, 0x75e463f3
>  0,          1, -9223372036854775808,        1,    11913, 0x0f429c34, F=0x0
>  0,          2, -9223372036854775808,        1,    14225, 0xbd3c704c, F=0x0
> diff --git a/tests/ref/fate/nsv-demux b/tests/ref/fate/nsv-demux
> index 0ad08b1..7b9c000 100644
> --- a/tests/ref/fate/nsv-demux
> +++ b/tests/ref/fate/nsv-demux
> @@ -1,5 +1,13 @@
>  #tb 0: 1001/15000
> +#media_type 0: video
> +#codec_id 0: vp3
> +#dimensions 0: 160x112
> +#sar 0: 0/1
>  #tb 1: 1/30000000
> +#media_type 1: audio
> +#codec_id 1: mp3
> +#sample_rate 1: 11025
> +#channel_layout 1: 4
>  0,          0,          0,        1,       12, 0x1396035f
>  0,          1,          1,        1,       24, 0x8ab80ac7, F=0x0
>  0,          2,          2,        1,      208, 0x1de1603e, F=0x0
> diff --git a/tests/ref/fate/nuv-rtjpeg b/tests/ref/fate/nuv-rtjpeg
> index 96ead33..e4a5be6 100644
> --- a/tests/ref/fate/nuv-rtjpeg
> +++ b/tests/ref/fate/nuv-rtjpeg
> @@ -1,4 +1,8 @@
>  #tb 0: 100/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 1/1
>  0,          4,          4,        1,   460800, 0x54aedafe
>  0,          5,          5,        1,   460800, 0xb7aa8b56
>  0,          6,          6,        1,   460800, 0x283ea3b5
> diff --git a/tests/ref/fate/nuv-rtjpeg-fh b/tests/ref/fate/nuv-rtjpeg-fh
> index b2e04cb..0d50b44 100644
> --- a/tests/ref/fate/nuv-rtjpeg-fh
> +++ b/tests/ref/fate/nuv-rtjpeg-fh
> @@ -1,4 +1,8 @@
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x288
> +#sar 0: 1/1
>  0,         80,         80,        1,   221184, 0xdaf54f83
>  0,         82,         82,        1,   221184, 0xeea3e3b4
>  0,         83,         83,        1,   221184, 0x5f1a8525
> diff --git a/tests/ref/fate/oggvp8-demux b/tests/ref/fate/oggvp8-demux
> index 96beb8c..fc686d4 100644
> --- a/tests/ref/fate/oggvp8-demux
> +++ b/tests/ref/fate/oggvp8-demux
> @@ -1,4 +1,8 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: vp8
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        1,     5014, 0x4798fa33
>  0,          1,          1,        1,      822, 0x596486c5, F=0x0
>  0,          2,          2,        1,      840, 0xf06490ba, F=0x0
> diff --git a/tests/ref/fate/on2avc b/tests/ref/fate/on2avc
> index ac08dae..2125cc6 100644
> --- a/tests/ref/fate/on2avc
> +++ b/tests/ref/fate/on2avc
> @@ -1,4 +1,8 @@
>  #tb 0: 1/16000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 16000
> +#channel_layout 0: 4
>  0,          0,          0,     1024,     2048, 0x00000000
>  0,       1024,       1024,     1024,     2048, 0x96ee1301
>  0,       2048,       2048,     1024,     2048, 0xe2a81605
> diff --git a/tests/ref/fate/paf-audio b/tests/ref/fate/paf-audio
> index ba47d5d..bb93ad5 100644
> --- a/tests/ref/fate/paf-audio
> +++ b/tests/ref/fate/paf-audio
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 3
>  0,          0,          0,    57330,   229320, 0x062508b4
>  0,      57330,      57330,    57330,   229320, 0x0a966cbf
>  0,     114660,     114660,    57330,   229320, 0xee9bad45
> diff --git a/tests/ref/fate/paf-demux b/tests/ref/fate/paf-demux
> index 857fb54..0f281fe 100644
> --- a/tests/ref/fate/paf-demux
> +++ b/tests/ref/fate/paf-demux
> @@ -1,5 +1,13 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: paf_video
> +#dimensions 0: 256x192
> +#sar 0: 0/1
>  #tb 1: 1/22050
> +#media_type 1: audio
> +#codec_id 1: paf_audio
> +#sample_rate 1: 22050
> +#channel_layout 1: 3
>  0,          0,          0,        1,   262144, 0x7f9a3c6a
>  1,          0,          0,    57330,   131072, 0x255a6ac2
>  0,          1,          1,        1,   260600, 0x0329e6f4, F=0x0
> diff --git a/tests/ref/fate/paf-video b/tests/ref/fate/paf-video
> index ed37c28..aa1fa82 100644
> --- a/tests/ref/fate/paf-video
> +++ b/tests/ref/fate/paf-video
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x192
> +#sar 0: 0/1
>  0,          0,          0,        1,   147456, 0x00000000
>  0,          1,          1,        1,   147456, 0x7be40798
>  0,          2,          2,        1,   147456, 0x44bc2fc0
> diff --git a/tests/ref/fate/pcm-planar b/tests/ref/fate/pcm-planar
> index 91b4a78..5339447 100644
> --- a/tests/ref/fate/pcm-planar
> +++ b/tests/ref/fate/pcm-planar
> @@ -1,4 +1,8 @@
>  #tb 0: 1/44100
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 44100
> +#channel_layout 0: 3
>  0,          0,          0,     1471,     5884, 0x00000000
>  0,       1471,       1471,     1471,     5884, 0x00000000
>  0,       2942,       2942,     1472,     5888, 0x00000000
> diff --git a/tests/ref/fate/pcm_dvd b/tests/ref/fate/pcm_dvd
> index 6037451..8aa87cd 100644
> --- a/tests/ref/fate/pcm_dvd
> +++ b/tests/ref/fate/pcm_dvd
> @@ -1,4 +1,8 @@
>  #tb 0: 1/48000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 48000
> +#channel_layout 0: 3
>  0,          0,          0,      334,     1336, 0x8e3c0abc
>  0,        400,        400,      334,     1336, 0x99c41108
>  0,        720,        720,      334,     1336, 0xd65be322
> diff --git a/tests/ref/fate/pict b/tests/ref/fate/pict
> index 0b764fc..f0f2e21 100644
> --- a/tests/ref/fate/pict
> +++ b/tests/ref/fate/pict
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    49152, 0x144804b0
> diff --git a/tests/ref/fate/pictor b/tests/ref/fate/pictor
> index c89b608..2c7cf93 100644
> --- a/tests/ref/fate/pictor
> +++ b/tests/ref/fate/pictor
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 312x206
> +#sar 0: 0/1
>  0,          0,          0,        1,   192816, 0x29b9c158
> diff --git a/tests/ref/fate/pmp-demux b/tests/ref/fate/pmp-demux
> index b481db7..4b66427 100644
> --- a/tests/ref/fate/pmp-demux
> +++ b/tests/ref/fate/pmp-demux
> @@ -1,4 +1,8 @@
>  #tb 0: 1/44100
> +#media_type 0: audio
> +#codec_id 0: mp3
> +#sample_rate 0: 44100
> +#channel_layout 0: 3
>  0,          0,          0,     1152,      417, 0xcb873fba
>  0,       1152,       1152,     1152,      104, 0x6d521c5a
>  0,       2304,       2304,     1152,      104, 0xb3af1d64
> diff --git a/tests/ref/fate/png-gray16 b/tests/ref/fate/png-gray16
> index 66fc601..cf0d9c2 100644
> --- a/tests/ref/fate/png-gray16
> +++ b/tests/ref/fate/png-gray16
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 1/1
>  0,          0,          0,        1,    49152, 0xc71b77cd
> diff --git a/tests/ref/fate/png-gray8 b/tests/ref/fate/png-gray8
> index 9d30db6..77541ca 100644
> --- a/tests/ref/fate/png-gray8
> +++ b/tests/ref/fate/png-gray8
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 1/1
>  0,          0,          0,        1,    49152, 0x55121b03
> diff --git a/tests/ref/fate/png-rgb24 b/tests/ref/fate/png-rgb24
> index c383836..54c8df8 100644
> --- a/tests/ref/fate/png-rgb24
> +++ b/tests/ref/fate/png-rgb24
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 72/72
>  0,          0,          0,        1,    49152, 0xe0013dee
> diff --git a/tests/ref/fate/png-rgb48 b/tests/ref/fate/png-rgb48
> index b1159f1..dee849f 100644
> --- a/tests/ref/fate/png-rgb48
> +++ b/tests/ref/fate/png-rgb48
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 1/1
>  0,          0,          0,        1,    49152, 0xcf0e902a
> diff --git a/tests/ref/fate/png-rgba b/tests/ref/fate/png-rgba
> index f20fe0c..e4d5bb8 100644
> --- a/tests/ref/fate/png-rgba
> +++ b/tests/ref/fate/png-rgba
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 1/1
>  0,          0,          0,        1,    49152, 0x5017bc21
> diff --git a/tests/ref/fate/png-ya16 b/tests/ref/fate/png-ya16
> index dffdaf7..2797ec8 100644
> --- a/tests/ref/fate/png-ya16
> +++ b/tests/ref/fate/png-ya16
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 1/1
>  0,          0,          0,        1,    49152, 0x0801ce78
> diff --git a/tests/ref/fate/png-ya8 b/tests/ref/fate/png-ya8
> index 1318af8..6fca461 100644
> --- a/tests/ref/fate/png-ya8
> +++ b/tests/ref/fate/png-ya8
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 1/1
>  0,          0,          0,        1,    49152, 0x5a1481f8
> diff --git a/tests/ref/fate/pngparser b/tests/ref/fate/pngparser
> index 93005cf..111c41d 100644
> --- a/tests/ref/fate/pngparser
> +++ b/tests/ref/fate/pngparser
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 20x20
> +#sar 0: 3543/3543
>  0,          0,          0,        1,     1600, 0x01a481a9
>  0,          1,          1,        1,     1600, 0x01a481a9
>  0,          2,          2,        1,     1600, 0x01a481a9
> diff --git a/tests/ref/fate/prores-422 b/tests/ref/fate/prores-422
> index f402511..1ae4f5f 100644
> --- a/tests/ref/fate/prores-422
> +++ b/tests/ref/fate/prores-422
> @@ -1,3 +1,7 @@
>  #tb 0: 100/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  8294400, 0x57127dd9
>  0,          1,          1,        1,  8294400, 0x57127dd9
> diff --git a/tests/ref/fate/prores-422_hq b/tests/ref/fate/prores-422_hq
> index 61a5014..4b4010d 100644
> --- a/tests/ref/fate/prores-422_hq
> +++ b/tests/ref/fate/prores-422_hq
> @@ -1,3 +1,7 @@
>  #tb 0: 100/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  8294400, 0x978851f4
>  0,          1,          1,        1,  8294400, 0x978851f4
> diff --git a/tests/ref/fate/prores-422_lt b/tests/ref/fate/prores-422_lt
> index 3113c8a..853c500 100644
> --- a/tests/ref/fate/prores-422_lt
> +++ b/tests/ref/fate/prores-422_lt
> @@ -1,3 +1,7 @@
>  #tb 0: 100/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  8294400, 0x4ca110c7
>  0,          1,          1,        1,  8294400, 0x4ca110c7
> diff --git a/tests/ref/fate/prores-422_proxy b/tests/ref/fate/prores-422_proxy
> index 5562dce..b77af3b 100644
> --- a/tests/ref/fate/prores-422_proxy
> +++ b/tests/ref/fate/prores-422_proxy
> @@ -1,3 +1,7 @@
>  #tb 0: 100/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1,  8294400, 0x007ba770
>  0,          1,          1,        1,  8294400, 0x007ba770
> diff --git a/tests/ref/fate/prores-alpha b/tests/ref/fate/prores-alpha
> index d64cfd5..f451d83 100644
> --- a/tests/ref/fate/prores-alpha
> +++ b/tests/ref/fate/prores-alpha
> @@ -1,3 +1,7 @@
>  #tb 0: 100/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1, 16588800, 0x8e4dac48
>  0,          1,          1,        1, 16588800, 0x8e4dac48
> diff --git a/tests/ref/fate/prores-alpha_skip b/tests/ref/fate/prores-alpha_skip
> index 559ec2b..a17cef8 100644
> --- a/tests/ref/fate/prores-alpha_skip
> +++ b/tests/ref/fate/prores-alpha_skip
> @@ -1,3 +1,7 @@
>  #tb 0: 100/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
>  0,          0,          0,        1, 12441600, 0xf11685dd
>  0,          1,          1,        1, 12441600, 0xf11685dd
> diff --git a/tests/ref/fate/prores-transparency b/tests/ref/fate/prores-transparency
> index 745e966..6a9c786 100644
> --- a/tests/ref/fate/prores-transparency
> +++ b/tests/ref/fate/prores-transparency
> @@ -1,5 +1,13 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 1/1
>  #tb 1: 1/48000
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 48000
> +#channel_layout 1: 3
>  0,          0,          0,        1, 16588800, 0x7163b01a
>  1,          0,          0,     1024,     4096, 0x00000000
>  1,       1024,       1024,      896,     3584, 0x00000000
> diff --git a/tests/ref/fate/prores-transparency_skip b/tests/ref/fate/prores-transparency_skip
> index 5fd8d0b..569d2ba 100644
> --- a/tests/ref/fate/prores-transparency_skip
> +++ b/tests/ref/fate/prores-transparency_skip
> @@ -1,5 +1,13 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 1/1
>  #tb 1: 1/48000
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 48000
> +#channel_layout 1: 3
>  0,          0,          0,        1, 12441600, 0x627d1548
>  1,          0,          0,     1024,     4096, 0x00000000
>  1,       1024,       1024,      896,     3584, 0x00000000
> diff --git a/tests/ref/fate/psx-str-demux b/tests/ref/fate/psx-str-demux
> index 42c5731..e346c52 100644
> --- a/tests/ref/fate/psx-str-demux
> +++ b/tests/ref/fate/psx-str-demux
> @@ -1,5 +1,13 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: mdec
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  #tb 1: 4/75
> +#media_type 1: audio
> +#codec_id 1: adpcm_xa
> +#sample_rate 1: 37800
> +#channel_layout 1: 3
>  0,          0,          0,        1,     8832, 0x01ad3eeb
>  1,          0,          0,        1,     2304, 0xf0ad1000
>  1,          1,          1,        1,     2304, 0x69269ce6
> diff --git a/tests/ref/fate/ptx b/tests/ref/fate/ptx
> index 7edbbdd..3dee9c2 100644
> --- a/tests/ref/fate/ptx
> +++ b/tests/ref/fate/ptx
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1024x128
> +#sar 0: 0/1
>  0,          0,          0,        1,   393216, 0x30479950
> diff --git a/tests/ref/fate/pva-demux b/tests/ref/fate/pva-demux
> index 67d4844..4059af4 100644
> --- a/tests/ref/fate/pva-demux
> +++ b/tests/ref/fate/pva-demux
> @@ -1,5 +1,13 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 544x576
> +#sar 0: 24/17
>  #tb 1: 1/90000
> +#media_type 1: audio
> +#codec_id 1: mp2
> +#sample_rate 1: 48000
> +#channel_layout 1: 3
>  1,          0,          0,     2160,      384, 0x071abcc8
>  1,       2160,       2160,     2160,      384, 0x31c9aee0
>  1,       4320,       4320,     2160,      384, 0xa50eaa94
> diff --git a/tests/ref/fate/qpeg b/tests/ref/fate/qpeg
> index eca2924..1a98887 100644
> --- a/tests/ref/fate/qpeg
> +++ b/tests/ref/fate/qpeg
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   230400, 0x0b712fba
>  0,          1,          1,        1,   230400, 0x30252ac7
>  0,          2,          2,        1,   230400, 0x6d98a787
> diff --git a/tests/ref/fate/qtrle-16bit b/tests/ref/fate/qtrle-16bit
> index 2021f2a..57651de 100644
> --- a/tests/ref/fate/qtrle-16bit
> +++ b/tests/ref/fate/qtrle-16bit
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x120
> +#sar 0: 0/1
>  0,          0,          0,        1,    57600, 0xcf2d39fc
>  0,          1,          1,        1,    57600, 0xfc9f6bed
>  0,          2,          2,        1,    57600, 0x3f5805bb
> diff --git a/tests/ref/fate/qtrle-1bit b/tests/ref/fate/qtrle-1bit
> index 3eccc27..d2f10bc 100644
> --- a/tests/ref/fate/qtrle-1bit
> +++ b/tests/ref/fate/qtrle-1bit
> @@ -1,4 +1,8 @@
>  #tb 0: 1/12
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,    77824, 0xc298c68b
>  0,          1,          1,        1,    77824, 0x22f7c63e
>  0,          2,          2,        1,    77824, 0x2aacc669
> diff --git a/tests/ref/fate/qtrle-24bit b/tests/ref/fate/qtrle-24bit
> index a21b099..545e82e 100644
> --- a/tests/ref/fate/qtrle-24bit
> +++ b/tests/ref/fate/qtrle-24bit
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x120
> +#sar 0: 0/1
>  0,          0,          0,        1,    57600, 0x3718ad00
>  0,          1,          1,        1,    57600, 0x54861558
>  0,          2,          2,        1,    57600, 0xea1d6233
> diff --git a/tests/ref/fate/qtrle-2bit b/tests/ref/fate/qtrle-2bit
> index 95c0f7c..633dd14 100644
> --- a/tests/ref/fate/qtrle-2bit
> +++ b/tests/ref/fate/qtrle-2bit
> @@ -1,4 +1,8 @@
>  #tb 0: 1/12
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   230400, 0xb1ee55dc
>  0,          1,          1,        1,   230400, 0x97c580bf
>  0,          2,          2,        1,   230400, 0xd4bd57e8
> diff --git a/tests/ref/fate/qtrle-32bit b/tests/ref/fate/qtrle-32bit
> index ed6dc03..aaaf8d6 100644
> --- a/tests/ref/fate/qtrle-32bit
> +++ b/tests/ref/fate/qtrle-32bit
> @@ -1,4 +1,8 @@
>  #tb 0: 100/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  0,          0,          0,        1,  1036800, 0x2a90d062
>  0,          1,          1,        1,  1036800, 0x6565aded
>  0,          2,          2,        1,  1036800, 0xf0b587d2
> diff --git a/tests/ref/fate/qtrle-4bit b/tests/ref/fate/qtrle-4bit
> index 74eb4ab..b09920b 100644
> --- a/tests/ref/fate/qtrle-4bit
> +++ b/tests/ref/fate/qtrle-4bit
> @@ -1,4 +1,8 @@
>  #tb 0: 1/12
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   230400, 0x0655b3d9
>  0,          1,          1,        1,   230400, 0x9c626fd3
>  0,          2,          2,        1,   230400, 0x5bc95868
> diff --git a/tests/ref/fate/qtrle-8bit b/tests/ref/fate/qtrle-8bit
> index 5b30fbb..8da113d 100644
> --- a/tests/ref/fate/qtrle-8bit
> +++ b/tests/ref/fate/qtrle-8bit
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   921600, 0x1492e3ed
>  0,          1,          1,        1,   921600, 0x1492e3ed
>  0,          2,          2,        1,   921600, 0x1492e3ed
> diff --git a/tests/ref/fate/quickdraw b/tests/ref/fate/quickdraw
> index eccb477..c3bb0a5 100644
> --- a/tests/ref/fate/quickdraw
> +++ b/tests/ref/fate/quickdraw
> @@ -1,3 +1,7 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   921600, 0xc0e68764
>  0,          2,          2,        1,   921600, 0x01a16629
> diff --git a/tests/ref/fate/r210 b/tests/ref/fate/r210
> index 45bb10c..e3686fe 100644
> --- a/tests/ref/fate/r210
> +++ b/tests/ref/fate/r210
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,  1843200, 0xbd414b93
>  0,          1,          1,        1,  1843200, 0x23298f1f
>  0,          2,          2,        1,  1843200, 0x5a56df19
> diff --git a/tests/ref/fate/ra3-144 b/tests/ref/fate/ra3-144
> index 40bcaed..b5fb47b 100644
> --- a/tests/ref/fate/ra3-144
> +++ b/tests/ref/fate/ra3-144
> @@ -1,4 +1,8 @@
>  #tb 0: 1/8000
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 8000
> +#channel_layout 0: 4
>  0,          0,          0,      160,      320, 0x00000000
>  0,        160,        160,      160,      320, 0x4cfd5d74
>  0,        320,        320,      160,      320, 0xbb60fa3d
> diff --git a/tests/ref/fate/redcode-demux b/tests/ref/fate/redcode-demux
> index a7e2838..c08bbc8 100644
> --- a/tests/ref/fate/redcode-demux
> +++ b/tests/ref/fate/redcode-demux
> @@ -1,5 +1,13 @@
>  #tb 0: 1/240000
> +#media_type 0: video
> +#codec_id 0: jpeg2000
> +#dimensions 0: 2048x1152
> +#sar 0: 0/1
>  #tb 1: 1/240000
> +#media_type 1: audio
> +#codec_id 1: pcm_s32be
> +#sample_rate 1: 48000
> +#channel_layout 1: 4
>  0,          0,          0,    10010,  1626280, 0x5768c7d6
>  1,          0,          0,    18140,    14816, 0xd185e8c7
>  0,      10010,      10010,    10010,  1626092, 0x070bd882
> diff --git a/tests/ref/fate/rl2 b/tests/ref/fate/rl2
> index d7dd23d..9189822 100644
> --- a/tests/ref/fate/rl2
> +++ b/tests/ref/fate/rl2
> @@ -1,4 +1,8 @@
>  #tb 0: 1171/11025
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0x7112a667
>  0,          1,          1,        1,   192000, 0x6936abf3
>  0,          2,          2,        1,   192000, 0xb1f08981
> diff --git a/tests/ref/fate/roqvideo b/tests/ref/fate/roqvideo
> index 9febedb..36eec54 100644
> --- a/tests/ref/fate/roqvideo
> +++ b/tests/ref/fate/roqvideo
> @@ -1,4 +1,8 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   393216, 0x56995aac
>  0,          1,          1,        1,   393216, 0xf9ed5d6c
>  0,          2,          2,        1,   393216, 0xd3285d75
> diff --git a/tests/ref/fate/rpza b/tests/ref/fate/rpza
> index a9ae3bb..3ad7e4c 100644
> --- a/tests/ref/fate/rpza
> +++ b/tests/ref/fate/rpza
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   230400, 0x26a4728c
>  0,          1,          1,        1,   230400, 0xa5ff0a21
>  0,          2,          2,        1,   230400, 0x479d767d
> diff --git a/tests/ref/fate/rscc b/tests/ref/fate/rscc
> index 69dbfe1..7c1bb49 100644
> --- a/tests/ref/fate/rscc
> +++ b/tests/ref/fate/rscc
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1760x968
> +#sar 0: 0/1
>  0,          0,          0,        1,  6814720, 0x1365f8ef
>  0,          1,          1,        1,  6814720, 0x90838983
>  0,          2,          2,        1,  6814720, 0xf0cc3131
> diff --git a/tests/ref/fate/rv30 b/tests/ref/fate/rv30
> index 70db647..c54aeea 100644
> --- a/tests/ref/fate/rv30
> +++ b/tests/ref/fate/rv30
> @@ -1,4 +1,8 @@
>  #tb 0: 32768/982057
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   126720, 0xcefaec47
>  0,          1,          1,        1,   126720, 0xa416ece5
>  0,          2,          2,        1,   126720, 0xa416ece5
> diff --git a/tests/ref/fate/rv40 b/tests/ref/fate/rv40
> index 6159859..9cbb844 100644
> --- a/tests/ref/fate/rv40
> +++ b/tests/ref/fate/rv40
> @@ -1,4 +1,8 @@
>  #tb 0: 32768/785647
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 576x320
> +#sar 0: 0/1
>  0,          0,          0,        1,   276480, 0x5f7a0d4f
>  0,          1,          1,        1,   276480, 0x5f7a0d4f
>  0,          2,          2,        1,   276480, 0x5f7a0d4f
> diff --git a/tests/ref/fate/sanm b/tests/ref/fate/sanm
> index a882118..7a6690f 100644
> --- a/tests/ref/fate/sanm
> +++ b/tests/ref/fate/sanm
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   921600, 0x00000000
>  0,          1,          1,        1,   921600, 0x00000000
>  0,          2,          2,        1,   921600, 0x00000000
> diff --git a/tests/ref/fate/screenpresso b/tests/ref/fate/screenpresso
> index bbdffb4..74195d4 100644
> --- a/tests/ref/fate/screenpresso
> +++ b/tests/ref/fate/screenpresso
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x360
> +#sar 0: 0/1
>  0,          0,          0,        1,   691200, 0xfdbdfad6
>  0,          1,          1,        1,   691200, 0xc5feb961
>  0,          4,          4,        1,   691200, 0x4c8c7e23
> diff --git a/tests/ref/fate/sgi-gray16 b/tests/ref/fate/sgi-gray16
> index 0908746..8dba0f4 100644
> --- a/tests/ref/fate/sgi-gray16
> +++ b/tests/ref/fate/sgi-gray16
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   262144, 0x6c27f084
> diff --git a/tests/ref/fate/sgi-gray16-rle b/tests/ref/fate/sgi-gray16-rle
> index 09903d5..472835a 100644
> --- a/tests/ref/fate/sgi-gray16-rle
> +++ b/tests/ref/fate/sgi-gray16-rle
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   262144, 0x65ef57ff
> diff --git a/tests/ref/fate/sgi-gray8 b/tests/ref/fate/sgi-gray8
> index b0e0606..55c12dc 100644
> --- a/tests/ref/fate/sgi-gray8
> +++ b/tests/ref/fate/sgi-gray8
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   131072, 0xb0702a94
> diff --git a/tests/ref/fate/sgi-gray8-rle b/tests/ref/fate/sgi-gray8-rle
> index b0e0606..55c12dc 100644
> --- a/tests/ref/fate/sgi-gray8-rle
> +++ b/tests/ref/fate/sgi-gray8-rle
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   131072, 0xb0702a94
> diff --git a/tests/ref/fate/sgi-rgb24 b/tests/ref/fate/sgi-rgb24
> index 30aca1c..4326cab 100644
> --- a/tests/ref/fate/sgi-rgb24
> +++ b/tests/ref/fate/sgi-rgb24
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   393216, 0xa9b28fd9
> diff --git a/tests/ref/fate/sgi-rgb24-rle b/tests/ref/fate/sgi-rgb24-rle
> index 1128de5..d21bde1 100644
> --- a/tests/ref/fate/sgi-rgb24-rle
> +++ b/tests/ref/fate/sgi-rgb24-rle
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   393216, 0xe96e1de2
> diff --git a/tests/ref/fate/sgi-rgb48 b/tests/ref/fate/sgi-rgb48
> index 8f3ca50..29fe302 100644
> --- a/tests/ref/fate/sgi-rgb48
> +++ b/tests/ref/fate/sgi-rgb48
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   786432, 0xee4aa667
> diff --git a/tests/ref/fate/sgi-rgb48-rle b/tests/ref/fate/sgi-rgb48-rle
> index 2cf0259..49fc973 100644
> --- a/tests/ref/fate/sgi-rgb48-rle
> +++ b/tests/ref/fate/sgi-rgb48-rle
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   786432, 0xbc743bc4
> diff --git a/tests/ref/fate/sgi-rgba b/tests/ref/fate/sgi-rgba
> index 058f5f9..6a2d176 100644
> --- a/tests/ref/fate/sgi-rgba
> +++ b/tests/ref/fate/sgi-rgba
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   524288, 0x4ee5adbb
> diff --git a/tests/ref/fate/sgi-rgba-rle b/tests/ref/fate/sgi-rgba-rle
> index 058f5f9..6a2d176 100644
> --- a/tests/ref/fate/sgi-rgba-rle
> +++ b/tests/ref/fate/sgi-rgba-rle
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   524288, 0x4ee5adbb
> diff --git a/tests/ref/fate/sgi-rgba64 b/tests/ref/fate/sgi-rgba64
> index f4e939e..00181dc 100644
> --- a/tests/ref/fate/sgi-rgba64
> +++ b/tests/ref/fate/sgi-rgba64
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x256
> +#sar 0: 0/1
>  0,          0,          0,        1,  1048576, 0xc657e22b
> diff --git a/tests/ref/fate/sgi-rgba64-rle b/tests/ref/fate/sgi-rgba64-rle
> index cdf5fd0..354d391 100644
> --- a/tests/ref/fate/sgi-rgba64-rle
> +++ b/tests/ref/fate/sgi-rgba64-rle
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x256
> +#sar 0: 0/1
>  0,          0,          0,        1,  1048576, 0xb619d0f1
> diff --git a/tests/ref/fate/sierra-vmd-audio b/tests/ref/fate/sierra-vmd-audio
> index 13d3567..2b9f8e8 100644
> --- a/tests/ref/fate/sierra-vmd-audio
> +++ b/tests/ref/fate/sierra-vmd-audio
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 4
>  0,          0,          0,    61740,   123480, 0x3a794c13
>  0,      61740,      61740,     2205,     4410, 0x109d04e0
>  0,      63945,      63945,     2205,     4410, 0x224d244f
> diff --git a/tests/ref/fate/sierra-vmd-video b/tests/ref/fate/sierra-vmd-video
> index 668faee..b1b22e3 100644
> --- a/tests/ref/fate/sierra-vmd-video
> +++ b/tests/ref/fate/sierra-vmd-video
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   230400, 0x54b4bfe2
>  0,          1,          1,        1,   230400, 0x9e1460e3
>  0,          2,          2,        1,   230400, 0x8136f21c
> diff --git a/tests/ref/fate/siff-demux b/tests/ref/fate/siff-demux
> index 692e504..687a518 100644
> --- a/tests/ref/fate/siff-demux
> +++ b/tests/ref/fate/siff-demux
> @@ -1,5 +1,13 @@
>  #tb 0: 1/12
> +#media_type 0: video
> +#codec_id 0: vb
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  #tb 1: 1/22050
> +#media_type 1: audio
> +#codec_id 1: pcm_u8
> +#sample_rate 1: 22050
> +#channel_layout 1: 4
>  0,          0,          0,        1,    15152, 0x14fc0f1f
>  1,          0,          0,    22050,    22050, 0xa7d60d27
>  0,          1,          1,        1,    15344, 0x31614bd7
> diff --git a/tests/ref/fate/smacker-audio b/tests/ref/fate/smacker-audio
> index 442f479..fbeb4be 100644
> --- a/tests/ref/fate/smacker-audio
> +++ b/tests/ref/fate/smacker-audio
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: pcm_s16le
> +#sample_rate 0: 22050
> +#channel_layout 0: 4
>  0,          0,          0,    23620,    47240, 0x9974897c
>  0,      23620,      23620,     1564,     3128, 0x7e4064b4
>  0,      25184,      25184,     1564,     3128, 0x80883301
> diff --git a/tests/ref/fate/smacker-video b/tests/ref/fate/smacker-video
> index 8bd3071..9325d91 100644
> --- a/tests/ref/fate/smacker-video
> +++ b/tests/ref/fate/smacker-video
> @@ -1,4 +1,8 @@
>  #tb 0: 71/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0x8926d7fc
>  0,          1,          1,        1,   192000, 0x2506d384
>  0,          2,          2,        1,   192000, 0x9a8dc93a
> diff --git a/tests/ref/fate/smc b/tests/ref/fate/smc
> index 1635b37..4802407 100644
> --- a/tests/ref/fate/smc
> +++ b/tests/ref/fate/smc
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   230400, 0xf814fc90
>  0,          1,          1,        1,   230400, 0xe1b13137
>  0,          2,          2,        1,   230400, 0xa7f4d408
> diff --git a/tests/ref/fate/smjpeg-demux b/tests/ref/fate/smjpeg-demux
> index 637f28c..242a22f 100644
> --- a/tests/ref/fate/smjpeg-demux
> +++ b/tests/ref/fate/smjpeg-demux
> @@ -1,5 +1,13 @@
>  #tb 0: 1/1000
> +#media_type 0: video
> +#codec_id 0: mjpeg
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  #tb 1: 1/1000
> +#media_type 1: audio
> +#codec_id 1: adpcm_ima_smjpeg
> +#sample_rate 1: 22050
> +#channel_layout 1: 4
>  0,          0,          0,        0,      734, 0x5a042c2c
>  1,          0,          0,       23,      260, 0x00000000
>  1,         23,         23,       23,      260, 0x00000000
> diff --git a/tests/ref/fate/smvjpeg b/tests/ref/fate/smvjpeg
> index 1a012cd..360fad6 100644
> --- a/tests/ref/fate/smvjpeg
> +++ b/tests/ref/fate/smvjpeg
> @@ -1,4 +1,8 @@
>  #tb 0: 1/1
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x160
> +#sar 0: 0/1
>  0,          0,          0,        1,    30720, 0x3a821807
>  0,          1,          1,        1,    30720, 0x95168e5d
>  0,          2,          2,        1,    30720, 0xd4d98e45
> diff --git a/tests/ref/fate/sp5x b/tests/ref/fate/sp5x
> index 986c111..603535b 100644
> --- a/tests/ref/fate/sp5x
> +++ b/tests/ref/fate/sp5x
> @@ -1,5 +1,13 @@
>  #tb 0: 513/5000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  #tb 1: 1/8000
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 8000
> +#channel_layout 1: 4
>  0,          0,          0,        1,   115200, 0x8ebcb7f8
>  1,          0,          0,     1024,     2048, 0x366ee71c
>  0,          1,          1,        1,   115200, 0x1fa8e673
> diff --git a/tests/ref/fate/sub2video b/tests/ref/fate/sub2video
> index 3a03cbf..ace6d38 100644
> --- a/tests/ref/fate/sub2video
> +++ b/tests/ref/fate/sub2video
> @@ -1,6 +1,12 @@
>  #extradata 1:      150, 0x7c99258b
>  #tb 0: 1/5
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 0/1
>  #tb 1: 1/1000
> +#media_type 1: subtitle
> +#codec_id 1: dvd_subtitle
>  0,          0,          0,        1,   518400, 0x83c27b82
>  0,          1,          1,        1,   518400, 0x4051c7f9
>  0,          2,          2,        1,   518400, 0xfb00e17e
> diff --git a/tests/ref/fate/sunraster-1bit-raw b/tests/ref/fate/sunraster-1bit-raw
> index 123e245..a55a541 100644
> --- a/tests/ref/fate/sunraster-1bit-raw
> +++ b/tests/ref/fate/sunraster-1bit-raw
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x512
> +#sar 0: 0/1
>  0,          0,          0,        1,    32768, 0x6d16e246
> diff --git a/tests/ref/fate/sunraster-1bit-rle b/tests/ref/fate/sunraster-1bit-rle
> index 123e245..a55a541 100644
> --- a/tests/ref/fate/sunraster-1bit-rle
> +++ b/tests/ref/fate/sunraster-1bit-rle
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x512
> +#sar 0: 0/1
>  0,          0,          0,        1,    32768, 0x6d16e246
> diff --git a/tests/ref/fate/sunraster-24bit-raw b/tests/ref/fate/sunraster-24bit-raw
> index fa059ef..dc96609 100644
> --- a/tests/ref/fate/sunraster-24bit-raw
> +++ b/tests/ref/fate/sunraster-24bit-raw
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x512
> +#sar 0: 0/1
>  0,          0,          0,        1,   786432, 0xb4d417bf
> diff --git a/tests/ref/fate/sunraster-24bit-rle b/tests/ref/fate/sunraster-24bit-rle
> index fa059ef..dc96609 100644
> --- a/tests/ref/fate/sunraster-24bit-rle
> +++ b/tests/ref/fate/sunraster-24bit-rle
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x512
> +#sar 0: 0/1
>  0,          0,          0,        1,   786432, 0xb4d417bf
> diff --git a/tests/ref/fate/sunraster-8bit-raw b/tests/ref/fate/sunraster-8bit-raw
> index 659b433..94a1014 100644
> --- a/tests/ref/fate/sunraster-8bit-raw
> +++ b/tests/ref/fate/sunraster-8bit-raw
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x512
> +#sar 0: 0/1
>  0,          0,          0,        1,   786432, 0xf4364008
> diff --git a/tests/ref/fate/sunraster-8bit-rle b/tests/ref/fate/sunraster-8bit-rle
> index 659b433..94a1014 100644
> --- a/tests/ref/fate/sunraster-8bit-rle
> +++ b/tests/ref/fate/sunraster-8bit-rle
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x512
> +#sar 0: 0/1
>  0,          0,          0,        1,   786432, 0xf4364008
> diff --git a/tests/ref/fate/sunraster-8bit_gray-raw b/tests/ref/fate/sunraster-8bit_gray-raw
> index 455af5f..d33a13c 100644
> --- a/tests/ref/fate/sunraster-8bit_gray-raw
> +++ b/tests/ref/fate/sunraster-8bit_gray-raw
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1024x768
> +#sar 0: 0/1
>  0,          0,          0,        1,   786432, 0x5859b48e
> diff --git a/tests/ref/fate/svq1 b/tests/ref/fate/svq1
> index 3bcf715..d53e295 100644
> --- a/tests/ref/fate/svq1
> +++ b/tests/ref/fate/svq1
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x120
> +#sar 0: 0/1
>  0,          0,          0,        1,    21600, 0x7f9389e3
>  0,          1,          1,        1,    21600, 0xcebb8896
>  0,          2,          2,        1,    21600, 0xef51860a
> diff --git a/tests/ref/fate/svq1-headerswap b/tests/ref/fate/svq1-headerswap
> index d9f9597..81df227 100644
> --- a/tests/ref/fate/svq1-headerswap
> +++ b/tests/ref/fate/svq1-headerswap
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 293x178
> +#sar 0: 0/1
>  0,          0,          0,        1,    58814, 0x5caad04b
>  0,          1,          1,        1,    58814, 0x98d8ceb8
>  0,          2,          2,        1,    58814, 0x8925cdb0
> diff --git a/tests/ref/fate/svq3 b/tests/ref/fate/svq3
> index 073d10b..5d90c6b 100644
> --- a/tests/ref/fate/svq3
> +++ b/tests/ref/fate/svq3
> @@ -1,4 +1,8 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   115200, 0x2c810465
>  0,          1,          1,        1,   115200, 0x010b5765
>  0,          2,          2,        1,   115200, 0x2be11a4e
> diff --git a/tests/ref/fate/targa-conformance-CBW8 b/tests/ref/fate/targa-conformance-CBW8
> index 60270d7..be4bdc3 100644
> --- a/tests/ref/fate/targa-conformance-CBW8
> +++ b/tests/ref/fate/targa-conformance-CBW8
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x267e21ef
> diff --git a/tests/ref/fate/targa-conformance-CCM8 b/tests/ref/fate/targa-conformance-CCM8
> index 45bb181..d30fa72 100644
> --- a/tests/ref/fate/targa-conformance-CCM8
> +++ b/tests/ref/fate/targa-conformance-CCM8
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    65536, 0x47e97fe9
> diff --git a/tests/ref/fate/targa-conformance-CTC16 b/tests/ref/fate/targa-conformance-CTC16
> index e848ff8..15dfafd 100644
> --- a/tests/ref/fate/targa-conformance-CTC16
> +++ b/tests/ref/fate/targa-conformance-CTC16
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    32768, 0xa6b3d20d
> diff --git a/tests/ref/fate/targa-conformance-CTC24 b/tests/ref/fate/targa-conformance-CTC24
> index c95f406..d0b7d66 100644
> --- a/tests/ref/fate/targa-conformance-CTC24
> +++ b/tests/ref/fate/targa-conformance-CTC24
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    49152, 0xaca4bc29
> diff --git a/tests/ref/fate/targa-conformance-CTC32 b/tests/ref/fate/targa-conformance-CTC32
> index aad3bfc..1c43896 100644
> --- a/tests/ref/fate/targa-conformance-CTC32
> +++ b/tests/ref/fate/targa-conformance-CTC32
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    65536, 0xcf98bc29
> diff --git a/tests/ref/fate/targa-conformance-UBW8 b/tests/ref/fate/targa-conformance-UBW8
> index 60270d7..be4bdc3 100644
> --- a/tests/ref/fate/targa-conformance-UBW8
> +++ b/tests/ref/fate/targa-conformance-UBW8
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x267e21ef
> diff --git a/tests/ref/fate/targa-conformance-UCM8 b/tests/ref/fate/targa-conformance-UCM8
> index 45bb181..d30fa72 100644
> --- a/tests/ref/fate/targa-conformance-UCM8
> +++ b/tests/ref/fate/targa-conformance-UCM8
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    65536, 0x47e97fe9
> diff --git a/tests/ref/fate/targa-conformance-UTC16 b/tests/ref/fate/targa-conformance-UTC16
> index e848ff8..15dfafd 100644
> --- a/tests/ref/fate/targa-conformance-UTC16
> +++ b/tests/ref/fate/targa-conformance-UTC16
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    32768, 0xa6b3d20d
> diff --git a/tests/ref/fate/targa-conformance-UTC24 b/tests/ref/fate/targa-conformance-UTC24
> index c95f406..d0b7d66 100644
> --- a/tests/ref/fate/targa-conformance-UTC24
> +++ b/tests/ref/fate/targa-conformance-UTC24
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    49152, 0xaca4bc29
> diff --git a/tests/ref/fate/targa-conformance-UTC32 b/tests/ref/fate/targa-conformance-UTC32
> index aad3bfc..1c43896 100644
> --- a/tests/ref/fate/targa-conformance-UTC32
> +++ b/tests/ref/fate/targa-conformance-UTC32
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 128x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    65536, 0xcf98bc29
> diff --git a/tests/ref/fate/targa-top-to-bottom b/tests/ref/fate/targa-top-to-bottom
> index 4d9577a..6cf1c95 100644
> --- a/tests/ref/fate/targa-top-to-bottom
> +++ b/tests/ref/fate/targa-top-to-bottom
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   196608, 0xb29ec51a
> diff --git a/tests/ref/fate/tdsc b/tests/ref/fate/tdsc
> index d6925e9..de9f362 100644
> --- a/tests/ref/fate/tdsc
> +++ b/tests/ref/fate/tdsc
> @@ -1,4 +1,8 @@
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1440x900
> +#sar 0: 0/1
>  0,          0,          0,        1,  3888000, 0x9c498657
>  0,          7,          7,        1,  3888000, 0x72a2ae22
>  0,          8,          8,        1,  3888000, 0x72a2ae22
> diff --git a/tests/ref/fate/theora-coeff-level64 b/tests/ref/fate/theora-coeff-level64
> index 4bfafaf..cc64bcc 100644
> --- a/tests/ref/fate/theora-coeff-level64
> +++ b/tests/ref/fate/theora-coeff-level64
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 2960x1040
> +#sar 0: 1/1
>  0,          0,          0,        1,  4617600, 0x4ba6df50
>  0,          1,          1,        1,  4617600, 0x419fdeaf
>  0,          2,          2,        1,  4617600, 0xeb2edced
> diff --git a/tests/ref/fate/theora-offset b/tests/ref/fate/theora-offset
> index 5921657..b9a6e08 100644
> --- a/tests/ref/fate/theora-offset
> +++ b/tests/ref/fate/theora-offset
> @@ -1,4 +1,8 @@
>  #tb 0: 1/1
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x512
> +#sar 0: 0/1
>  0,          0,          0,        1,   393216, 0xdc998fa2
>  0,          1,          1,        1,   393216, 0x979a8fbd
>  0,          2,          2,        1,   393216, 0x979a8fbd
> diff --git a/tests/ref/fate/thp b/tests/ref/fate/thp
> index 52dd059..4323ac9 100644
> --- a/tests/ref/fate/thp
> +++ b/tests/ref/fate/thp
> @@ -1,4 +1,8 @@
>  #tb 0: 524288/15712911
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 608x320
> +#sar 0: 0/1
>  0,          0,          0,        1,   291840, 0xbd7e0b22
>  0,          1,          1,        1,   291840, 0xf6e12ca5
>  0,          2,          2,        1,   291840, 0x528c7049
> diff --git a/tests/ref/fate/tiertex-seq b/tests/ref/fate/tiertex-seq
> index 74407e7..3504dd4 100644
> --- a/tests/ref/fate/tiertex-seq
> +++ b/tests/ref/fate/tiertex-seq
> @@ -1,5 +1,13 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x128
> +#sar 0: 0/1
>  #tb 1: 1/22050
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 22050
> +#channel_layout 1: 4
>  1,          0,          0,      882,     1764, 0x00000000
>  1,        882,        882,      882,     1764, 0x80a253d9
>  0,          2,          2,        1,    98304, 0x2e5db4a4
> diff --git a/tests/ref/fate/tiff-fax-g3 b/tests/ref/fate/tiff-fax-g3
> index fa7bc2f..ac1fff9 100644
> --- a/tests/ref/fate/tiff-fax-g3
> +++ b/tests/ref/fate/tiff-fax-g3
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 2464x3248
> +#sar 0: 1/1
>  0,          0,          0,        1,  1000384, 0xb758eb8b
> diff --git a/tests/ref/fate/tiff-fax-g3s b/tests/ref/fate/tiff-fax-g3s
> index fa7bc2f..ac1fff9 100644
> --- a/tests/ref/fate/tiff-fax-g3s
> +++ b/tests/ref/fate/tiff-fax-g3s
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 2464x3248
> +#sar 0: 1/1
>  0,          0,          0,        1,  1000384, 0xb758eb8b
> diff --git a/tests/ref/fate/tmv b/tests/ref/fate/tmv
> index 6203e86..94437fa 100644
> --- a/tests/ref/fate/tmv
> +++ b/tests/ref/fate/tmv
> @@ -1,5 +1,13 @@
>  #tb 0: 184/11029
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  #tb 1: 1/22058
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 22058
> +#channel_layout 1: 4
>  0,          0,          0,        1,   192000, 0xc698297a
>  1,          0,          0,      368,      736, 0xf63db497
>  0,          1,          1,        1,   192000, 0x8d5bd6be
> diff --git a/tests/ref/fate/truemotion1-15 b/tests/ref/fate/truemotion1-15
> index af4a320..24d4c2c 100644
> --- a/tests/ref/fate/truemotion1-15
> +++ b/tests/ref/fate/truemotion1-15
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x168
> +#sar 0: 1/1
>  0,          0,          0,        1,   161280, 0x677c9fb3
>  0,          1,          1,        1,   161280, 0xaa280e0a
>  0,          2,          2,        1,   161280, 0x8a4d2225
> diff --git a/tests/ref/fate/truemotion1-24 b/tests/ref/fate/truemotion1-24
> index 73bb9e7..b41eae0 100644
> --- a/tests/ref/fate/truemotion1-24
> +++ b/tests/ref/fate/truemotion1-24
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 144x160
> +#sar 0: 2/1
>  0,          0,          0,        1,    69120, 0x68beb30f
>  0,          1,          1,        1,    69120, 0x3976f5cf
>  0,          2,          2,        1,    69120, 0xf815bc3c
> diff --git a/tests/ref/fate/truemotion2 b/tests/ref/fate/truemotion2
> index c263ba4..df25f61 100644
> --- a/tests/ref/fate/truemotion2
> +++ b/tests/ref/fate/truemotion2
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   230400, 0x135cb509
>  0,          1,          1,        1,   230400, 0x919a1ab7
>  0,          2,          2,        1,   230400, 0x0af8722b
> diff --git a/tests/ref/fate/tscc-15bit b/tests/ref/fate/tscc-15bit
> index a2871ef..e854320 100644
> --- a/tests/ref/fate/tscc-15bit
> +++ b/tests/ref/fate/tscc-15bit
> @@ -1,5 +1,13 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 548x400
> +#sar 0: 0/1
>  #tb 1: 1/11025
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 11025
> +#channel_layout 1: 4
>  0,          0,          0,        1,   657600, 0x50b3a0c2
>  1,          0,          0,    11025,    22050, 0x1740aaec
>  0,          1,          1,        1,   657600, 0x50b3a0c2
> diff --git a/tests/ref/fate/tscc-32bit b/tests/ref/fate/tscc-32bit
> index 4eef490..dfb37a9 100644
> --- a/tests/ref/fate/tscc-32bit
> +++ b/tests/ref/fate/tscc-32bit
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1024x768
> +#sar 0: 0/1
>  0,          0,          0,        1,  2359296, 0x76cccaa7
>  0,          1,          1,        1,  2359296, 0x09c52bbf
>  0,          2,          2,        1,  2359296, 0xc8746009
> diff --git a/tests/ref/fate/tscc2-avi b/tests/ref/fate/tscc2-avi
> index ad71b82..6f0e8a5 100644
> --- a/tests/ref/fate/tscc2-avi
> +++ b/tests/ref/fate/tscc2-avi
> @@ -1,4 +1,8 @@
>  #tb 0: 1/24
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   230400, 0x7a2103c0
>  0,          1,          1,        1,   230400, 0xd381c279
>  0,          2,          2,        1,   230400, 0xd381c279
> diff --git a/tests/ref/fate/tscc2-mov b/tests/ref/fate/tscc2-mov
> index d73ff3f..8714a87 100644
> --- a/tests/ref/fate/tscc2-mov
> +++ b/tests/ref/fate/tscc2-mov
> @@ -1,4 +1,8 @@
>  #tb 0: 1/5
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 892x441
> +#sar 0: 0/1
>  0,          0,          0,        1,  1180116, 0x01d01336
>  0,          1,          1,        1,  1180116, 0x01d01336
>  0,          2,          2,        1,  1180116, 0x01d01336
> diff --git a/tests/ref/fate/txd-16bpp b/tests/ref/fate/txd-16bpp
> index 33943f9..a3b1e23 100644
> --- a/tests/ref/fate/txd-16bpp
> +++ b/tests/ref/fate/txd-16bpp
> @@ -1,4 +1,8 @@
>  #tb 0: 1/5
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 0/1
>  0,          0,          0,        1,    16384, 0x4d39b4cb
>  0,          1,          1,        1,    16384, 0x2a8d14b4
>  0,          2,          2,        1,    16384, 0xe26793cb
> diff --git a/tests/ref/fate/txd-odd b/tests/ref/fate/txd-odd
> index fe7c615..6ea5811 100644
> --- a/tests/ref/fate/txd-odd
> +++ b/tests/ref/fate/txd-odd
> @@ -1,2 +1,6 @@
>  #tb 0: 1/5
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 387x249
> +#sar 0: 0/1
>  0,          0,          0,        1,   385452, 0x055a14d6
> diff --git a/tests/ref/fate/txd-pal8 b/tests/ref/fate/txd-pal8
> index 61fee80..2c36668 100644
> --- a/tests/ref/fate/txd-pal8
> +++ b/tests/ref/fate/txd-pal8
> @@ -1,2 +1,6 @@
>  #tb 0: 1/5
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x512
> +#sar 0: 0/1
>  0,          0,          0,        1,   786432, 0x56654d61
> diff --git a/tests/ref/fate/ulti b/tests/ref/fate/ulti
> index 4e9968b..4b3a762 100644
> --- a/tests/ref/fate/ulti
> +++ b/tests/ref/fate/ulti
> @@ -1,4 +1,8 @@
>  #tb 0: 1/12
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,    86400, 0x5d58253d
>  0,          1,          1,        1,    86400, 0x0626d90d
>  0,          2,          2,        1,    86400, 0x4ecb5048
> diff --git a/tests/ref/fate/utvideo_rgb_left b/tests/ref/fate/utvideo_rgb_left
> index d19a6b1..d2ccbce 100644
> --- a/tests/ref/fate/utvideo_rgb_left
> +++ b/tests/ref/fate/utvideo_rgb_left
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   921600, 0x27e6001e
>  0,          1,          1,        1,   921600, 0x7c0a92bc
>  0,          2,          2,        1,   921600, 0x4d2be42c
> diff --git a/tests/ref/fate/utvideo_rgb_median b/tests/ref/fate/utvideo_rgb_median
> index f041285..913b697 100644
> --- a/tests/ref/fate/utvideo_rgb_median
> +++ b/tests/ref/fate/utvideo_rgb_median
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   921600, 0x9776611f
>  0,          1,          1,        1,   921600, 0xdbfa64f4
>  0,          2,          2,        1,   921600, 0xed2a0580
> diff --git a/tests/ref/fate/utvideo_rgba_left b/tests/ref/fate/utvideo_rgba_left
> index a7e0ed4..cb7876f 100644
> --- a/tests/ref/fate/utvideo_rgba_left
> +++ b/tests/ref/fate/utvideo_rgba_left
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,  1228800, 0xf1bc9432
>  0,          1,          1,        1,  1228800, 0x8480d1e5
>  0,          2,          2,        1,  1228800, 0xb01d5fb2
> diff --git a/tests/ref/fate/utvideo_rgba_median b/tests/ref/fate/utvideo_rgba_median
> index a7e0ed4..cb7876f 100644
> --- a/tests/ref/fate/utvideo_rgba_median
> +++ b/tests/ref/fate/utvideo_rgba_median
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,  1228800, 0xf1bc9432
>  0,          1,          1,        1,  1228800, 0x8480d1e5
>  0,          2,          2,        1,  1228800, 0xb01d5fb2
> diff --git a/tests/ref/fate/utvideo_rgba_single_symbol b/tests/ref/fate/utvideo_rgba_single_symbol
> index c0e0d98..553c835 100644
> --- a/tests/ref/fate/utvideo_rgba_single_symbol
> +++ b/tests/ref/fate/utvideo_rgba_single_symbol
> @@ -1,2 +1,6 @@
>  #tb 0: 1/24
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1024x768
> +#sar 0: 0/1
>  0,          0,          0,        1,  3145728, 0xac95c593
> diff --git a/tests/ref/fate/utvideo_yuv420_left b/tests/ref/fate/utvideo_yuv420_left
> index 026f8fb..3d12d7e 100644
> --- a/tests/ref/fate/utvideo_yuv420_left
> +++ b/tests/ref/fate/utvideo_yuv420_left
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   460800, 0xece98fc8
>  0,          1,          1,        1,   460800, 0x9baf786b
>  0,          2,          2,        1,   460800, 0x8e8e0510
> diff --git a/tests/ref/fate/utvideo_yuv420_median b/tests/ref/fate/utvideo_yuv420_median
> index 5662d8c..ccca7f8 100644
> --- a/tests/ref/fate/utvideo_yuv420_median
> +++ b/tests/ref/fate/utvideo_yuv420_median
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   460800, 0x6a817987
>  0,          1,          1,        1,   460800, 0x2f713ec2
>  0,          2,          2,        1,   460800, 0x003b560e
> diff --git a/tests/ref/fate/utvideo_yuv422_left b/tests/ref/fate/utvideo_yuv422_left
> index 438b32a..4e66cfc 100644
> --- a/tests/ref/fate/utvideo_yuv422_left
> +++ b/tests/ref/fate/utvideo_yuv422_left
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   614400, 0x9a6b8802
>  0,          1,          1,        1,   614400, 0xaa8687e2
>  0,          2,          2,        1,   614400, 0x2fe5bd40
> diff --git a/tests/ref/fate/utvideo_yuv422_median b/tests/ref/fate/utvideo_yuv422_median
> index 438b32a..4e66cfc 100644
> --- a/tests/ref/fate/utvideo_yuv422_median
> +++ b/tests/ref/fate/utvideo_yuv422_median
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  0,          0,          0,        1,   614400, 0x9a6b8802
>  0,          1,          1,        1,   614400, 0xaa8687e2
>  0,          2,          2,        1,   614400, 0x2fe5bd40
> diff --git a/tests/ref/fate/utvideoenc_rgb_left b/tests/ref/fate/utvideoenc_rgb_left
> index f6adabe..1b061e3 100644
> --- a/tests/ref/fate/utvideoenc_rgb_left
> +++ b/tests/ref/fate/utvideoenc_rgb_left
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: utvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   182328, cd084b244939d7e0008d8e5ab3429dc1
>  0,          1,          1,        1,   182336, c9c40672750f372134185901147fb776
> diff --git a/tests/ref/fate/utvideoenc_rgb_median b/tests/ref/fate/utvideoenc_rgb_median
> index 3d4c22b..ec42ea9 100644
> --- a/tests/ref/fate/utvideoenc_rgb_median
> +++ b/tests/ref/fate/utvideoenc_rgb_median
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: utvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   182160, abcf4f477f74b696faca2fcff1f62aa9
>  0,          1,          1,        1,   182104, 7cbcf339fa40c24522067295b39d637f
> diff --git a/tests/ref/fate/utvideoenc_rgb_none b/tests/ref/fate/utvideoenc_rgb_none
> index 839766b..5187281 100644
> --- a/tests/ref/fate/utvideoenc_rgb_none
> +++ b/tests/ref/fate/utvideoenc_rgb_none
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: utvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   301024, 44de62472f485410819707c44b53f276
>  0,          1,          1,        1,   301036, ff3c28c23b15834a84c57b304610924f
> diff --git a/tests/ref/fate/utvideoenc_rgba_left b/tests/ref/fate/utvideoenc_rgba_left
> index 83e3cb4..cb77e1b 100644
> --- a/tests/ref/fate/utvideoenc_rgba_left
> +++ b/tests/ref/fate/utvideoenc_rgba_left
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: utvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   195260, a8fdb226460f210542e7aca6c12b0874
>  0,          1,          1,        1,   195268, 45f098764ccba85dc641b7e401461c0a
> diff --git a/tests/ref/fate/utvideoenc_rgba_median b/tests/ref/fate/utvideoenc_rgba_median
> index 1588b6d..94cf1cd 100644
> --- a/tests/ref/fate/utvideoenc_rgba_median
> +++ b/tests/ref/fate/utvideoenc_rgba_median
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: utvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   195092, d32d5a3dc88b9aef0826b565ee5dfbc6
>  0,          1,          1,        1,   195036, ea13e3522d1f3aeddd47117c91eccc55
> diff --git a/tests/ref/fate/utvideoenc_rgba_none b/tests/ref/fate/utvideoenc_rgba_none
> index b8e0b41..7ac9b29 100644
> --- a/tests/ref/fate/utvideoenc_rgba_none
> +++ b/tests/ref/fate/utvideoenc_rgba_none
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: utvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   301284, 55e84c6e1f41e48f47dcefb63e3c1efd
>  0,          1,          1,        1,   301296, 12dab23dfd2c2d5b48bed2292b876688
> diff --git a/tests/ref/fate/utvideoenc_yuv420_left b/tests/ref/fate/utvideoenc_yuv420_left
> index ae79eff..7ce21fe 100644
> --- a/tests/ref/fate/utvideoenc_yuv420_left
> +++ b/tests/ref/fate/utvideoenc_yuv420_left
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: utvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    59796, dedd9623ead257b98e079c6d0479e5a9
>  0,          1,          1,        1,    60012, 73ae403590ffc5962ff86b8dcb44ca50
> diff --git a/tests/ref/fate/utvideoenc_yuv420_median b/tests/ref/fate/utvideoenc_yuv420_median
> index 21e15b5..72d2854 100644
> --- a/tests/ref/fate/utvideoenc_yuv420_median
> +++ b/tests/ref/fate/utvideoenc_yuv420_median
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: utvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    62876, 5e2a5276e10b86511fb8101733bc4795
>  0,          1,          1,        1,    62832, fb1e0a7b2bdbcbada9892e3db7be7821
> diff --git a/tests/ref/fate/utvideoenc_yuv420_none b/tests/ref/fate/utvideoenc_yuv420_none
> index 7f9b58d..95bb19f 100644
> --- a/tests/ref/fate/utvideoenc_yuv420_none
> +++ b/tests/ref/fate/utvideoenc_yuv420_none
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: utvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   144508, 808a5bf7f8647095ed629c18bcd78c8e
>  0,          1,          1,        1,   144496, 88d91b5aebecb8e3553dc5d25c11f663
> diff --git a/tests/ref/fate/utvideoenc_yuv422_left b/tests/ref/fate/utvideoenc_yuv422_left
> index 9da47a4..fefb7f9 100644
> --- a/tests/ref/fate/utvideoenc_yuv422_left
> +++ b/tests/ref/fate/utvideoenc_yuv422_left
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: utvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    91788, 2b29ead6a04f08e49c25cd89fe0c0e46
>  0,          1,          1,        1,    92140, 011a3c92a1a6659b26db7de3c74cda41
> diff --git a/tests/ref/fate/utvideoenc_yuv422_median b/tests/ref/fate/utvideoenc_yuv422_median
> index 8241aae..ee8a7ff 100644
> --- a/tests/ref/fate/utvideoenc_yuv422_median
> +++ b/tests/ref/fate/utvideoenc_yuv422_median
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: utvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    89732, c8dbbbed6c59cff00c7cead39cadd7d4
>  0,          1,          1,        1,    89652, f1c995c2bcb13f9de97fd8c5da2637a1
> diff --git a/tests/ref/fate/utvideoenc_yuv422_none b/tests/ref/fate/utvideoenc_yuv422_none
> index bb97e21..cec18e3 100644
> --- a/tests/ref/fate/utvideoenc_yuv422_none
> +++ b/tests/ref/fate/utvideoenc_yuv422_none
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: utvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   191800, 4a5653458a4206bcbc584d5e6beb61f2
>  0,          1,          1,        1,   191820, 2f77ced17c186b507864ea482016c913
> diff --git a/tests/ref/fate/v210 b/tests/ref/fate/v210
> index 7ad9dcf..1ff76f8 100644
> --- a/tests/ref/fate/v210
> +++ b/tests/ref/fate/v210
> @@ -1,2 +1,6 @@
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  3686400, 0x8d5c3847
> diff --git a/tests/ref/fate/v410dec b/tests/ref/fate/v410dec
> index 98b2816..ed78e39 100644
> --- a/tests/ref/fate/v410dec
> +++ b/tests/ref/fate/v410dec
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 256x256
> +#sar 0: 0/1
>  0,          0,          0,        1,   393216, 0xfe11a6b0
> diff --git a/tests/ref/fate/vb b/tests/ref/fate/vb
> index 336d426..d5fdb04 100644
> --- a/tests/ref/fate/vb
> +++ b/tests/ref/fate/vb
> @@ -1,4 +1,8 @@
>  #tb 0: 1/12
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   230400, 0x3bd1d731
>  0,          1,          1,        1,   230400, 0x9d0774c3
>  0,          2,          2,        1,   230400, 0xa0faafe2
> diff --git a/tests/ref/fate/vble b/tests/ref/fate/vble
> index 8c4250f..62d9682 100644
> --- a/tests/ref/fate/vble
> +++ b/tests/ref/fate/vble
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  1382400, 0x5e1bc307
>  0,          1,          1,        1,  1382400, 0x198795f7
>  0,          2,          2,        1,  1382400, 0xa9102ac2
> diff --git a/tests/ref/fate/vc1-ism b/tests/ref/fate/vc1-ism
> index 7d3b0ab..1bd6c64 100644
> --- a/tests/ref/fate/vc1-ism
> +++ b/tests/ref/fate/vc1-ism
> @@ -1,4 +1,8 @@
>  #tb 0: 1/24
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 240x104
> +#sar 0: 156/156
>  0,          0,          0,        1,    37440, 0xd1bc5235
>  0,          2,          2,        1,    37440, 0x158e6167
>  0,          3,          3,        1,    37440, 0x0faa4481
> diff --git a/tests/ref/fate/vc1_ilaced_twomv b/tests/ref/fate/vc1_ilaced_twomv
> index 1b4d55f..fa56b29 100644
> --- a/tests/ref/fate/vc1_ilaced_twomv
> +++ b/tests/ref/fate/vc1_ilaced_twomv
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 1/1
>  0,          0,          0,        1,  3110400, 0x764f8856
>  0,          2,          2,        1,  3110400, 0x3b615b79
>  0,          3,          3,        1,  3110400, 0x4fbb6f84
> diff --git a/tests/ref/fate/vc1_sa00040 b/tests/ref/fate/vc1_sa00040
> index 79bff27..554b838 100644
> --- a/tests/ref/fate/vc1_sa00040
> +++ b/tests/ref/fate/vc1_sa00040
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 1/1
>  0,          0,          0,        1,    38016, 0xa6f15db5
>  0,          1,          1,        1,    38016, 0xa6f15db5
>  0,          2,          2,        1,    38016, 0xa6f15db5
> diff --git a/tests/ref/fate/vc1_sa00050 b/tests/ref/fate/vc1_sa00050
> index 89a3840..d30b1bf 100644
> --- a/tests/ref/fate/vc1_sa00050
> +++ b/tests/ref/fate/vc1_sa00050
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 1/1
>  0,          0,          0,        1,   115200, 0xb8830eef
>  0,          1,          1,        1,   115200, 0xb8830eef
>  0,          2,          2,        1,   115200, 0xb8830eef
> diff --git a/tests/ref/fate/vc1_sa10091 b/tests/ref/fate/vc1_sa10091
> index 33326d6..ebfe271 100644
> --- a/tests/ref/fate/vc1_sa10091
> +++ b/tests/ref/fate/vc1_sa10091
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 1/1
>  0,          0,          0,        1,   518400, 0xae20b4fa
>  0,          2,          2,        1,   518400, 0x2b4ccdf9
>  0,          3,          3,        1,   518400, 0x2b4ccdf9
> diff --git a/tests/ref/fate/vc1_sa10143 b/tests/ref/fate/vc1_sa10143
> index c0ecc3b..d690481 100644
> --- a/tests/ref/fate/vc1_sa10143
> +++ b/tests/ref/fate/vc1_sa10143
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x480
> +#sar 0: 1/1
>  0,          0,          0,        1,   518400, 0x89407f55
>  0,          2,          2,        1,   518400, 0xaa896afd
>  0,          3,          3,        1,   518400, 0x0e69ff59
> diff --git a/tests/ref/fate/vc1_sa20021 b/tests/ref/fate/vc1_sa20021
> index 22989a0..450504f 100644
> --- a/tests/ref/fate/vc1_sa20021
> +++ b/tests/ref/fate/vc1_sa20021
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 704x480
> +#sar 0: 1/1
>  0,          0,          0,        1,   506880, 0x884bc093
>  0,          2,          2,        1,   506880, 0x4b09548f
>  0,          3,          3,        1,   506880, 0x195cbee1
> diff --git a/tests/ref/fate/vcr1 b/tests/ref/fate/vcr1
> index da21df4..983c52e 100644
> --- a/tests/ref/fate/vcr1
> +++ b/tests/ref/fate/vcr1
> @@ -1,4 +1,8 @@
>  #tb 0: 66099/1000000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    28512, 0x7165286d
>  0,          1,          1,        1,    28512, 0x2b842acc
>  0,          2,          2,        1,    28512, 0x6d1b8e85
> diff --git a/tests/ref/fate/vcr2 b/tests/ref/fate/vcr2
> index f7e1540..e25aa14 100644
> --- a/tests/ref/fate/vcr2
> +++ b/tests/ref/fate/vcr2
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/15000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  0,          0,          0,        1,    38016, 0x50e93e0d
>  0,          1,          1,        1,    38016, 0x6ac8627d
>  0,          2,          2,        1,    38016, 0x6f38661e
> diff --git a/tests/ref/fate/videoxl b/tests/ref/fate/videoxl
> index 4d2db37..c5b4c81 100644
> --- a/tests/ref/fate/videoxl
> +++ b/tests/ref/fate/videoxl
> @@ -1,4 +1,8 @@
>  #tb 0: 71/500
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 188x128
> +#sar 0: 0/1
>  0,          0,          0,        1,    36096, 0xab1c53c1
>  0,          1,          1,        1,    36096, 0x8b598ff3
>  0,          2,          2,        1,    36096, 0xe9a5f3eb
> diff --git a/tests/ref/fate/vmnc-16bit b/tests/ref/fate/vmnc-16bit
> index 064b7fa..69cf095 100644
> --- a/tests/ref/fate/vmnc-16bit
> +++ b/tests/ref/fate/vmnc-16bit
> @@ -1,4 +1,8 @@
>  #tb 0: 1/5
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x400
> +#sar 0: 0/1
>  0,          0,          0,        1,   864000, 0xd6929ea7
>  0,          1,          1,        1,   864000, 0x9d5283fa
>  0,          2,          2,        1,   864000, 0xcec52d42
> diff --git a/tests/ref/fate/vmnc-32bit b/tests/ref/fate/vmnc-32bit
> index d55d88f..71117b9 100644
> --- a/tests/ref/fate/vmnc-32bit
> +++ b/tests/ref/fate/vmnc-32bit
> @@ -1,4 +1,8 @@
>  #tb 0: 1/5
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1268x961
> +#sar 0: 0/1
>  0,          0,          0,        1,  3655644, 0x87973530
>  0,          1,          1,        1,  3655644, 0x87973530
>  0,          2,          2,        1,  3655644, 0x3c3167fd
> diff --git a/tests/ref/fate/vp31 b/tests/ref/fate/vp31
> index 48221c1..e41d372 100644
> --- a/tests/ref/fate/vp31
> +++ b/tests/ref/fate/vp31
> @@ -1,4 +1,8 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x272
> +#sar 0: 0/1
>  0,          0,          0,        1,   261120, 0xc50dec2b
>  0,          1,          1,        1,   261120, 0xaa8d4441
>  0,          2,          2,        1,   261120, 0x932b0d44
> diff --git a/tests/ref/fate/vp5 b/tests/ref/fate/vp5
> index 0e601ba..2116fb9 100644
> --- a/tests/ref/fate/vp5
> +++ b/tests/ref/fate/vp5
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/24000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 512x304
> +#sar 0: 0/1
>  0,          0,          0,        1,   233472, 0x27488413
>  0,          1,          1,        1,   233472, 0x4af384b5
>  0,          2,          2,        1,   233472, 0x948d845d
> diff --git a/tests/ref/fate/vp60 b/tests/ref/fate/vp60
> index c1da72b..4becf2a 100644
> --- a/tests/ref/fate/vp60
> +++ b/tests/ref/fate/vp60
> @@ -1,4 +1,8 @@
>  #tb 0: 32767/982027
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 192x192
> +#sar 0: 0/1
>  0,          0,          0,        1,    55296, 0x6a3202a3
>  0,          1,          1,        1,    55296, 0x2af202eb
>  0,          2,          2,        1,    55296, 0xa1a40388
> diff --git a/tests/ref/fate/vp61 b/tests/ref/fate/vp61
> index be1fe53..2d3beea 100644
> --- a/tests/ref/fate/vp61
> +++ b/tests/ref/fate/vp61
> @@ -1,4 +1,8 @@
>  #tb 0: 32767/982027
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 112x112
> +#sar 0: 0/1
>  0,          0,          0,        1,    18816, 0xc3fe9fc7
>  0,          1,          1,        1,    18816, 0x6ddf972f
>  0,          2,          2,        1,    18816, 0x72808b6e
> diff --git a/tests/ref/fate/vp6a b/tests/ref/fate/vp6a
> index 1f2ddd9..b4f3363 100644
> --- a/tests/ref/fate/vp6a
> +++ b/tests/ref/fate/vp6a
> @@ -1,4 +1,8 @@
>  #tb 0: 1/4
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 300x180
> +#sar 0: 0/1
>  0,          0,          0,        1,   135000, 0x9dceed6d
>  0,          1,          1,        1,   135000, 0x47e5778d
>  0,          2,          2,        1,   135000, 0x5de36599
> diff --git a/tests/ref/fate/vp6a-skip_alpha b/tests/ref/fate/vp6a-skip_alpha
> index 91a099c..e2c435f 100644
> --- a/tests/ref/fate/vp6a-skip_alpha
> +++ b/tests/ref/fate/vp6a-skip_alpha
> @@ -1,4 +1,8 @@
>  #tb 0: 1/4
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 300x180
> +#sar 0: 0/1
>  0,          0,          0,        1,    81000, 0xcb92962d
>  0,          1,          1,        1,    81000, 0xae381904
>  0,          2,          2,        1,    81000, 0x1fcc0c75
> diff --git a/tests/ref/fate/vp6f b/tests/ref/fate/vp6f
> index edb555d..65e1131 100644
> --- a/tests/ref/fate/vp6f
> +++ b/tests/ref/fate/vp6f
> @@ -1,4 +1,8 @@
>  #tb 0: 1/10
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 112x80
> +#sar 0: 0/1
>  0,          0,          0,        1,    13440, 0x7cb0a22f
>  0,          1,          1,        1,    13440, 0xdfcea6ba
>  0,          2,          2,        1,    13440, 0x59b2a5da
> diff --git a/tests/ref/fate/vp7 b/tests/ref/fate/vp7
> index b014010..3af21f2 100644
> --- a/tests/ref/fate/vp7
> +++ b/tests/ref/fate/vp7
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/12000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x176
> +#sar 0: 0/1
>  0,          0,          0,        1,    84480, 0xa7776101
>  0,          1,          1,        1,    84480, 0xeb1560ca
>  0,          2,          2,        1,    84480, 0x7a4e6123
> diff --git a/tests/ref/fate/vp8-2451 b/tests/ref/fate/vp8-2451
> index 70258e6..f681695 100644
> --- a/tests/ref/fate/vp8-2451
> +++ b/tests/ref/fate/vp8-2451
> @@ -1,4 +1,8 @@
>  #tb 0: 1001/24000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x360
> +#sar 0: 1/1
>  0,          0,          0,        1,   345600, 0xa1e65077
>  0,          1,          1,        1,   345600, 0xa1e65077
>  0,          2,          2,        1,   345600, 0xa1e65077
> diff --git a/tests/ref/fate/vp8-alpha b/tests/ref/fate/vp8-alpha
> index 5b10725..4922d52 100644
> --- a/tests/ref/fate/vp8-alpha
> +++ b/tests/ref/fate/vp8-alpha
> @@ -1,4 +1,8 @@
>  #tb 0: 1/1000
> +#media_type 0: video
> +#codec_id 0: vp8
> +#dimensions 0: 320x213
> +#sar 0: 1/1
>  0,          0,          0,       33,     2108, 0x59b92a34, S=2,     1900, 0x8fb3adc5,        8, 0x00000000
>  0,         32,         32,       33,      142, 0x2f2a3fed, F=0x0, S=1,      160, 0xa13346af
>  0,         65,         65,       33,      157, 0x17804767, F=0x0, S=1,      209, 0x64115f15
> diff --git a/tests/ref/fate/vp8-sign-bias b/tests/ref/fate/vp8-sign-bias
> index b503de8..067449c 100644
> --- a/tests/ref/fate/vp8-sign-bias
> +++ b/tests/ref/fate/vp8-sign-bias
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/24
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 854x480
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   614880, 12ce23b288485be3ddbc1db28c21517f
>  0,          2,          2,        1,   614880, ce352e1079535ea058c0e9ad50f7cdb8
> diff --git a/tests/ref/fate/vp8-size-change b/tests/ref/fate/vp8-size-change
> index f581c99..8a2b58c 100644
> --- a/tests/ref/fate/vp8-size-change
> +++ b/tests/ref/fate/vp8-size-change
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,  3110400, 7dde8cd136ab4b04a95d9856b941697e
>  0,          1,          1,        1,  3110400, aa885f78cb6374b5bfcc66a4fc57026f
> diff --git a/tests/ref/fate/vp8-test-vector-001 b/tests/ref/fate/vp8-test-vector-001
> index ef38aa8..f30532b 100644
> --- a/tests/ref/fate/vp8-test-vector-001
> +++ b/tests/ref/fate/vp8-test-vector-001
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    38016, 83c78b5db579710f61f9354d5c51e8c8
>  0,          1,          1,        1,    38016, 8d089d226f52d6cdaffdb3fcc080b75b
> diff --git a/tests/ref/fate/vp8-test-vector-002 b/tests/ref/fate/vp8-test-vector-002
> index 55149b0..0f203fe 100644
> --- a/tests/ref/fate/vp8-test-vector-002
> +++ b/tests/ref/fate/vp8-test-vector-002
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/24
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    38016, 872e9922f37f0e92c767d33e0a15b8e0
>  0,          1,          1,        1,    38016, ea5ad6c6ee4355018fc0ba83b5172836
> diff --git a/tests/ref/fate/vp8-test-vector-003 b/tests/ref/fate/vp8-test-vector-003
> index ffe3896..30352ba 100644
> --- a/tests/ref/fate/vp8-test-vector-003
> +++ b/tests/ref/fate/vp8-test-vector-003
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/24
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    38016, 96e6ce168b5ef377053e86ab5484e7f9
>  0,          1,          1,        1,    38016, 10fd750292d8522ab7ee577043604789
> diff --git a/tests/ref/fate/vp8-test-vector-004 b/tests/ref/fate/vp8-test-vector-004
> index f7f5313..a329514 100644
> --- a/tests/ref/fate/vp8-test-vector-004
> +++ b/tests/ref/fate/vp8-test-vector-004
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    38016, 83c78b5db579710f61f9354d5c51e8c8
>  0,          1,          1,        1,    38016, d173eb8a8211a05672b43206609c9034
> diff --git a/tests/ref/fate/vp8-test-vector-005 b/tests/ref/fate/vp8-test-vector-005
> index 3368c70..c6028f9 100644
> --- a/tests/ref/fate/vp8-test-vector-005
> +++ b/tests/ref/fate/vp8-test-vector-005
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/24
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    38016, e7a4be434df4bb524ba56a03cba901f4
>  0,          1,          1,        1,    38016, d903ade6d49e51485627c044fbb2190c
> diff --git a/tests/ref/fate/vp8-test-vector-006 b/tests/ref/fate/vp8-test-vector-006
> index 28c249c..adcc096 100644
> --- a/tests/ref/fate/vp8-test-vector-006
> +++ b/tests/ref/fate/vp8-test-vector-006
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/24
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 175x143
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    37697, 9ca5df27b0158aca2a38dff946f58c41
>  0,          1,          1,        1,    37697, 627129a99538ec1ac51be910ca92ebc4
> diff --git a/tests/ref/fate/vp8-test-vector-007 b/tests/ref/fate/vp8-test-vector-007
> index a0cb441..99d3891 100644
> --- a/tests/ref/fate/vp8-test-vector-007
> +++ b/tests/ref/fate/vp8-test-vector-007
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    38016, 98bd0af6928c144888a9c320270e9f0e
>  0,          1,          1,        1,    38016, 9ff7cff703d58481acd233451388377c
> diff --git a/tests/ref/fate/vp8-test-vector-008 b/tests/ref/fate/vp8-test-vector-008
> index 0503c4e..8634748 100644
> --- a/tests/ref/fate/vp8-test-vector-008
> +++ b/tests/ref/fate/vp8-test-vector-008
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/23
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1432x888
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,  1907424, 7146d3a72b6cb8e43ee5280ef8d661fe
>  0,          1,          1,        1,  1907424, 5a537e9710158efb5ad2683a1d3b4c72
> diff --git a/tests/ref/fate/vp8-test-vector-009 b/tests/ref/fate/vp8-test-vector-009
> index f41f014..562d15b 100644
> --- a/tests/ref/fate/vp8-test-vector-009
> +++ b/tests/ref/fate/vp8-test-vector-009
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/24
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    38016, b3a3121c796a60c88988fef5240a07fe
>  0,          1,          1,        1,    38016, f25147764829cf837e00b8fd6383e2c4
> diff --git a/tests/ref/fate/vp8-test-vector-010 b/tests/ref/fate/vp8-test-vector-010
> index 2feeb63..d491b70 100644
> --- a/tests/ref/fate/vp8-test-vector-010
> +++ b/tests/ref/fate/vp8-test-vector-010
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   115200, 3441ec1a9b9d325c9aeda44e3b68377d
>  0,          1,          1,        1,   115200, bff86a84fd673394f45c09d19a1ee0ac
> diff --git a/tests/ref/fate/vp8-test-vector-011 b/tests/ref/fate/vp8-test-vector-011
> index adf7235..74d495e 100644
> --- a/tests/ref/fate/vp8-test-vector-011
> +++ b/tests/ref/fate/vp8-test-vector-011
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    38016, 83c78b5db579710f61f9354d5c51e8c8
>  0,          1,          1,        1,    38016, 9b755a63c7c5352660a265f6e24991e1
> diff --git a/tests/ref/fate/vp8-test-vector-012 b/tests/ref/fate/vp8-test-vector-012
> index 3de64b6..017d46b 100644
> --- a/tests/ref/fate/vp8-test-vector-012
> +++ b/tests/ref/fate/vp8-test-vector-012
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    38016, cc3069a59b6f4319761af2b39923a6e5
>  0,          1,          1,        1,    38016, c0bc935941d994c6af6a864f02a90a62
> diff --git a/tests/ref/fate/vp8-test-vector-013 b/tests/ref/fate/vp8-test-vector-013
> index e31e6e6..c19a248 100644
> --- a/tests/ref/fate/vp8-test-vector-013
> +++ b/tests/ref/fate/vp8-test-vector-013
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    38016, ad137b9eae93daed28fe31fd5165b4d0
>  0,          1,          1,        1,    38016, 7cd527f647680c0eb305050d27fb8092
> diff --git a/tests/ref/fate/vp8-test-vector-014 b/tests/ref/fate/vp8-test-vector-014
> index 689e24b..0a74533 100644
> --- a/tests/ref/fate/vp8-test-vector-014
> +++ b/tests/ref/fate/vp8-test-vector-014
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 175x143
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    37697, 7a0356dc950e79744d79c98e391ebee9
>  0,          1,          1,        1,    37697, 96e221e75c290dd847b8e55865073366
> diff --git a/tests/ref/fate/vp8-test-vector-015 b/tests/ref/fate/vp8-test-vector-015
> index 766c931..6c1e44d 100644
> --- a/tests/ref/fate/vp8-test-vector-015
> +++ b/tests/ref/fate/vp8-test-vector-015
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x240
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   115200, 6b4c7cc0c6a7218362e43cffef6618c9
>  0,          1,          1,        1,   115200, e132a7b1bb4fb15b1019092aedc0e599
> diff --git a/tests/ref/fate/vp8-test-vector-016 b/tests/ref/fate/vp8-test-vector-016
> index 4da7ff3..2baedc9 100644
> --- a/tests/ref/fate/vp8-test-vector-016
> +++ b/tests/ref/fate/vp8-test-vector-016
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    38016, 905a823da31f71f9c25ebb8dfc9ddd3c
>  0,          1,          1,        1,    38016, 9a1b97859b2f774954dbf96f45a22a0a
> diff --git a/tests/ref/fate/vp8-test-vector-017 b/tests/ref/fate/vp8-test-vector-017
> index 0d3fbea..e72356f 100644
> --- a/tests/ref/fate/vp8-test-vector-017
> +++ b/tests/ref/fate/vp8-test-vector-017
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 176x144
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    38016, 905a823da31f71f9c25ebb8dfc9ddd3c
>  0,          1,          1,        1,    38016, f0f411dd067bff05d5d9c64e3f52a4b1
> diff --git a/tests/ref/fate/vp9-00-quantizer-00 b/tests/ref/fate/vp9-00-quantizer-00
> index e2afb9c..b1e9362 100644
> --- a/tests/ref/fate/vp9-00-quantizer-00
> +++ b/tests/ref/fate/vp9-00-quantizer-00
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, c3fbb7abbdb5bd4ed4a7e34768c17df1
>  0,          1,          1,        1,   152064, 08203c2595bdb2d58ead6f921345d699
> diff --git a/tests/ref/fate/vp9-00-quantizer-01 b/tests/ref/fate/vp9-00-quantizer-01
> index 4d9b081..1e42470 100644
> --- a/tests/ref/fate/vp9-00-quantizer-01
> +++ b/tests/ref/fate/vp9-00-quantizer-01
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, f041b870cf9236d5f22e2b08a77d5958
>  0,          1,          1,        1,   152064, cbdb7526986ae15592891488c9afc84c
> diff --git a/tests/ref/fate/vp9-00-quantizer-02 b/tests/ref/fate/vp9-00-quantizer-02
> index 09e6299..a537fa1 100644
> --- a/tests/ref/fate/vp9-00-quantizer-02
> +++ b/tests/ref/fate/vp9-00-quantizer-02
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 98048cfdb4af5059f4085c5acc94ef8f
>  0,          1,          1,        1,   152064, 8160183e1eed1d0af4427be216b8b9f7
> diff --git a/tests/ref/fate/vp9-00-quantizer-03 b/tests/ref/fate/vp9-00-quantizer-03
> index 0c22157..760b2fb 100644
> --- a/tests/ref/fate/vp9-00-quantizer-03
> +++ b/tests/ref/fate/vp9-00-quantizer-03
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 15c548208f5eda243a151a42f4d64855
>  0,          1,          1,        1,   152064, e96d463dc8e9b27b1c2ec40f77eee6ef
> diff --git a/tests/ref/fate/vp9-00-quantizer-04 b/tests/ref/fate/vp9-00-quantizer-04
> index 730a012..6633a6a 100644
> --- a/tests/ref/fate/vp9-00-quantizer-04
> +++ b/tests/ref/fate/vp9-00-quantizer-04
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 928c64a0747ac57ab50c1520d694fea7
>  0,          1,          1,        1,   152064, a6f6daa293231e95ef30ed168f582c84
> diff --git a/tests/ref/fate/vp9-00-quantizer-05 b/tests/ref/fate/vp9-00-quantizer-05
> index 0f2dd7a..3c789f8 100644
> --- a/tests/ref/fate/vp9-00-quantizer-05
> +++ b/tests/ref/fate/vp9-00-quantizer-05
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 082460718b7d7046c8fb23184b7f71ca
>  0,          1,          1,        1,   152064, 4a41aad51c40a92df72333e13f47d3fe
> diff --git a/tests/ref/fate/vp9-00-quantizer-06 b/tests/ref/fate/vp9-00-quantizer-06
> index c6c1282..32d78c5 100644
> --- a/tests/ref/fate/vp9-00-quantizer-06
> +++ b/tests/ref/fate/vp9-00-quantizer-06
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, cfca1bed96ff62a69b2d841fda01c6b9
>  0,          1,          1,        1,   152064, 9b4d61f1b998745c108f8eb67925e03d
> diff --git a/tests/ref/fate/vp9-00-quantizer-07 b/tests/ref/fate/vp9-00-quantizer-07
> index cdc6ec5..1222b0f 100644
> --- a/tests/ref/fate/vp9-00-quantizer-07
> +++ b/tests/ref/fate/vp9-00-quantizer-07
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 6f5122064bead9d9882bec2698a6ed9c
>  0,          1,          1,        1,   152064, 50dae67d2f57a76eece210dee8b6df9e
> diff --git a/tests/ref/fate/vp9-00-quantizer-08 b/tests/ref/fate/vp9-00-quantizer-08
> index f405cef..7f01a10 100644
> --- a/tests/ref/fate/vp9-00-quantizer-08
> +++ b/tests/ref/fate/vp9-00-quantizer-08
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, eb3d6985fcda5d93dd62d53354e8a093
>  0,          1,          1,        1,   152064, 5b1f5b7780b4cafe1f75e56a0b526643
> diff --git a/tests/ref/fate/vp9-00-quantizer-09 b/tests/ref/fate/vp9-00-quantizer-09
> index bc5e86a..6c9b120 100644
> --- a/tests/ref/fate/vp9-00-quantizer-09
> +++ b/tests/ref/fate/vp9-00-quantizer-09
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, d7ccaf28c59875fe91983def5490d2b1
>  0,          1,          1,        1,   152064, bd98fe9492054826748de840b4495309
> diff --git a/tests/ref/fate/vp9-00-quantizer-10 b/tests/ref/fate/vp9-00-quantizer-10
> index 93e46a9..cfff0be 100644
> --- a/tests/ref/fate/vp9-00-quantizer-10
> +++ b/tests/ref/fate/vp9-00-quantizer-10
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 20dda6231f9801c9c237c6d09d9939b6
>  0,          1,          1,        1,   152064, 23c91e93807fb9a4ed5bd5bdd449d99f
> diff --git a/tests/ref/fate/vp9-00-quantizer-11 b/tests/ref/fate/vp9-00-quantizer-11
> index 0924f54..1fab568 100644
> --- a/tests/ref/fate/vp9-00-quantizer-11
> +++ b/tests/ref/fate/vp9-00-quantizer-11
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 960833315ebcdee97f46c4d98d0f3fef
>  0,          1,          1,        1,   152064, eec40507d17b64b7895a61cb87b2096a
> diff --git a/tests/ref/fate/vp9-00-quantizer-12 b/tests/ref/fate/vp9-00-quantizer-12
> index 9213e9d..1cc447c 100644
> --- a/tests/ref/fate/vp9-00-quantizer-12
> +++ b/tests/ref/fate/vp9-00-quantizer-12
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 6533224d3b6ba1ec0dd973bbe56c6349
>  0,          1,          1,        1,   152064, 12ceadc6d28327a24a75f8c40b6084d1
> diff --git a/tests/ref/fate/vp9-00-quantizer-13 b/tests/ref/fate/vp9-00-quantizer-13
> index 80d1a6c..7d4bfb3 100644
> --- a/tests/ref/fate/vp9-00-quantizer-13
> +++ b/tests/ref/fate/vp9-00-quantizer-13
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 7268de6756014f79a56dcf010c52a97f
>  0,          1,          1,        1,   152064, 9e39e9b0e2295b8460dfa05f44762771
> diff --git a/tests/ref/fate/vp9-00-quantizer-14 b/tests/ref/fate/vp9-00-quantizer-14
> index e7ab21d..ff3c09d 100644
> --- a/tests/ref/fate/vp9-00-quantizer-14
> +++ b/tests/ref/fate/vp9-00-quantizer-14
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 57e9e333c641fa952f7485b788df225a
>  0,          1,          1,        1,   152064, 551f0cea83dcdf4540c3983736757874
> diff --git a/tests/ref/fate/vp9-00-quantizer-15 b/tests/ref/fate/vp9-00-quantizer-15
> index 842ab6e..815e9cd 100644
> --- a/tests/ref/fate/vp9-00-quantizer-15
> +++ b/tests/ref/fate/vp9-00-quantizer-15
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 17a0a2842856b9e89aede237648d5dda
>  0,          1,          1,        1,   152064, c9fcade888a38621bebe3d4b41664245
> diff --git a/tests/ref/fate/vp9-00-quantizer-16 b/tests/ref/fate/vp9-00-quantizer-16
> index 7478558..1b8cb29 100644
> --- a/tests/ref/fate/vp9-00-quantizer-16
> +++ b/tests/ref/fate/vp9-00-quantizer-16
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 6cc2089e9a3d352fe10b59ccd935c677
>  0,          1,          1,        1,   152064, d165bf7b9cb901e121a65038758d8613
> diff --git a/tests/ref/fate/vp9-00-quantizer-17 b/tests/ref/fate/vp9-00-quantizer-17
> index 3a5b1c1..e7a1533 100644
> --- a/tests/ref/fate/vp9-00-quantizer-17
> +++ b/tests/ref/fate/vp9-00-quantizer-17
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, bc80511c83162c09661f155cd29f6dd8
>  0,          1,          1,        1,   152064, a62f1cbdb3f86d2fb4c880cfd917def5
> diff --git a/tests/ref/fate/vp9-00-quantizer-18 b/tests/ref/fate/vp9-00-quantizer-18
> index baf3bc3..be5035d 100644
> --- a/tests/ref/fate/vp9-00-quantizer-18
> +++ b/tests/ref/fate/vp9-00-quantizer-18
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, b2d350f6faa41cb50c2e8a9907d0f4a5
>  0,          1,          1,        1,   152064, 39b4380d16bc8e093dd4dba475175fb3
> diff --git a/tests/ref/fate/vp9-00-quantizer-19 b/tests/ref/fate/vp9-00-quantizer-19
> index 2ba95e1..3d1f421 100644
> --- a/tests/ref/fate/vp9-00-quantizer-19
> +++ b/tests/ref/fate/vp9-00-quantizer-19
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 441e09be3c15fcb240afd74bb7a10a72
>  0,          1,          1,        1,   152064, 32ae5dac876ca5d5ae6ab7c74f4dc25d
> diff --git a/tests/ref/fate/vp9-00-quantizer-20 b/tests/ref/fate/vp9-00-quantizer-20
> index 8119688..17a02e2 100644
> --- a/tests/ref/fate/vp9-00-quantizer-20
> +++ b/tests/ref/fate/vp9-00-quantizer-20
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 7786eb9944dba0553e129133523a98c1
>  0,          1,          1,        1,   152064, 206d888f8453427f10a40aa8bf5f6df0
> diff --git a/tests/ref/fate/vp9-00-quantizer-21 b/tests/ref/fate/vp9-00-quantizer-21
> index 0e94992..67d4797 100644
> --- a/tests/ref/fate/vp9-00-quantizer-21
> +++ b/tests/ref/fate/vp9-00-quantizer-21
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, aab95e195be71feca050a839d7b3154d
>  0,          1,          1,        1,   152064, 02a05d699bbbdc477e34bb0dad9f0391
> diff --git a/tests/ref/fate/vp9-00-quantizer-22 b/tests/ref/fate/vp9-00-quantizer-22
> index 90533aa..70a8837 100644
> --- a/tests/ref/fate/vp9-00-quantizer-22
> +++ b/tests/ref/fate/vp9-00-quantizer-22
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 41f853c3ee2d4611b645cc643d82e287
>  0,          1,          1,        1,   152064, 1c240c653110ff8609ca0f0287a6496d
> diff --git a/tests/ref/fate/vp9-00-quantizer-23 b/tests/ref/fate/vp9-00-quantizer-23
> index d16d198..6f488d8 100644
> --- a/tests/ref/fate/vp9-00-quantizer-23
> +++ b/tests/ref/fate/vp9-00-quantizer-23
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, bc5b07369df50c8f97ce1a377fe513cf
>  0,          1,          1,        1,   152064, ce62ddb4f3e305d0f8587ae8bb44cc79
> diff --git a/tests/ref/fate/vp9-00-quantizer-24 b/tests/ref/fate/vp9-00-quantizer-24
> index eccdfd6..1578bf1 100644
> --- a/tests/ref/fate/vp9-00-quantizer-24
> +++ b/tests/ref/fate/vp9-00-quantizer-24
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 982d54041221c977b6f0e37a9236cc76
>  0,          1,          1,        1,   152064, 57631e7f13f645c834e2944ebfd6d40e
> diff --git a/tests/ref/fate/vp9-00-quantizer-25 b/tests/ref/fate/vp9-00-quantizer-25
> index 70a76b3..16bc8cc 100644
> --- a/tests/ref/fate/vp9-00-quantizer-25
> +++ b/tests/ref/fate/vp9-00-quantizer-25
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, b0fb55f3f2f56b3d27038e83c10123ce
>  0,          1,          1,        1,   152064, 9fcac3becdcc2d30d778a55eca4c2018
> diff --git a/tests/ref/fate/vp9-00-quantizer-26 b/tests/ref/fate/vp9-00-quantizer-26
> index d9308dc..b6773e7 100644
> --- a/tests/ref/fate/vp9-00-quantizer-26
> +++ b/tests/ref/fate/vp9-00-quantizer-26
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 4f645e0f354da77b9e2f2a6753c361da
>  0,          1,          1,        1,   152064, b7542998ec298273ca662bc9b658d10e
> diff --git a/tests/ref/fate/vp9-00-quantizer-27 b/tests/ref/fate/vp9-00-quantizer-27
> index d2efd69..33d9682 100644
> --- a/tests/ref/fate/vp9-00-quantizer-27
> +++ b/tests/ref/fate/vp9-00-quantizer-27
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 6edc96a3747cad43828397045764206e
>  0,          1,          1,        1,   152064, 5fbc65d20fdca1abd69079851ce676d3
> diff --git a/tests/ref/fate/vp9-00-quantizer-28 b/tests/ref/fate/vp9-00-quantizer-28
> index 85919fc..4ae97dc 100644
> --- a/tests/ref/fate/vp9-00-quantizer-28
> +++ b/tests/ref/fate/vp9-00-quantizer-28
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 5db3e910e70da38bb91d01d73acc33dd
>  0,          1,          1,        1,   152064, b920ee7f7e61b7fdf9f44b1f738d0292
> diff --git a/tests/ref/fate/vp9-00-quantizer-29 b/tests/ref/fate/vp9-00-quantizer-29
> index cc6eae7..dd012a0 100644
> --- a/tests/ref/fate/vp9-00-quantizer-29
> +++ b/tests/ref/fate/vp9-00-quantizer-29
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 3cb3e310be5305077efa6216f6f10654
>  0,          1,          1,        1,   152064, 692d3e098af5978fe1a898ebc1a66a7a
> diff --git a/tests/ref/fate/vp9-00-quantizer-30 b/tests/ref/fate/vp9-00-quantizer-30
> index 4f26b58..56dbe93 100644
> --- a/tests/ref/fate/vp9-00-quantizer-30
> +++ b/tests/ref/fate/vp9-00-quantizer-30
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, e3b3cea66ea38c5dfba1aa73bb4c611d
>  0,          1,          1,        1,   152064, 42bb3e54b19c3f4c4f7ee3a6ba012e19
> diff --git a/tests/ref/fate/vp9-00-quantizer-31 b/tests/ref/fate/vp9-00-quantizer-31
> index 4c9bf96..de2f1f5 100644
> --- a/tests/ref/fate/vp9-00-quantizer-31
> +++ b/tests/ref/fate/vp9-00-quantizer-31
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 2523e9ecfd3781eafcd7da192dc105e9
>  0,          1,          1,        1,   152064, 6d5feea012b9a1f51fc643633e728764
> diff --git a/tests/ref/fate/vp9-00-quantizer-32 b/tests/ref/fate/vp9-00-quantizer-32
> index ef49c4e..7656e42 100644
> --- a/tests/ref/fate/vp9-00-quantizer-32
> +++ b/tests/ref/fate/vp9-00-quantizer-32
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 0a0305eba36500ebf6cc6cc0f01f5a3b
>  0,          1,          1,        1,   152064, 2c76bcd6763467f9057a726fbcf50ab1
> diff --git a/tests/ref/fate/vp9-00-quantizer-33 b/tests/ref/fate/vp9-00-quantizer-33
> index 374c44e..6b59ab7 100644
> --- a/tests/ref/fate/vp9-00-quantizer-33
> +++ b/tests/ref/fate/vp9-00-quantizer-33
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, c68433e0e94047c220be9b629334f744
>  0,          1,          1,        1,   152064, fcfa4dff7a39bc9c5e315849ecbb46ea
> diff --git a/tests/ref/fate/vp9-00-quantizer-34 b/tests/ref/fate/vp9-00-quantizer-34
> index aa9c833..f02dd26 100644
> --- a/tests/ref/fate/vp9-00-quantizer-34
> +++ b/tests/ref/fate/vp9-00-quantizer-34
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, ad9dc2f912c137b014a33e2792c88a25
>  0,          1,          1,        1,   152064, 11221ee4ea5c776f43af68756682cd5a
> diff --git a/tests/ref/fate/vp9-00-quantizer-35 b/tests/ref/fate/vp9-00-quantizer-35
> index 820725b..1c4d030 100644
> --- a/tests/ref/fate/vp9-00-quantizer-35
> +++ b/tests/ref/fate/vp9-00-quantizer-35
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 75031f898cccf303a64ab46b1f815389
>  0,          1,          1,        1,   152064, a4fc864e7fbc470dfcab6207e0eea152
> diff --git a/tests/ref/fate/vp9-00-quantizer-36 b/tests/ref/fate/vp9-00-quantizer-36
> index 4a39a13..86eb377 100644
> --- a/tests/ref/fate/vp9-00-quantizer-36
> +++ b/tests/ref/fate/vp9-00-quantizer-36
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, c7824af009fde6cafdd8d39fae6bb6cf
>  0,          1,          1,        1,   152064, 516a82d5fc4dfa3daf713ed2ec36041b
> diff --git a/tests/ref/fate/vp9-00-quantizer-37 b/tests/ref/fate/vp9-00-quantizer-37
> index 96e526f..7621cc0 100644
> --- a/tests/ref/fate/vp9-00-quantizer-37
> +++ b/tests/ref/fate/vp9-00-quantizer-37
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, a2e5c820fd9733e18f9349fb658ca281
>  0,          1,          1,        1,   152064, fb23e0bc64728a492a33d985032f21b8
> diff --git a/tests/ref/fate/vp9-00-quantizer-38 b/tests/ref/fate/vp9-00-quantizer-38
> index 9f61d33..0c66791 100644
> --- a/tests/ref/fate/vp9-00-quantizer-38
> +++ b/tests/ref/fate/vp9-00-quantizer-38
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 8347bfb891317e89ef66781d6c28e24f
>  0,          1,          1,        1,   152064, a5722f824d32deac042513a1a7dcdcd0
> diff --git a/tests/ref/fate/vp9-00-quantizer-39 b/tests/ref/fate/vp9-00-quantizer-39
> index 396a1a3..3a9366f 100644
> --- a/tests/ref/fate/vp9-00-quantizer-39
> +++ b/tests/ref/fate/vp9-00-quantizer-39
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 018968f97fac3bdff146cf22c1da5ef0
>  0,          1,          1,        1,   152064, ca8b09b01e5132183395e238f1c7901e
> diff --git a/tests/ref/fate/vp9-00-quantizer-40 b/tests/ref/fate/vp9-00-quantizer-40
> index dc77394..5470c36 100644
> --- a/tests/ref/fate/vp9-00-quantizer-40
> +++ b/tests/ref/fate/vp9-00-quantizer-40
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 792660f6589ad5340be4bd0554435866
>  0,          1,          1,        1,   152064, 68c84c8a15d679e0a73678b93215c62c
> diff --git a/tests/ref/fate/vp9-00-quantizer-41 b/tests/ref/fate/vp9-00-quantizer-41
> index 667549c..5a46963 100644
> --- a/tests/ref/fate/vp9-00-quantizer-41
> +++ b/tests/ref/fate/vp9-00-quantizer-41
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, a456bdfc6c1c07b4cb3a3848843743b9
>  0,          1,          1,        1,   152064, fe41a12b8cb6bc5667ba2179e076f3b0
> diff --git a/tests/ref/fate/vp9-00-quantizer-42 b/tests/ref/fate/vp9-00-quantizer-42
> index c7fbfbc..d51d9b8 100644
> --- a/tests/ref/fate/vp9-00-quantizer-42
> +++ b/tests/ref/fate/vp9-00-quantizer-42
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, f016dd8431694d989700fb1ba71a5b2d
>  0,          1,          1,        1,   152064, e89c3c5b935157b40f2fb0ab92415828
> diff --git a/tests/ref/fate/vp9-00-quantizer-43 b/tests/ref/fate/vp9-00-quantizer-43
> index 090ce6f..051bfba 100644
> --- a/tests/ref/fate/vp9-00-quantizer-43
> +++ b/tests/ref/fate/vp9-00-quantizer-43
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 7b8ab82625f3006bac89d4fb5197e71c
>  0,          1,          1,        1,   152064, 18bd3716045563dfba2c72b640b3274b
> diff --git a/tests/ref/fate/vp9-00-quantizer-44 b/tests/ref/fate/vp9-00-quantizer-44
> index 130b5fa..9d6219c 100644
> --- a/tests/ref/fate/vp9-00-quantizer-44
> +++ b/tests/ref/fate/vp9-00-quantizer-44
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 66fde04d8320c750e56406feefd29979
>  0,          1,          1,        1,   152064, f9d01d8fc1722ec345e624e14b404215
> diff --git a/tests/ref/fate/vp9-00-quantizer-45 b/tests/ref/fate/vp9-00-quantizer-45
> index 5cb7105..8dc8594 100644
> --- a/tests/ref/fate/vp9-00-quantizer-45
> +++ b/tests/ref/fate/vp9-00-quantizer-45
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, cc97597b015896d73f3e60e7ae44c4da
>  0,          1,          1,        1,   152064, fea98bc508f92135641ab99762444b14
> diff --git a/tests/ref/fate/vp9-00-quantizer-46 b/tests/ref/fate/vp9-00-quantizer-46
> index cb51f72..60af88b 100644
> --- a/tests/ref/fate/vp9-00-quantizer-46
> +++ b/tests/ref/fate/vp9-00-quantizer-46
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 79ed95c741178bb3c0954f1f6f8e21a3
>  0,          1,          1,        1,   152064, f02a06a5e2b5b7619c9a52c5bea0564d
> diff --git a/tests/ref/fate/vp9-00-quantizer-47 b/tests/ref/fate/vp9-00-quantizer-47
> index 0bf90b4..d15af84 100644
> --- a/tests/ref/fate/vp9-00-quantizer-47
> +++ b/tests/ref/fate/vp9-00-quantizer-47
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 9b98e948b8c2a822f21bd8419e6f4410
>  0,          1,          1,        1,   152064, 491382d68c16c2a3c6f1746598bc4a97
> diff --git a/tests/ref/fate/vp9-00-quantizer-48 b/tests/ref/fate/vp9-00-quantizer-48
> index 2604a53..8dad801 100644
> --- a/tests/ref/fate/vp9-00-quantizer-48
> +++ b/tests/ref/fate/vp9-00-quantizer-48
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, f0f095b0edae7262f44d7ed7ef84ded4
>  0,          1,          1,        1,   152064, 0e833889ccac81d60251007d1baf6500
> diff --git a/tests/ref/fate/vp9-00-quantizer-49 b/tests/ref/fate/vp9-00-quantizer-49
> index 3403d1d..b27c55c 100644
> --- a/tests/ref/fate/vp9-00-quantizer-49
> +++ b/tests/ref/fate/vp9-00-quantizer-49
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 6c1b7b7827617fb9b8417aca2cfdbcaa
>  0,          1,          1,        1,   152064, 4c1fc8a89297fdcf79f0faabd42b8684
> diff --git a/tests/ref/fate/vp9-00-quantizer-50 b/tests/ref/fate/vp9-00-quantizer-50
> index f2cdc8e..c29969e 100644
> --- a/tests/ref/fate/vp9-00-quantizer-50
> +++ b/tests/ref/fate/vp9-00-quantizer-50
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, ca6142db68463487bc28c888ab38476c
>  0,          1,          1,        1,   152064, 02a71153ec70f569524c3d814cb62f86
> diff --git a/tests/ref/fate/vp9-00-quantizer-51 b/tests/ref/fate/vp9-00-quantizer-51
> index 87ab57e..e535630 100644
> --- a/tests/ref/fate/vp9-00-quantizer-51
> +++ b/tests/ref/fate/vp9-00-quantizer-51
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, eece2627df1ddf0872256eb92352e179
>  0,          1,          1,        1,   152064, 0ee9f221246ad747250e4b5e8ba586e2
> diff --git a/tests/ref/fate/vp9-00-quantizer-52 b/tests/ref/fate/vp9-00-quantizer-52
> index f3a14d1..bdb41f1 100644
> --- a/tests/ref/fate/vp9-00-quantizer-52
> +++ b/tests/ref/fate/vp9-00-quantizer-52
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 7290039d974c4e50db9d69f9864bcdbe
>  0,          1,          1,        1,   152064, 264765de9d02503038a4da54133b9f85
> diff --git a/tests/ref/fate/vp9-00-quantizer-53 b/tests/ref/fate/vp9-00-quantizer-53
> index 784925d..0a7b53b 100644
> --- a/tests/ref/fate/vp9-00-quantizer-53
> +++ b/tests/ref/fate/vp9-00-quantizer-53
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 917af24da66f143a56a01eb2c2254285
>  0,          1,          1,        1,   152064, 45a05d3bc644420519619e4115662a70
> diff --git a/tests/ref/fate/vp9-00-quantizer-54 b/tests/ref/fate/vp9-00-quantizer-54
> index daa6f5d..5d323c6 100644
> --- a/tests/ref/fate/vp9-00-quantizer-54
> +++ b/tests/ref/fate/vp9-00-quantizer-54
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 6fea2820bb10a9dec9add4d2452b01f5
>  0,          1,          1,        1,   152064, 74675169a4bfc2ff5463c4db5d85a79f
> diff --git a/tests/ref/fate/vp9-00-quantizer-55 b/tests/ref/fate/vp9-00-quantizer-55
> index 0a48cf9..a779d91 100644
> --- a/tests/ref/fate/vp9-00-quantizer-55
> +++ b/tests/ref/fate/vp9-00-quantizer-55
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 11e5d196f6537fb7d85988d90195e556
>  0,          1,          1,        1,   152064, 8536106795f7c93c5a43a11493527469
> diff --git a/tests/ref/fate/vp9-00-quantizer-56 b/tests/ref/fate/vp9-00-quantizer-56
> index f1f6069..5284f9b 100644
> --- a/tests/ref/fate/vp9-00-quantizer-56
> +++ b/tests/ref/fate/vp9-00-quantizer-56
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 40839b7a3a40ec10f96b8a75224f646d
>  0,          1,          1,        1,   152064, 11408dd73e8c45ddaab99f5c9650102b
> diff --git a/tests/ref/fate/vp9-00-quantizer-57 b/tests/ref/fate/vp9-00-quantizer-57
> index 499b57e..a22e6d3 100644
> --- a/tests/ref/fate/vp9-00-quantizer-57
> +++ b/tests/ref/fate/vp9-00-quantizer-57
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, d0e9fa03dd48da4592ebaadb4e3794e0
>  0,          1,          1,        1,   152064, 5172e29b1e04cd543833d6a68aab297c
> diff --git a/tests/ref/fate/vp9-00-quantizer-58 b/tests/ref/fate/vp9-00-quantizer-58
> index 2a10350..8fdba6a 100644
> --- a/tests/ref/fate/vp9-00-quantizer-58
> +++ b/tests/ref/fate/vp9-00-quantizer-58
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, bef4a27d460e7697e038fe6f1c8bd597
>  0,          1,          1,        1,   152064, 124674686cafc5f2ff5bc7ea412b8f3b
> diff --git a/tests/ref/fate/vp9-00-quantizer-59 b/tests/ref/fate/vp9-00-quantizer-59
> index 8ae9bd3..ab1b695 100644
> --- a/tests/ref/fate/vp9-00-quantizer-59
> +++ b/tests/ref/fate/vp9-00-quantizer-59
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, ae9d99e9d16ef20073300559566844ae
>  0,          1,          1,        1,   152064, da9405e5a6bfe4ed18d927ba2004008e
> diff --git a/tests/ref/fate/vp9-00-quantizer-60 b/tests/ref/fate/vp9-00-quantizer-60
> index a409462..f4250c6 100644
> --- a/tests/ref/fate/vp9-00-quantizer-60
> +++ b/tests/ref/fate/vp9-00-quantizer-60
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 9e66bb8e1b5e206ea4afe4bf2d335ac5
>  0,          1,          1,        1,   152064, 092b74c905c12c1e87e90f5a79857736
> diff --git a/tests/ref/fate/vp9-00-quantizer-61 b/tests/ref/fate/vp9-00-quantizer-61
> index 92aa67f..b3c42c3 100644
> --- a/tests/ref/fate/vp9-00-quantizer-61
> +++ b/tests/ref/fate/vp9-00-quantizer-61
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, d062dc6be246c8042744018765ef50a8
>  0,          1,          1,        1,   152064, 45fd9cbacb6a91060a7e49a58a85869d
> diff --git a/tests/ref/fate/vp9-00-quantizer-62 b/tests/ref/fate/vp9-00-quantizer-62
> index d17d3d6..8f5e4cf 100644
> --- a/tests/ref/fate/vp9-00-quantizer-62
> +++ b/tests/ref/fate/vp9-00-quantizer-62
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 62f7e42fe653e81c5a65a25389e045b5
>  0,          1,          1,        1,   152064, cb0cdd0b25689e0a43328550011d960d
> diff --git a/tests/ref/fate/vp9-00-quantizer-63 b/tests/ref/fate/vp9-00-quantizer-63
> index d7765be..c80c4d9 100644
> --- a/tests/ref/fate/vp9-00-quantizer-63
> +++ b/tests/ref/fate/vp9-00-quantizer-63
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 8467643dceff827e04acd82eeff1d1b0
>  0,          1,          1,        1,   152064, c786f49d66f4dfd685dea9605821a19f
> diff --git a/tests/ref/fate/vp9-01-sharpness-1 b/tests/ref/fate/vp9-01-sharpness-1
> index 02e6e16..d3a6382 100644
> --- a/tests/ref/fate/vp9-01-sharpness-1
> +++ b/tests/ref/fate/vp9-01-sharpness-1
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, a2e5c820fd9733e18f9349fb658ca281
>  0,          1,          1,        1,   152064, aa20a75be3a316193496706c9f760d08
> diff --git a/tests/ref/fate/vp9-01-sharpness-2 b/tests/ref/fate/vp9-01-sharpness-2
> index 51238c1..ce97bfb 100644
> --- a/tests/ref/fate/vp9-01-sharpness-2
> +++ b/tests/ref/fate/vp9-01-sharpness-2
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, a2e5c820fd9733e18f9349fb658ca281
>  0,          1,          1,        1,   152064, cd94572239817ae7c9b07de739c3272b
> diff --git a/tests/ref/fate/vp9-01-sharpness-3 b/tests/ref/fate/vp9-01-sharpness-3
> index e1af6f6..bc39f71 100644
> --- a/tests/ref/fate/vp9-01-sharpness-3
> +++ b/tests/ref/fate/vp9-01-sharpness-3
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, a2e5c820fd9733e18f9349fb658ca281
>  0,          1,          1,        1,   152064, 0d487a146393a0b8b84b4be1b371b507
> diff --git a/tests/ref/fate/vp9-01-sharpness-4 b/tests/ref/fate/vp9-01-sharpness-4
> index 977095f..b3c9d93 100644
> --- a/tests/ref/fate/vp9-01-sharpness-4
> +++ b/tests/ref/fate/vp9-01-sharpness-4
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, a2e5c820fd9733e18f9349fb658ca281
>  0,          1,          1,        1,   152064, 8bad76c55b5149169d64ce6512521de6
> diff --git a/tests/ref/fate/vp9-01-sharpness-5 b/tests/ref/fate/vp9-01-sharpness-5
> index c0cf715..b117419 100644
> --- a/tests/ref/fate/vp9-01-sharpness-5
> +++ b/tests/ref/fate/vp9-01-sharpness-5
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, a2e5c820fd9733e18f9349fb658ca281
>  0,          1,          1,        1,   152064, f1ce0a5d57a46c9ff1331804b7b03fdb
> diff --git a/tests/ref/fate/vp9-01-sharpness-6 b/tests/ref/fate/vp9-01-sharpness-6
> index 2e52d32..320bcd2 100644
> --- a/tests/ref/fate/vp9-01-sharpness-6
> +++ b/tests/ref/fate/vp9-01-sharpness-6
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, a2e5c820fd9733e18f9349fb658ca281
>  0,          1,          1,        1,   152064, 45d9ca07ed04210b1ebc743169bc8ec4
> diff --git a/tests/ref/fate/vp9-01-sharpness-7 b/tests/ref/fate/vp9-01-sharpness-7
> index b2b5fda..7ab3fda 100644
> --- a/tests/ref/fate/vp9-01-sharpness-7
> +++ b/tests/ref/fate/vp9-01-sharpness-7
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, a2e5c820fd9733e18f9349fb658ca281
>  0,          1,          1,        1,   152064, f719d0be18d16a448b4e7da3e2d9bf28
> diff --git a/tests/ref/fate/vp9-02-size-08x08 b/tests/ref/fate/vp9-02-size-08x08
> index 403a131..c902582 100644
> --- a/tests/ref/fate/vp9-02-size-08x08
> +++ b/tests/ref/fate/vp9-02-size-08x08
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 8x8
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,       96, 52def242c36123e5a8f5f53d6a971399
>  0,          1,          1,        1,       96, 79c93360fbd47179400414bbfee0901c
> diff --git a/tests/ref/fate/vp9-02-size-08x10 b/tests/ref/fate/vp9-02-size-08x10
> index 01d8818..c63d508 100644
> --- a/tests/ref/fate/vp9-02-size-08x10
> +++ b/tests/ref/fate/vp9-02-size-08x10
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 8x10
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      120, ea3e0f807304b0eb2d3e329b0124f75c
>  0,          1,          1,        1,      120, 8d13cf682d63e7eb13094f55d67fc458
> diff --git a/tests/ref/fate/vp9-02-size-08x16 b/tests/ref/fate/vp9-02-size-08x16
> index d72aafc..e165d1f 100644
> --- a/tests/ref/fate/vp9-02-size-08x16
> +++ b/tests/ref/fate/vp9-02-size-08x16
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 8x16
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      192, 0553e56a9d89aea496421885aab491f5
>  0,          1,          1,        1,      192, b2a14cf676f7ebf3c50450050f76ad16
> diff --git a/tests/ref/fate/vp9-02-size-08x18 b/tests/ref/fate/vp9-02-size-08x18
> index 8615d7b..574804a 100644
> --- a/tests/ref/fate/vp9-02-size-08x18
> +++ b/tests/ref/fate/vp9-02-size-08x18
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 8x18
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      216, 4c41f93b1b280b37bc77d7047435eaa4
>  0,          1,          1,        1,      216, c9c80fdba2ebc2b8c3490ae35e34f84f
> diff --git a/tests/ref/fate/vp9-02-size-08x32 b/tests/ref/fate/vp9-02-size-08x32
> index 55ab620..a715477 100644
> --- a/tests/ref/fate/vp9-02-size-08x32
> +++ b/tests/ref/fate/vp9-02-size-08x32
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 8x32
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      384, f92a7777fd69aa2f2914d9a41c4828ba
>  0,          1,          1,        1,      384, 62e1cc73487d2249a88a60e35a22d9c7
> diff --git a/tests/ref/fate/vp9-02-size-08x34 b/tests/ref/fate/vp9-02-size-08x34
> index bdcedbf..ea8134e 100644
> --- a/tests/ref/fate/vp9-02-size-08x34
> +++ b/tests/ref/fate/vp9-02-size-08x34
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 8x34
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      408, f3f2cd8f157466ff23dace85d77367ce
>  0,          1,          1,        1,      408, 639d9b70a14062e95559c12d2b597f91
> diff --git a/tests/ref/fate/vp9-02-size-08x64 b/tests/ref/fate/vp9-02-size-08x64
> index 3226dfa..b3cd3c5 100644
> --- a/tests/ref/fate/vp9-02-size-08x64
> +++ b/tests/ref/fate/vp9-02-size-08x64
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 8x64
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      768, 764bd02b781a38c621a109c12f3d9393
>  0,          1,          1,        1,      768, 79496bd2b9212026af816b3b7a0587d5
> diff --git a/tests/ref/fate/vp9-02-size-08x66 b/tests/ref/fate/vp9-02-size-08x66
> index 7aaa369..454a6d5 100644
> --- a/tests/ref/fate/vp9-02-size-08x66
> +++ b/tests/ref/fate/vp9-02-size-08x66
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 8x66
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      792, df20e8df89449fe50bb610e95a449a95
>  0,          1,          1,        1,      792, 18f1a66d463274d1b0489f3a50e86857
> diff --git a/tests/ref/fate/vp9-02-size-10x08 b/tests/ref/fate/vp9-02-size-10x08
> index 5708cd3..9c192fb 100644
> --- a/tests/ref/fate/vp9-02-size-10x08
> +++ b/tests/ref/fate/vp9-02-size-10x08
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 10x8
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      120, e1e66a88615da98523ef887f1463fc42
>  0,          1,          1,        1,      120, 549842fa98c8faf572882d38b0aae390
> diff --git a/tests/ref/fate/vp9-02-size-10x10 b/tests/ref/fate/vp9-02-size-10x10
> index a60e36b..708dbe4 100644
> --- a/tests/ref/fate/vp9-02-size-10x10
> +++ b/tests/ref/fate/vp9-02-size-10x10
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 10x10
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      150, 083d638f2e147295d817bb14fff5e4f4
>  0,          1,          1,        1,      150, 6dbdc445b6fd6bb99f2025cc2a40977e
> diff --git a/tests/ref/fate/vp9-02-size-10x16 b/tests/ref/fate/vp9-02-size-10x16
> index 659d491..1ec0a79 100644
> --- a/tests/ref/fate/vp9-02-size-10x16
> +++ b/tests/ref/fate/vp9-02-size-10x16
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 10x16
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      240, fab07d6209d2413e0a434e1aaaa12154
>  0,          1,          1,        1,      240, f9ffffdb96f98527ba2e553d1265edbb
> diff --git a/tests/ref/fate/vp9-02-size-10x18 b/tests/ref/fate/vp9-02-size-10x18
> index d4069c9..434f6d5 100644
> --- a/tests/ref/fate/vp9-02-size-10x18
> +++ b/tests/ref/fate/vp9-02-size-10x18
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 10x18
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      270, 0e9182e214aae732d94d007e5fe44888
>  0,          1,          1,        1,      270, 2630e2674b5611d68218fddac08815e2
> diff --git a/tests/ref/fate/vp9-02-size-10x32 b/tests/ref/fate/vp9-02-size-10x32
> index f5ec31c..306c4cd 100644
> --- a/tests/ref/fate/vp9-02-size-10x32
> +++ b/tests/ref/fate/vp9-02-size-10x32
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 10x32
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      480, 622e6407a051ea08706394d03330ffbf
>  0,          1,          1,        1,      480, 1841a0daf7c3ef7be94e01fdb1d3968a
> diff --git a/tests/ref/fate/vp9-02-size-10x34 b/tests/ref/fate/vp9-02-size-10x34
> index 950b04e..2f75228 100644
> --- a/tests/ref/fate/vp9-02-size-10x34
> +++ b/tests/ref/fate/vp9-02-size-10x34
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 10x34
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      510, bfeeaf51f972fd0dfe9ee757083cbb54
>  0,          1,          1,        1,      510, 10cd4ed6d762004846412d9cd0caa407
> diff --git a/tests/ref/fate/vp9-02-size-10x64 b/tests/ref/fate/vp9-02-size-10x64
> index 04a5e7e..bdec96c 100644
> --- a/tests/ref/fate/vp9-02-size-10x64
> +++ b/tests/ref/fate/vp9-02-size-10x64
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 10x64
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      960, 835254d0eecb17bed1f2b0f3a1638165
>  0,          1,          1,        1,      960, c0c95ce9890eab339a0e0f8b26cb095c
> diff --git a/tests/ref/fate/vp9-02-size-10x66 b/tests/ref/fate/vp9-02-size-10x66
> index f26965a..1b9d565 100644
> --- a/tests/ref/fate/vp9-02-size-10x66
> +++ b/tests/ref/fate/vp9-02-size-10x66
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 10x66
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      990, 1bd8b2d3bf679c4b925780bf82e12fae
>  0,          1,          1,        1,      990, a0254b4cd4928fe1080cd6f8828288a9
> diff --git a/tests/ref/fate/vp9-02-size-16x08 b/tests/ref/fate/vp9-02-size-16x08
> index 84e9b17..ce488ad 100644
> --- a/tests/ref/fate/vp9-02-size-16x08
> +++ b/tests/ref/fate/vp9-02-size-16x08
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 16x8
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      192, 68dccd167f9aa18df0840ebb8715eb68
>  0,          1,          1,        1,      192, 65c90bb99fdbee7abf21031d34cb18dc
> diff --git a/tests/ref/fate/vp9-02-size-16x10 b/tests/ref/fate/vp9-02-size-16x10
> index 8490e4e..6e58925 100644
> --- a/tests/ref/fate/vp9-02-size-16x10
> +++ b/tests/ref/fate/vp9-02-size-16x10
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 16x10
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      240, fb3cad61d7d9eb511758dbf87dd8abe1
>  0,          1,          1,        1,      240, 4fbc1aa5559c8db2930803893bd6ba75
> diff --git a/tests/ref/fate/vp9-02-size-16x16 b/tests/ref/fate/vp9-02-size-16x16
> index fb6f0c8..d82f208 100644
> --- a/tests/ref/fate/vp9-02-size-16x16
> +++ b/tests/ref/fate/vp9-02-size-16x16
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 16x16
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      384, b5c9daafa548e54a8e33e9881fda33f4
>  0,          1,          1,        1,      384, 1193acd7ea4b7aac968e35ef83c64378
> diff --git a/tests/ref/fate/vp9-02-size-16x18 b/tests/ref/fate/vp9-02-size-16x18
> index fadce55..c0d36c2 100644
> --- a/tests/ref/fate/vp9-02-size-16x18
> +++ b/tests/ref/fate/vp9-02-size-16x18
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 16x18
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      432, 5156b11cd9995d0c1638c9b0d2b0786c
>  0,          1,          1,        1,      432, ef78557f93fb3ea770c7d49ab60edf21
> diff --git a/tests/ref/fate/vp9-02-size-16x32 b/tests/ref/fate/vp9-02-size-16x32
> index 02a2676..1e23fa8 100644
> --- a/tests/ref/fate/vp9-02-size-16x32
> +++ b/tests/ref/fate/vp9-02-size-16x32
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 16x32
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      768, c73d611490a5ddec6c690589deaf5e86
>  0,          1,          1,        1,      768, 5d8eaeb222aa64abda59ce7b09b2f6d9
> diff --git a/tests/ref/fate/vp9-02-size-16x34 b/tests/ref/fate/vp9-02-size-16x34
> index 97e527f..9e9bb48 100644
> --- a/tests/ref/fate/vp9-02-size-16x34
> +++ b/tests/ref/fate/vp9-02-size-16x34
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 16x34
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      816, b8bf711d9a1ce49180ed56407c8a4b0a
>  0,          1,          1,        1,      816, 0457929b06ce46aec63d66bd38586e3f
> diff --git a/tests/ref/fate/vp9-02-size-16x64 b/tests/ref/fate/vp9-02-size-16x64
> index 63dbf24..26ced63 100644
> --- a/tests/ref/fate/vp9-02-size-16x64
> +++ b/tests/ref/fate/vp9-02-size-16x64
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 16x64
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     1536, 925fdc485f3baa1ed145ae391519d7fd
>  0,          1,          1,        1,     1536, d37af656da2d7a727c8451773495d5ed
> diff --git a/tests/ref/fate/vp9-02-size-16x66 b/tests/ref/fate/vp9-02-size-16x66
> index f7d0102..2ba0883 100644
> --- a/tests/ref/fate/vp9-02-size-16x66
> +++ b/tests/ref/fate/vp9-02-size-16x66
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 16x66
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     1584, c7b0d91f362dff0a581434af6e902d43
>  0,          1,          1,        1,     1584, d8b016ef59c6bc193b29d1c714f342c1
> diff --git a/tests/ref/fate/vp9-02-size-18x08 b/tests/ref/fate/vp9-02-size-18x08
> index 08aabcc..9e8ef1d 100644
> --- a/tests/ref/fate/vp9-02-size-18x08
> +++ b/tests/ref/fate/vp9-02-size-18x08
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 18x8
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      216, 3219af4ef540636b0f67a989e9966059
>  0,          1,          1,        1,      216, 1a3655c2cfd2ee332bc89da5b3faf778
> diff --git a/tests/ref/fate/vp9-02-size-18x10 b/tests/ref/fate/vp9-02-size-18x10
> index 9323a14..b0a230d 100644
> --- a/tests/ref/fate/vp9-02-size-18x10
> +++ b/tests/ref/fate/vp9-02-size-18x10
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 18x10
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      270, bf574489e9360b6475aa012c747e7924
>  0,          1,          1,        1,      270, 851100301c2937312a6fd32f5aab5a09
> diff --git a/tests/ref/fate/vp9-02-size-18x16 b/tests/ref/fate/vp9-02-size-18x16
> index a3a91b9..d78e0fa 100644
> --- a/tests/ref/fate/vp9-02-size-18x16
> +++ b/tests/ref/fate/vp9-02-size-18x16
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 18x16
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      432, 9535aaa2ea26fbdc16e7fe9cba3fc9b4
>  0,          1,          1,        1,      432, 7f6e7ca33c0b27ff052dc2ab6721e37d
> diff --git a/tests/ref/fate/vp9-02-size-18x18 b/tests/ref/fate/vp9-02-size-18x18
> index b90faf3..9b23f21 100644
> --- a/tests/ref/fate/vp9-02-size-18x18
> +++ b/tests/ref/fate/vp9-02-size-18x18
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 18x18
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      486, 83790b0e7004d8d89b7134ee1a88d885
>  0,          1,          1,        1,      486, 0baf0bf556ae56d2f4b04567e6ac7ed9
> diff --git a/tests/ref/fate/vp9-02-size-18x32 b/tests/ref/fate/vp9-02-size-18x32
> index b7bd74b..5aeb7a2 100644
> --- a/tests/ref/fate/vp9-02-size-18x32
> +++ b/tests/ref/fate/vp9-02-size-18x32
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 18x32
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      864, 62eabc8819ded6ddba2c3a5029497cf0
>  0,          1,          1,        1,      864, b760182fddf8bc05f149e80bbcb2c281
> diff --git a/tests/ref/fate/vp9-02-size-18x34 b/tests/ref/fate/vp9-02-size-18x34
> index 0f46da7..05472cc 100644
> --- a/tests/ref/fate/vp9-02-size-18x34
> +++ b/tests/ref/fate/vp9-02-size-18x34
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 18x34
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      918, 612cc424eaae924cb25c7732c422f752
>  0,          1,          1,        1,      918, 010e8c2a814862529fcf8d7771ba2d7f
> diff --git a/tests/ref/fate/vp9-02-size-18x64 b/tests/ref/fate/vp9-02-size-18x64
> index 172422c..60444ef 100644
> --- a/tests/ref/fate/vp9-02-size-18x64
> +++ b/tests/ref/fate/vp9-02-size-18x64
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 18x64
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     1728, 72c74de547d9ed1b17bc962dbd5e0bb1
>  0,          1,          1,        1,     1728, 462849f9e2204738e9f08b40e682a6ae
> diff --git a/tests/ref/fate/vp9-02-size-18x66 b/tests/ref/fate/vp9-02-size-18x66
> index c400956..46e62e3 100644
> --- a/tests/ref/fate/vp9-02-size-18x66
> +++ b/tests/ref/fate/vp9-02-size-18x66
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 18x66
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     1782, c3fc4a1593b9cc2f3752106af8539386
>  0,          1,          1,        1,     1782, 7f2ffe6bc1750f6749bb5ad12cbaf34b
> diff --git a/tests/ref/fate/vp9-02-size-32x08 b/tests/ref/fate/vp9-02-size-32x08
> index 2df5adc..a633cc2 100644
> --- a/tests/ref/fate/vp9-02-size-32x08
> +++ b/tests/ref/fate/vp9-02-size-32x08
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 32x8
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      384, c7b30cde5664387b0f7a80d9b01e4fe2
>  0,          1,          1,        1,      384, 2228a2a4e54ab5145525e5803c314dcd
> diff --git a/tests/ref/fate/vp9-02-size-32x10 b/tests/ref/fate/vp9-02-size-32x10
> index f5f45fb..7733832 100644
> --- a/tests/ref/fate/vp9-02-size-32x10
> +++ b/tests/ref/fate/vp9-02-size-32x10
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 32x10
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      480, 7c5b5df373ebfd31d210ff910e02213b
>  0,          1,          1,        1,      480, c5b0a5e3eceb792b15818324a43aa2a8
> diff --git a/tests/ref/fate/vp9-02-size-32x16 b/tests/ref/fate/vp9-02-size-32x16
> index 4aac211..e02ee0f 100644
> --- a/tests/ref/fate/vp9-02-size-32x16
> +++ b/tests/ref/fate/vp9-02-size-32x16
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 32x16
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      768, 7c2818db2632e5c5beee17e7105d9209
>  0,          1,          1,        1,      768, cead72bd22995e98b54a91c7b4a20975
> diff --git a/tests/ref/fate/vp9-02-size-32x18 b/tests/ref/fate/vp9-02-size-32x18
> index 2b30219..176d12e 100644
> --- a/tests/ref/fate/vp9-02-size-32x18
> +++ b/tests/ref/fate/vp9-02-size-32x18
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 32x18
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      864, 9da5409d344e7b8380688569e54803a5
>  0,          1,          1,        1,      864, 9b51e14e2e624ee2b430e9eaf1a48798
> diff --git a/tests/ref/fate/vp9-02-size-32x32 b/tests/ref/fate/vp9-02-size-32x32
> index e9de2ed..7c14ffc 100644
> --- a/tests/ref/fate/vp9-02-size-32x32
> +++ b/tests/ref/fate/vp9-02-size-32x32
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 32x32
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     1536, 117915db1856cee26f05a609c8c8de2e
>  0,          1,          1,        1,     1536, 943771a98b26b174e88ed1f4e872e504
> diff --git a/tests/ref/fate/vp9-02-size-32x34 b/tests/ref/fate/vp9-02-size-32x34
> index e1e00fd..b984a5f 100644
> --- a/tests/ref/fate/vp9-02-size-32x34
> +++ b/tests/ref/fate/vp9-02-size-32x34
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 32x34
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     1632, 770582911fd0095ebbeae384e87665ac
>  0,          1,          1,        1,     1632, f99d7e3131f04413cba2f9de6818976d
> diff --git a/tests/ref/fate/vp9-02-size-32x64 b/tests/ref/fate/vp9-02-size-32x64
> index c39c88d..4db3ea8 100644
> --- a/tests/ref/fate/vp9-02-size-32x64
> +++ b/tests/ref/fate/vp9-02-size-32x64
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 32x64
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     3072, caa8471a8b381d53c3e8fc627946a871
>  0,          1,          1,        1,     3072, 2cba86ea14c0f28e242625b08f5e9b88
> diff --git a/tests/ref/fate/vp9-02-size-32x66 b/tests/ref/fate/vp9-02-size-32x66
> index d036df1..53f73d3 100644
> --- a/tests/ref/fate/vp9-02-size-32x66
> +++ b/tests/ref/fate/vp9-02-size-32x66
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 32x66
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     3168, 920ea4b8a00d41489d122d641d6e4fe5
>  0,          1,          1,        1,     3168, 8bfc8d452a79f2978b8e973b77cbf8a8
> diff --git a/tests/ref/fate/vp9-02-size-34x08 b/tests/ref/fate/vp9-02-size-34x08
> index 5869186..c6a7a50 100644
> --- a/tests/ref/fate/vp9-02-size-34x08
> +++ b/tests/ref/fate/vp9-02-size-34x08
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 34x8
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      408, c14f2ba5b4582c9d3a488976814691b3
>  0,          1,          1,        1,      408, 4387a4dce19007b7efb810b5a4069749
> diff --git a/tests/ref/fate/vp9-02-size-34x10 b/tests/ref/fate/vp9-02-size-34x10
> index a2ce10e..ba10002 100644
> --- a/tests/ref/fate/vp9-02-size-34x10
> +++ b/tests/ref/fate/vp9-02-size-34x10
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 34x10
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      510, fd7212b519783cf4831ce4bff91f2312
>  0,          1,          1,        1,      510, 9768722ee939d80a6716865fdebca33d
> diff --git a/tests/ref/fate/vp9-02-size-34x16 b/tests/ref/fate/vp9-02-size-34x16
> index 0c8dc67..41c04f0 100644
> --- a/tests/ref/fate/vp9-02-size-34x16
> +++ b/tests/ref/fate/vp9-02-size-34x16
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 34x16
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      816, e443c43101be00470c6a61c1a2995b5a
>  0,          1,          1,        1,      816, 1e79b1b46ec704d360b5fb725913b0f1
> diff --git a/tests/ref/fate/vp9-02-size-34x18 b/tests/ref/fate/vp9-02-size-34x18
> index 8c92b2d..e147f19 100644
> --- a/tests/ref/fate/vp9-02-size-34x18
> +++ b/tests/ref/fate/vp9-02-size-34x18
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 34x18
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      918, ab7eabb355e5163e7451945018fadebd
>  0,          1,          1,        1,      918, b9a77cc0c769535808996a6de7b374ff
> diff --git a/tests/ref/fate/vp9-02-size-34x32 b/tests/ref/fate/vp9-02-size-34x32
> index a9f804e..30061e0 100644
> --- a/tests/ref/fate/vp9-02-size-34x32
> +++ b/tests/ref/fate/vp9-02-size-34x32
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 34x32
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     1632, 7e334867e27046fabf0f39365311c38c
>  0,          1,          1,        1,     1632, d2a49216ecedea62f546e54c1552f163
> diff --git a/tests/ref/fate/vp9-02-size-34x34 b/tests/ref/fate/vp9-02-size-34x34
> index 4bed149..99f5b64 100644
> --- a/tests/ref/fate/vp9-02-size-34x34
> +++ b/tests/ref/fate/vp9-02-size-34x34
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 34x34
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     1734, 1bb98ba89abf6b86f47a851f8126e1ff
>  0,          1,          1,        1,     1734, b960cc795c179afe7eec360c57fddd7f
> diff --git a/tests/ref/fate/vp9-02-size-34x64 b/tests/ref/fate/vp9-02-size-34x64
> index ac61f27..f0f3f19 100644
> --- a/tests/ref/fate/vp9-02-size-34x64
> +++ b/tests/ref/fate/vp9-02-size-34x64
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 34x64
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     3264, 3856635223f578e1e7f7e7250a53cb8d
>  0,          1,          1,        1,     3264, ee8d7c3a0ea165420d7e733b9e59219a
> diff --git a/tests/ref/fate/vp9-02-size-34x66 b/tests/ref/fate/vp9-02-size-34x66
> index 2bc9eb6..064e230 100644
> --- a/tests/ref/fate/vp9-02-size-34x66
> +++ b/tests/ref/fate/vp9-02-size-34x66
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 34x66
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     3366, bf4e568217906ee4b58dc4707bee8ef6
>  0,          1,          1,        1,     3366, f823f8c7b6e47ba43215f3becd35208e
> diff --git a/tests/ref/fate/vp9-02-size-64x08 b/tests/ref/fate/vp9-02-size-64x08
> index e1e01ee..1d2305f 100644
> --- a/tests/ref/fate/vp9-02-size-64x08
> +++ b/tests/ref/fate/vp9-02-size-64x08
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x8
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      768, d801797c94039b0a166d46e151ec912c
>  0,          1,          1,        1,      768, 161ec22caa3689b214d9ab993424584b
> diff --git a/tests/ref/fate/vp9-02-size-64x10 b/tests/ref/fate/vp9-02-size-64x10
> index 046e7ee..4212af5 100644
> --- a/tests/ref/fate/vp9-02-size-64x10
> +++ b/tests/ref/fate/vp9-02-size-64x10
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x10
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      960, 97eb5fd0599d482662eb0a1def5c5ef2
>  0,          1,          1,        1,      960, dfdc1b61b478dcca8d411021486aa2ec
> diff --git a/tests/ref/fate/vp9-02-size-64x16 b/tests/ref/fate/vp9-02-size-64x16
> index 16cb5dd..e7e0e45 100644
> --- a/tests/ref/fate/vp9-02-size-64x16
> +++ b/tests/ref/fate/vp9-02-size-64x16
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x16
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     1536, a43068a364cc42619e62406dcf17ddfc
>  0,          1,          1,        1,     1536, 94691f93299bbf5b6ba3022b02b3e069
> diff --git a/tests/ref/fate/vp9-02-size-64x18 b/tests/ref/fate/vp9-02-size-64x18
> index 427acca..e672f13 100644
> --- a/tests/ref/fate/vp9-02-size-64x18
> +++ b/tests/ref/fate/vp9-02-size-64x18
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x18
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     1728, adf7e84a351847683f6a8dd177019e29
>  0,          1,          1,        1,     1728, 8227cf283a27277fbab3d7826e340337
> diff --git a/tests/ref/fate/vp9-02-size-64x32 b/tests/ref/fate/vp9-02-size-64x32
> index a0f033e..93188f0 100644
> --- a/tests/ref/fate/vp9-02-size-64x32
> +++ b/tests/ref/fate/vp9-02-size-64x32
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x32
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     3072, 931ab6a2482c3e84bc7ef8dfbc251307
>  0,          1,          1,        1,     3072, 3552a9d8470a64ed627a6dbb799b7811
> diff --git a/tests/ref/fate/vp9-02-size-64x34 b/tests/ref/fate/vp9-02-size-64x34
> index a852272..605cd89 100644
> --- a/tests/ref/fate/vp9-02-size-64x34
> +++ b/tests/ref/fate/vp9-02-size-64x34
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x34
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     3264, 68d00958a78e6252dd75d632806e2022
>  0,          1,          1,        1,     3264, f7b6266e74200a669eecd241db787ee2
> diff --git a/tests/ref/fate/vp9-02-size-64x64 b/tests/ref/fate/vp9-02-size-64x64
> index 418febe..e99787b 100644
> --- a/tests/ref/fate/vp9-02-size-64x64
> +++ b/tests/ref/fate/vp9-02-size-64x64
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x64
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     6144, 35f17db9076fa20368fddfa01543c746
>  0,          1,          1,        1,     6144, 61cd775dfc177262da9a91d3912e6718
> diff --git a/tests/ref/fate/vp9-02-size-64x66 b/tests/ref/fate/vp9-02-size-64x66
> index d358bd6..ffcdfd2 100644
> --- a/tests/ref/fate/vp9-02-size-64x66
> +++ b/tests/ref/fate/vp9-02-size-64x66
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 64x66
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     6336, 88587de65acfc85ff56daac8ef5d12e6
>  0,          1,          1,        1,     6336, be41f6c788b929b5b6b27c5674f40abd
> diff --git a/tests/ref/fate/vp9-02-size-66x08 b/tests/ref/fate/vp9-02-size-66x08
> index 426f91b..b211ac7 100644
> --- a/tests/ref/fate/vp9-02-size-66x08
> +++ b/tests/ref/fate/vp9-02-size-66x08
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 66x8
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      792, 3b16847e60786706fc339abc452746ff
>  0,          1,          1,        1,      792, 365a5951cb127d6df183fe5d5000f493
> diff --git a/tests/ref/fate/vp9-02-size-66x10 b/tests/ref/fate/vp9-02-size-66x10
> index 8e0133a..4a2e644 100644
> --- a/tests/ref/fate/vp9-02-size-66x10
> +++ b/tests/ref/fate/vp9-02-size-66x10
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 66x10
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,      990, 7cbd8c6b2fb35c0c3063cb7a379944c9
>  0,          1,          1,        1,      990, 14062e74b98bed1ca982f408bc14326c
> diff --git a/tests/ref/fate/vp9-02-size-66x16 b/tests/ref/fate/vp9-02-size-66x16
> index 4bdc1ba..54ef217 100644
> --- a/tests/ref/fate/vp9-02-size-66x16
> +++ b/tests/ref/fate/vp9-02-size-66x16
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 66x16
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     1584, fa2f292d273c37dc2804a70d1cae1e9d
>  0,          1,          1,        1,     1584, ba75d90652c021bc7ca061352e6e94ce
> diff --git a/tests/ref/fate/vp9-02-size-66x18 b/tests/ref/fate/vp9-02-size-66x18
> index 3b395dd..60f9fda 100644
> --- a/tests/ref/fate/vp9-02-size-66x18
> +++ b/tests/ref/fate/vp9-02-size-66x18
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 66x18
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     1782, fda5ad9bf70a51b3a41bdcabf2cce32a
>  0,          1,          1,        1,     1782, 91916fb20ad542a7a3ad276e6505f9b0
> diff --git a/tests/ref/fate/vp9-02-size-66x32 b/tests/ref/fate/vp9-02-size-66x32
> index 14b9cb0..38c133f 100644
> --- a/tests/ref/fate/vp9-02-size-66x32
> +++ b/tests/ref/fate/vp9-02-size-66x32
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 66x32
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     3168, 013cd22aea6bfeccc8ec809abd52be5c
>  0,          1,          1,        1,     3168, 0980adfb0ef879b3c960797272f025ad
> diff --git a/tests/ref/fate/vp9-02-size-66x34 b/tests/ref/fate/vp9-02-size-66x34
> index 79bc91c..d9ee0c5 100644
> --- a/tests/ref/fate/vp9-02-size-66x34
> +++ b/tests/ref/fate/vp9-02-size-66x34
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 66x34
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     3366, 6821eb3fcd1d10db32eff70468dcf9c1
>  0,          1,          1,        1,     3366, ed0094d347d9f250d46b4903cbc14801
> diff --git a/tests/ref/fate/vp9-02-size-66x64 b/tests/ref/fate/vp9-02-size-66x64
> index a89e10f..264ae31 100644
> --- a/tests/ref/fate/vp9-02-size-66x64
> +++ b/tests/ref/fate/vp9-02-size-66x64
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 66x64
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     6336, 929086fbb3e117bd53110b64c1ee915b
>  0,          1,          1,        1,     6336, 9ed45f5e40dd2393434e14a0c0160c63
> diff --git a/tests/ref/fate/vp9-02-size-66x66 b/tests/ref/fate/vp9-02-size-66x66
> index 73aa4e7..bd30ff0 100644
> --- a/tests/ref/fate/vp9-02-size-66x66
> +++ b/tests/ref/fate/vp9-02-size-66x66
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 66x66
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,     6534, 69f9028d52f95d2e7f986c57b19fc018
>  0,          1,          1,        1,     6534, 068e611f62b3f6222f6b1699748c8fbf
> diff --git a/tests/ref/fate/vp9-03-deltaq b/tests/ref/fate/vp9-03-deltaq
> index 293abad..24b28cc 100644
> --- a/tests/ref/fate/vp9-03-deltaq
> +++ b/tests/ref/fate/vp9-03-deltaq
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x240
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   126720, 2f90d606edc511c8c960530dd915cb98
>  0,          1,          1,        1,   126720, 7fd451a057d6341b2b0d116f59e41a13
> diff --git a/tests/ref/fate/vp9-03-size-196x196 b/tests/ref/fate/vp9-03-size-196x196
> index 1c4156b..2299e53 100644
> --- a/tests/ref/fate/vp9-03-size-196x196
> +++ b/tests/ref/fate/vp9-03-size-196x196
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 196x196
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    57624, 14cc1c34b8106e35238d4650a9123852
>  0,          1,          1,        1,    57624, 66e0bb9136ea24e30b781a4610b428a1
> diff --git a/tests/ref/fate/vp9-03-size-196x198 b/tests/ref/fate/vp9-03-size-196x198
> index 294c7de..4ce1fe8 100644
> --- a/tests/ref/fate/vp9-03-size-196x198
> +++ b/tests/ref/fate/vp9-03-size-196x198
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 196x198
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    58212, d2bd2dfaf2ac22b3f2499844f228d89a
>  0,          1,          1,        1,    58212, e066448baeb39da04b22d4d2ebd27b0a
> diff --git a/tests/ref/fate/vp9-03-size-196x200 b/tests/ref/fate/vp9-03-size-196x200
> index d0882e5..a195900 100644
> --- a/tests/ref/fate/vp9-03-size-196x200
> +++ b/tests/ref/fate/vp9-03-size-196x200
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 196x200
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    58800, b2f2ac3e3833ae1b4dd075fe00210373
>  0,          1,          1,        1,    58800, c0cce05e56a07111fe62553fa3a87074
> diff --git a/tests/ref/fate/vp9-03-size-196x202 b/tests/ref/fate/vp9-03-size-196x202
> index 20f46ea..c778150 100644
> --- a/tests/ref/fate/vp9-03-size-196x202
> +++ b/tests/ref/fate/vp9-03-size-196x202
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 196x202
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    59388, 7109d2ef160828ece26337f36fcfc092
>  0,          1,          1,        1,    59388, bdaa6612f81a956d9b20d55a04df8346
> diff --git a/tests/ref/fate/vp9-03-size-196x208 b/tests/ref/fate/vp9-03-size-196x208
> index b1ffd8f..248188c 100644
> --- a/tests/ref/fate/vp9-03-size-196x208
> +++ b/tests/ref/fate/vp9-03-size-196x208
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 196x208
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    61152, efa2a2a76a0fe709a78e491346cfcf29
>  0,          1,          1,        1,    61152, 97de85e21b408878853fa870104707d7
> diff --git a/tests/ref/fate/vp9-03-size-196x210 b/tests/ref/fate/vp9-03-size-196x210
> index 7248874..397b2d4 100644
> --- a/tests/ref/fate/vp9-03-size-196x210
> +++ b/tests/ref/fate/vp9-03-size-196x210
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 196x210
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    61740, fccc18714a9ed3840bd6e9c6ca4858e5
>  0,          1,          1,        1,    61740, a8f6eb43cf6ed670eb180c5051de06f7
> diff --git a/tests/ref/fate/vp9-03-size-196x224 b/tests/ref/fate/vp9-03-size-196x224
> index fb49188..79bc8f9 100644
> --- a/tests/ref/fate/vp9-03-size-196x224
> +++ b/tests/ref/fate/vp9-03-size-196x224
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 196x224
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    65856, 13263674ea5aa619250dfd139bda872f
>  0,          1,          1,        1,    65856, 39f5cbd8917f2b3a1df8cf2b786266de
> diff --git a/tests/ref/fate/vp9-03-size-196x226 b/tests/ref/fate/vp9-03-size-196x226
> index 0ef318a..a22c2f4 100644
> --- a/tests/ref/fate/vp9-03-size-196x226
> +++ b/tests/ref/fate/vp9-03-size-196x226
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 196x226
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    66444, 5cb240f10761f59687612ed589759800
>  0,          1,          1,        1,    66444, 9d8d5b57336ddfa5c9c5100a0302197d
> diff --git a/tests/ref/fate/vp9-03-size-198x196 b/tests/ref/fate/vp9-03-size-198x196
> index 2d02a49..08d99f6 100644
> --- a/tests/ref/fate/vp9-03-size-198x196
> +++ b/tests/ref/fate/vp9-03-size-198x196
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 198x196
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    58212, c980866a6f17d4107ce128ee112d74cf
>  0,          1,          1,        1,    58212, d4d5d2a10e73f1d09919355dc4d63d48
> diff --git a/tests/ref/fate/vp9-03-size-198x198 b/tests/ref/fate/vp9-03-size-198x198
> index f458f53..0d52bc7 100644
> --- a/tests/ref/fate/vp9-03-size-198x198
> +++ b/tests/ref/fate/vp9-03-size-198x198
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 198x198
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    58806, ee0760611da9938e72f551d219671c76
>  0,          1,          1,        1,    58806, c512cb8a864c25318254438c7170f373
> diff --git a/tests/ref/fate/vp9-03-size-198x200 b/tests/ref/fate/vp9-03-size-198x200
> index 176b9d9..2f6ad4e 100644
> --- a/tests/ref/fate/vp9-03-size-198x200
> +++ b/tests/ref/fate/vp9-03-size-198x200
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 198x200
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    59400, fb0e8171b0f91d9b2ceb5430db27a67b
>  0,          1,          1,        1,    59400, 73f121e6aa0e6290cfd06ac9b033c772
> diff --git a/tests/ref/fate/vp9-03-size-198x202 b/tests/ref/fate/vp9-03-size-198x202
> index 371a874..6b143c2 100644
> --- a/tests/ref/fate/vp9-03-size-198x202
> +++ b/tests/ref/fate/vp9-03-size-198x202
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 198x202
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    59994, f5e1cf4cc56742fadddf42189a3f65e3
>  0,          1,          1,        1,    59994, f3e8ca2c8deb29a6b5bfe415b39c901e
> diff --git a/tests/ref/fate/vp9-03-size-198x208 b/tests/ref/fate/vp9-03-size-198x208
> index 95b2e06..7647ae1 100644
> --- a/tests/ref/fate/vp9-03-size-198x208
> +++ b/tests/ref/fate/vp9-03-size-198x208
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 198x208
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    61776, d45b561f81cbfcca8a1dddbc2bf8ca31
>  0,          1,          1,        1,    61776, 3664f63b2e59e380622caadb7a05545e
> diff --git a/tests/ref/fate/vp9-03-size-198x210 b/tests/ref/fate/vp9-03-size-198x210
> index 1e2790a..6859cea 100644
> --- a/tests/ref/fate/vp9-03-size-198x210
> +++ b/tests/ref/fate/vp9-03-size-198x210
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 198x210
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    62370, 8525a27170982c059d5904c1af3b43fb
>  0,          1,          1,        1,    62370, c4eb329733913360384d3917a58f6f36
> diff --git a/tests/ref/fate/vp9-03-size-198x224 b/tests/ref/fate/vp9-03-size-198x224
> index 7cccf9b..cd9bd4e 100644
> --- a/tests/ref/fate/vp9-03-size-198x224
> +++ b/tests/ref/fate/vp9-03-size-198x224
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 198x224
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    66528, 5f69230bfd8bb485bd85552b18339fc0
>  0,          1,          1,        1,    66528, f5c365774fc1d0bffd5025ce2e931aaf
> diff --git a/tests/ref/fate/vp9-03-size-198x226 b/tests/ref/fate/vp9-03-size-198x226
> index 81136e6..cf3e185 100644
> --- a/tests/ref/fate/vp9-03-size-198x226
> +++ b/tests/ref/fate/vp9-03-size-198x226
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 198x226
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    67122, 412c33a8fd71c99e68e6701b050b107c
>  0,          1,          1,        1,    67122, 8e69483ff8a094096dd550b30be20dde
> diff --git a/tests/ref/fate/vp9-03-size-200x196 b/tests/ref/fate/vp9-03-size-200x196
> index 670d115..b7cfe08 100644
> --- a/tests/ref/fate/vp9-03-size-200x196
> +++ b/tests/ref/fate/vp9-03-size-200x196
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 200x196
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    58800, 651a0627c6cdaee8b46e1f8c4121a368
>  0,          1,          1,        1,    58800, 3e63075148df16f69c933cf6c63e078c
> diff --git a/tests/ref/fate/vp9-03-size-200x198 b/tests/ref/fate/vp9-03-size-200x198
> index fd37506..97fa05a 100644
> --- a/tests/ref/fate/vp9-03-size-200x198
> +++ b/tests/ref/fate/vp9-03-size-200x198
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 200x198
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    59400, d4b3578d800c747bcabaa484a140ffb0
>  0,          1,          1,        1,    59400, a40f6f8c384c5dc3d5546d960bb6d9e5
> diff --git a/tests/ref/fate/vp9-03-size-200x200 b/tests/ref/fate/vp9-03-size-200x200
> index d5806a1..874aa24 100644
> --- a/tests/ref/fate/vp9-03-size-200x200
> +++ b/tests/ref/fate/vp9-03-size-200x200
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 200x200
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    60000, b339f4e563afadb25f43b8c05b12dc03
>  0,          1,          1,        1,    60000, 3bd5280e7fb42400085b0b1dbba1905e
> diff --git a/tests/ref/fate/vp9-03-size-200x202 b/tests/ref/fate/vp9-03-size-200x202
> index 3f6ee8b..bc2a5d2 100644
> --- a/tests/ref/fate/vp9-03-size-200x202
> +++ b/tests/ref/fate/vp9-03-size-200x202
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 200x202
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    60600, c4a13df44e66f06961dd72fc990439e9
>  0,          1,          1,        1,    60600, 81c73b8d3806ad96af8f422914a253f8
> diff --git a/tests/ref/fate/vp9-03-size-200x208 b/tests/ref/fate/vp9-03-size-200x208
> index ea1cb0c..9ce3c76 100644
> --- a/tests/ref/fate/vp9-03-size-200x208
> +++ b/tests/ref/fate/vp9-03-size-200x208
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 200x208
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    62400, 702748bec18c500dd41d93ae74b11d56
>  0,          1,          1,        1,    62400, 4fb542190dab2fd673724d47451ff6ee
> diff --git a/tests/ref/fate/vp9-03-size-200x210 b/tests/ref/fate/vp9-03-size-200x210
> index 7c459d2..afb6481 100644
> --- a/tests/ref/fate/vp9-03-size-200x210
> +++ b/tests/ref/fate/vp9-03-size-200x210
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 200x210
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    63000, 31ef44bd12ae702f306c55eba10d2ba7
>  0,          1,          1,        1,    63000, 83e9d913f5aa058d79a81047ca45e4a2
> diff --git a/tests/ref/fate/vp9-03-size-200x224 b/tests/ref/fate/vp9-03-size-200x224
> index 19a786c..e1d1a51 100644
> --- a/tests/ref/fate/vp9-03-size-200x224
> +++ b/tests/ref/fate/vp9-03-size-200x224
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 200x224
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    67200, 315d69847bf752a84231a368278eb0b6
>  0,          1,          1,        1,    67200, d245738f8627fc345ab38a547bc7d352
> diff --git a/tests/ref/fate/vp9-03-size-200x226 b/tests/ref/fate/vp9-03-size-200x226
> index dd7967d..832271d 100644
> --- a/tests/ref/fate/vp9-03-size-200x226
> +++ b/tests/ref/fate/vp9-03-size-200x226
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 200x226
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    67800, e45b6b9dce4a8509b7d26bc3cfdf7c86
>  0,          1,          1,        1,    67800, ddb9d5033ecfa2d6e9a5505dce374bda
> diff --git a/tests/ref/fate/vp9-03-size-202x196 b/tests/ref/fate/vp9-03-size-202x196
> index 1af7c58..106baf8 100644
> --- a/tests/ref/fate/vp9-03-size-202x196
> +++ b/tests/ref/fate/vp9-03-size-202x196
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 202x196
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    59388, 1261466179df96099e598e46c50fa7c1
>  0,          1,          1,        1,    59388, cc0fe373cd0399cf0c95edf92d9ab01f
> diff --git a/tests/ref/fate/vp9-03-size-202x198 b/tests/ref/fate/vp9-03-size-202x198
> index d51ee96..fbae564 100644
> --- a/tests/ref/fate/vp9-03-size-202x198
> +++ b/tests/ref/fate/vp9-03-size-202x198
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 202x198
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    59994, 181edc4ebeeff7f0527b93b84d5d8efb
>  0,          1,          1,        1,    59994, 132c71b634fb67eed51fcdef1775b6b2
> diff --git a/tests/ref/fate/vp9-03-size-202x200 b/tests/ref/fate/vp9-03-size-202x200
> index f75e192..6359aa7 100644
> --- a/tests/ref/fate/vp9-03-size-202x200
> +++ b/tests/ref/fate/vp9-03-size-202x200
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 202x200
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    60600, 20c41d4a1271183dbbc7a44e6b90ea80
>  0,          1,          1,        1,    60600, bd8c1fba8d8742f4d98b7d5097c8c828
> diff --git a/tests/ref/fate/vp9-03-size-202x202 b/tests/ref/fate/vp9-03-size-202x202
> index af7cb9a..90fddc8 100644
> --- a/tests/ref/fate/vp9-03-size-202x202
> +++ b/tests/ref/fate/vp9-03-size-202x202
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 202x202
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    61206, 610cef52d35e9c641f2b8c10489c3d12
>  0,          1,          1,        1,    61206, 1f84062e607d4798b0544739fe0da99c
> diff --git a/tests/ref/fate/vp9-03-size-202x208 b/tests/ref/fate/vp9-03-size-202x208
> index cc85d27..34d3754 100644
> --- a/tests/ref/fate/vp9-03-size-202x208
> +++ b/tests/ref/fate/vp9-03-size-202x208
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 202x208
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    63024, d2128e290be81bb0700ebe19e3faed4f
>  0,          1,          1,        1,    63024, dccaecb7e4ddb7e4224221a659af2a43
> diff --git a/tests/ref/fate/vp9-03-size-202x210 b/tests/ref/fate/vp9-03-size-202x210
> index d51fcc6..868ddf0 100644
> --- a/tests/ref/fate/vp9-03-size-202x210
> +++ b/tests/ref/fate/vp9-03-size-202x210
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 202x210
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    63630, e4663a28cabbfdd3815efda2d38debcc
>  0,          1,          1,        1,    63630, 3cc7dbec64e9f697f40d740a72c09fc7
> diff --git a/tests/ref/fate/vp9-03-size-202x224 b/tests/ref/fate/vp9-03-size-202x224
> index 0a36bd3..114cd7e 100644
> --- a/tests/ref/fate/vp9-03-size-202x224
> +++ b/tests/ref/fate/vp9-03-size-202x224
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 202x224
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    67872, 1d318f05310f6d40646f23c62c7eafe4
>  0,          1,          1,        1,    67872, 42870bd73e1a0c5d84b986db3d24f0f0
> diff --git a/tests/ref/fate/vp9-03-size-202x226 b/tests/ref/fate/vp9-03-size-202x226
> index 6bc31f9..9309c45 100644
> --- a/tests/ref/fate/vp9-03-size-202x226
> +++ b/tests/ref/fate/vp9-03-size-202x226
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 202x226
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    68478, 5aa0f439c58c6335cd86d4238a8c4b68
>  0,          1,          1,        1,    68478, 3616cc306ec05f89d9b0db63200e4abf
> diff --git a/tests/ref/fate/vp9-03-size-208x196 b/tests/ref/fate/vp9-03-size-208x196
> index b06557f..41f623b 100644
> --- a/tests/ref/fate/vp9-03-size-208x196
> +++ b/tests/ref/fate/vp9-03-size-208x196
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 208x196
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    61152, 6195975181969789e101a83a555d13f7
>  0,          1,          1,        1,    61152, 2aca5e3307d68a5e969564a943b8e723
> diff --git a/tests/ref/fate/vp9-03-size-208x198 b/tests/ref/fate/vp9-03-size-208x198
> index 84da7dd..d7f020c 100644
> --- a/tests/ref/fate/vp9-03-size-208x198
> +++ b/tests/ref/fate/vp9-03-size-208x198
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 208x198
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    61776, 1f1fa3cdf865d8c75183f4ba6203b675
>  0,          1,          1,        1,    61776, ead33ead8fea5bd5d831a79f4c75a590
> diff --git a/tests/ref/fate/vp9-03-size-208x200 b/tests/ref/fate/vp9-03-size-208x200
> index 0943abf..d143bee 100644
> --- a/tests/ref/fate/vp9-03-size-208x200
> +++ b/tests/ref/fate/vp9-03-size-208x200
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 208x200
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    62400, ff2dda3ddbe8b461d960baba0ad132bf
>  0,          1,          1,        1,    62400, d6935ac8f2250316f498e8f01afa04fd
> diff --git a/tests/ref/fate/vp9-03-size-208x202 b/tests/ref/fate/vp9-03-size-208x202
> index b181224..b39cf3d 100644
> --- a/tests/ref/fate/vp9-03-size-208x202
> +++ b/tests/ref/fate/vp9-03-size-208x202
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 208x202
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    63024, e5164f87feadf4b65257f578affc3e04
>  0,          1,          1,        1,    63024, 6aee5a3b6c3a096dfc1594762b2b248f
> diff --git a/tests/ref/fate/vp9-03-size-208x208 b/tests/ref/fate/vp9-03-size-208x208
> index 7bcbfdc..6e47eed 100644
> --- a/tests/ref/fate/vp9-03-size-208x208
> +++ b/tests/ref/fate/vp9-03-size-208x208
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 208x208
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    64896, 6bff7c1f4c5ef8412ebf669852c70de6
>  0,          1,          1,        1,    64896, fdfd7a2308de9509a41fed2880a8f0f5
> diff --git a/tests/ref/fate/vp9-03-size-208x210 b/tests/ref/fate/vp9-03-size-208x210
> index 7dbccf6..79c0677 100644
> --- a/tests/ref/fate/vp9-03-size-208x210
> +++ b/tests/ref/fate/vp9-03-size-208x210
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 208x210
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    65520, b15c7e98ddd137237b062cb51667522f
>  0,          1,          1,        1,    65520, 00c594c68b19ef39a79a38e86853dc64
> diff --git a/tests/ref/fate/vp9-03-size-208x224 b/tests/ref/fate/vp9-03-size-208x224
> index 70d64ea..1196f81 100644
> --- a/tests/ref/fate/vp9-03-size-208x224
> +++ b/tests/ref/fate/vp9-03-size-208x224
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 208x224
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    69888, 479d07bb96905ad7d5f0ec3ee12b41ba
>  0,          1,          1,        1,    69888, 4b6555aaed8e5a45879773f1bf87962e
> diff --git a/tests/ref/fate/vp9-03-size-208x226 b/tests/ref/fate/vp9-03-size-208x226
> index 7d9020c..5cc4e1d 100644
> --- a/tests/ref/fate/vp9-03-size-208x226
> +++ b/tests/ref/fate/vp9-03-size-208x226
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 208x226
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    70512, 33aa4af6153570518c59960a0c959053
>  0,          1,          1,        1,    70512, 024fa27dee80ad199528052aaa8d42c7
> diff --git a/tests/ref/fate/vp9-03-size-210x196 b/tests/ref/fate/vp9-03-size-210x196
> index a6813b4..52492f9 100644
> --- a/tests/ref/fate/vp9-03-size-210x196
> +++ b/tests/ref/fate/vp9-03-size-210x196
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 210x196
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    61740, 5c69f80da667bfd20394995e93e4cd2b
>  0,          1,          1,        1,    61740, 13363cd8e52ca8c1053db1c84c111bc9
> diff --git a/tests/ref/fate/vp9-03-size-210x198 b/tests/ref/fate/vp9-03-size-210x198
> index c14d20c..1fe7480 100644
> --- a/tests/ref/fate/vp9-03-size-210x198
> +++ b/tests/ref/fate/vp9-03-size-210x198
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 210x198
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    62370, d83ee2413e701ae405a2b74863d4c5a9
>  0,          1,          1,        1,    62370, f2ebc0f7dc171e0e5d2911c7ee2df5e1
> diff --git a/tests/ref/fate/vp9-03-size-210x200 b/tests/ref/fate/vp9-03-size-210x200
> index 873525b..099ac77 100644
> --- a/tests/ref/fate/vp9-03-size-210x200
> +++ b/tests/ref/fate/vp9-03-size-210x200
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 210x200
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    63000, 2465560246c1ee24d937cb9cbc1422f1
>  0,          1,          1,        1,    63000, 8926b628dcdf2182516822c7d0d778ec
> diff --git a/tests/ref/fate/vp9-03-size-210x202 b/tests/ref/fate/vp9-03-size-210x202
> index 91e229e..273131b 100644
> --- a/tests/ref/fate/vp9-03-size-210x202
> +++ b/tests/ref/fate/vp9-03-size-210x202
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 210x202
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    63630, 5d01848aee2b324f2e356627f9c39532
>  0,          1,          1,        1,    63630, b671fe34bc0e5a682baff929d26ea627
> diff --git a/tests/ref/fate/vp9-03-size-210x208 b/tests/ref/fate/vp9-03-size-210x208
> index a77ac5f..e5fd4d9 100644
> --- a/tests/ref/fate/vp9-03-size-210x208
> +++ b/tests/ref/fate/vp9-03-size-210x208
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 210x208
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    65520, 1156d318c00d299cf5bdc7e485966dab
>  0,          1,          1,        1,    65520, a8094f8f1e7e04e54251bee8c4c800ce
> diff --git a/tests/ref/fate/vp9-03-size-210x210 b/tests/ref/fate/vp9-03-size-210x210
> index fa9f158..0c5182b 100644
> --- a/tests/ref/fate/vp9-03-size-210x210
> +++ b/tests/ref/fate/vp9-03-size-210x210
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 210x210
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    66150, b65725c68978bdaaafdf735dfbafa9e3
>  0,          1,          1,        1,    66150, 35be2f16bd5dedc9d3f7a016f0d71701
> diff --git a/tests/ref/fate/vp9-03-size-210x224 b/tests/ref/fate/vp9-03-size-210x224
> index 1e1d225..a9d0ef5 100644
> --- a/tests/ref/fate/vp9-03-size-210x224
> +++ b/tests/ref/fate/vp9-03-size-210x224
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 210x224
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    70560, bb903b926c4b34ae336e21d65ad8fd25
>  0,          1,          1,        1,    70560, c4c0bc3b112487e994d22176817ace3c
> diff --git a/tests/ref/fate/vp9-03-size-210x226 b/tests/ref/fate/vp9-03-size-210x226
> index 5563363..a3b0c51 100644
> --- a/tests/ref/fate/vp9-03-size-210x226
> +++ b/tests/ref/fate/vp9-03-size-210x226
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 210x226
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    71190, 03707b2f5c392933f7336f380423a0a1
>  0,          1,          1,        1,    71190, b388553c79573555a3b660f5e36d4e36
> diff --git a/tests/ref/fate/vp9-03-size-224x196 b/tests/ref/fate/vp9-03-size-224x196
> index 1275e9e..d425159 100644
> --- a/tests/ref/fate/vp9-03-size-224x196
> +++ b/tests/ref/fate/vp9-03-size-224x196
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 224x196
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    65856, 3ffc096f1b42b4d319d4a9efbefc7625
>  0,          1,          1,        1,    65856, 78b3655d5cad30fa6b2c2d8fd29463de
> diff --git a/tests/ref/fate/vp9-03-size-224x198 b/tests/ref/fate/vp9-03-size-224x198
> index 39e0825..8d84942 100644
> --- a/tests/ref/fate/vp9-03-size-224x198
> +++ b/tests/ref/fate/vp9-03-size-224x198
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 224x198
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    66528, cf35dffc80946e87bb9d3e18aab9d320
>  0,          1,          1,        1,    66528, a76ac92f05e9b097f8ac5882e1ffe656
> diff --git a/tests/ref/fate/vp9-03-size-224x200 b/tests/ref/fate/vp9-03-size-224x200
> index 8fbc5b1..05a55ef 100644
> --- a/tests/ref/fate/vp9-03-size-224x200
> +++ b/tests/ref/fate/vp9-03-size-224x200
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 224x200
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    67200, 0819e6d715c9b4d94f05f63a7ca86199
>  0,          1,          1,        1,    67200, 9b9a4b01ed4c8a93687e45245b3092a3
> diff --git a/tests/ref/fate/vp9-03-size-224x202 b/tests/ref/fate/vp9-03-size-224x202
> index 3e212ac..10f0311 100644
> --- a/tests/ref/fate/vp9-03-size-224x202
> +++ b/tests/ref/fate/vp9-03-size-224x202
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 224x202
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    67872, e1e3b4af5910383ff6f66b6ab1a29544
>  0,          1,          1,        1,    67872, 8668ef92b72f35728ebb456665d48b95
> diff --git a/tests/ref/fate/vp9-03-size-224x208 b/tests/ref/fate/vp9-03-size-224x208
> index a925e1a..7645d6d 100644
> --- a/tests/ref/fate/vp9-03-size-224x208
> +++ b/tests/ref/fate/vp9-03-size-224x208
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 224x208
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    69888, 85f08afadfd1204d4131b9ee9c8cc10b
>  0,          1,          1,        1,    69888, f893de5432a082b3dffcf7499827f548
> diff --git a/tests/ref/fate/vp9-03-size-224x210 b/tests/ref/fate/vp9-03-size-224x210
> index 3c59459..ca2da1e 100644
> --- a/tests/ref/fate/vp9-03-size-224x210
> +++ b/tests/ref/fate/vp9-03-size-224x210
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 224x210
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    70560, 427421e5fd2087c6ff7b87a27982332f
>  0,          1,          1,        1,    70560, b68311fd44e189e4174ac357d5415068
> diff --git a/tests/ref/fate/vp9-03-size-224x224 b/tests/ref/fate/vp9-03-size-224x224
> index 610578b..fc618a3 100644
> --- a/tests/ref/fate/vp9-03-size-224x224
> +++ b/tests/ref/fate/vp9-03-size-224x224
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 224x224
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    75264, bedd5d2725ffff06a50e23841bc2dfb8
>  0,          1,          1,        1,    75264, 8c363f68b0b30f507563516aa99e23ac
> diff --git a/tests/ref/fate/vp9-03-size-224x226 b/tests/ref/fate/vp9-03-size-224x226
> index 874e595..733e543 100644
> --- a/tests/ref/fate/vp9-03-size-224x226
> +++ b/tests/ref/fate/vp9-03-size-224x226
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 224x226
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    75936, dca556e648a576b3973fbe4b34d0328c
>  0,          1,          1,        1,    75936, 34a49e4aba4aca5c76ab0f751341c32b
> diff --git a/tests/ref/fate/vp9-03-size-226x196 b/tests/ref/fate/vp9-03-size-226x196
> index 43d55b9..82cf6db 100644
> --- a/tests/ref/fate/vp9-03-size-226x196
> +++ b/tests/ref/fate/vp9-03-size-226x196
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 226x196
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    66444, 4757a31842453f806de2f2256329547e
>  0,          1,          1,        1,    66444, fe5fb955a4143091c5bfae7c4a4afe0f
> diff --git a/tests/ref/fate/vp9-03-size-226x198 b/tests/ref/fate/vp9-03-size-226x198
> index fe2c477..f7c93cc 100644
> --- a/tests/ref/fate/vp9-03-size-226x198
> +++ b/tests/ref/fate/vp9-03-size-226x198
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 226x198
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    67122, b97087eb8c53cf56dc44576912654fb2
>  0,          1,          1,        1,    67122, 219bb68a59dc166806a5b5689a943b66
> diff --git a/tests/ref/fate/vp9-03-size-226x200 b/tests/ref/fate/vp9-03-size-226x200
> index b16c531..4bb2fc7 100644
> --- a/tests/ref/fate/vp9-03-size-226x200
> +++ b/tests/ref/fate/vp9-03-size-226x200
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 226x200
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    67800, 0ae27db338f73f37eaed806b1c789593
>  0,          1,          1,        1,    67800, 3f69273752f43699a3bc7b22a88cc3aa
> diff --git a/tests/ref/fate/vp9-03-size-226x202 b/tests/ref/fate/vp9-03-size-226x202
> index 818038d..ee2cbed 100644
> --- a/tests/ref/fate/vp9-03-size-226x202
> +++ b/tests/ref/fate/vp9-03-size-226x202
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 226x202
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    68478, 0cd2876640e71de3a6df7839bd6f0b51
>  0,          1,          1,        1,    68478, f887db6839c0cddd1ea9ae6bfd2cc16d
> diff --git a/tests/ref/fate/vp9-03-size-226x208 b/tests/ref/fate/vp9-03-size-226x208
> index cda6f99..f18d3d5 100644
> --- a/tests/ref/fate/vp9-03-size-226x208
> +++ b/tests/ref/fate/vp9-03-size-226x208
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 226x208
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    70512, 6006cac6628cf9e7cea58aec07471b06
>  0,          1,          1,        1,    70512, f7e994921248b6933920c984880ec96c
> diff --git a/tests/ref/fate/vp9-03-size-226x210 b/tests/ref/fate/vp9-03-size-226x210
> index fa83e1d..b511c72 100644
> --- a/tests/ref/fate/vp9-03-size-226x210
> +++ b/tests/ref/fate/vp9-03-size-226x210
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 226x210
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    71190, a6c1b7686202f5cc64335f92be595309
>  0,          1,          1,        1,    71190, 3e573d4c693a39c5d6cd46b8873e99bb
> diff --git a/tests/ref/fate/vp9-03-size-226x224 b/tests/ref/fate/vp9-03-size-226x224
> index 50d81cb..27103a3 100644
> --- a/tests/ref/fate/vp9-03-size-226x224
> +++ b/tests/ref/fate/vp9-03-size-226x224
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 226x224
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    75936, 80fb3a643384386beadc0991f171669d
>  0,          1,          1,        1,    75936, 65a4a51163f49a75f8eeecd94cb2ba47
> diff --git a/tests/ref/fate/vp9-03-size-226x226 b/tests/ref/fate/vp9-03-size-226x226
> index 88b3c43..f3331d7 100644
> --- a/tests/ref/fate/vp9-03-size-226x226
> +++ b/tests/ref/fate/vp9-03-size-226x226
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 226x226
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    76614, f2370fc802dafdf5082beffc1907a9c6
>  0,          1,          1,        1,    76614, aad6de7b986234a1d621935b272501c9
> diff --git a/tests/ref/fate/vp9-05-resize b/tests/ref/fate/vp9-05-resize
> index 4a3cd09..f0da9b0 100644
> --- a/tests/ref/fate/vp9-05-resize
> +++ b/tests/ref/fate/vp9-05-resize
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 0/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 539e9964364c1db09ad18f2e01713799
>  0,          1,          1,        1,   152064, fb76e673ba2a5342bfed8a1523e0a425
> diff --git a/tests/ref/fate/vp9-06-bilinear b/tests/ref/fate/vp9-06-bilinear
> index b175195..2866441 100644
> --- a/tests/ref/fate/vp9-06-bilinear
> +++ b/tests/ref/fate/vp9-06-bilinear
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 818a5af531c921ae58dfedc75234f3c5
>  0,          1,          1,        1,   152064, f863f8c68b5c87c721d345c5a894336d
> diff --git a/tests/ref/fate/vp9-09-lf_deltas b/tests/ref/fate/vp9-09-lf_deltas
> index 733a70c..10a4f8a 100644
> --- a/tests/ref/fate/vp9-09-lf_deltas
> +++ b/tests/ref/fate/vp9-09-lf_deltas
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x240
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   126720, a83c7f4602f595fd09e97f8c8a7277ec
>  0,          1,          1,        1,   126720, 53e1a3fd44932883a8dd112bbb0e359f
> diff --git a/tests/ref/fate/vp9-10-show-existing-frame b/tests/ref/fate/vp9-10-show-existing-frame
> index 6a2c904..2ec5c87 100644
> --- a/tests/ref/fate/vp9-10-show-existing-frame
> +++ b/tests/ref/fate/vp9-10-show-existing-frame
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 18981342ec178e082519451062c3a67f
>  0,          3,          3,        1,   152064, 04ab9dbeac49ec31be58f6e671698e05
> diff --git a/tests/ref/fate/vp9-10-show-existing-frame2 b/tests/ref/fate/vp9-10-show-existing-frame2
> index b0fa669..7f903f9 100644
> --- a/tests/ref/fate/vp9-10-show-existing-frame2
> +++ b/tests/ref/fate/vp9-10-show-existing-frame2
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 382b12c33cd86b38758706b8ebca8a85
>  0,          1,          1,        1,   152064, 799544370b35c91711a5b49a28cf86a8
> diff --git a/tests/ref/fate/vp9-15-segkey_adpq b/tests/ref/fate/vp9-15-segkey_adpq
> index f12db8b..7ab4916 100644
> --- a/tests/ref/fate/vp9-15-segkey_adpq
> +++ b/tests/ref/fate/vp9-15-segkey_adpq
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 852x480
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   613440, d4f0e4b606ddb40b482aecb24cf3bc63
>  0,          1,          1,        1,   613440, 692ec092bc5928fa6430d056e883759a
> diff --git a/tests/ref/fate/vp9-16-intra-only b/tests/ref/fate/vp9-16-intra-only
> index 1e8d280..55b3779 100644
> --- a/tests/ref/fate/vp9-16-intra-only
> +++ b/tests/ref/fate/vp9-16-intra-only
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, d57529601178948afa4818c3c8938884
>  0,          1,          1,        1,   152064, d47e00250c45733d64af067a417bcd06
> diff --git a/tests/ref/fate/vp9-2pass-akiyo b/tests/ref/fate/vp9-2pass-akiyo
> index 2f32092..b89aa46 100644
> --- a/tests/ref/fate/vp9-2pass-akiyo
> +++ b/tests/ref/fate/vp9-2pass-akiyo
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, 043ce065a309514e1e8ebdcbb3c2458b
>  0,          1,          1,        1,   152064, 8579c9cffd95b11db86158e518b2e34a
> diff --git a/tests/ref/fate/vp9-parallelmode-akiyo b/tests/ref/fate/vp9-parallelmode-akiyo
> index 9668c54..0449f00 100644
> --- a/tests/ref/fate/vp9-parallelmode-akiyo
> +++ b/tests/ref/fate/vp9-parallelmode-akiyo
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, f5bc602db15c69545307e56990f9f9f7
>  0,          1,          1,        1,   152064, b56428b6f97669938c8b9b05458fca70
> diff --git a/tests/ref/fate/vp9-segmentation-aq-akiyo b/tests/ref/fate/vp9-segmentation-aq-akiyo
> index 5c931b6..4420dee 100644
> --- a/tests/ref/fate/vp9-segmentation-aq-akiyo
> +++ b/tests/ref/fate/vp9-segmentation-aq-akiyo
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, b208eac12f0ae74a812bc9e314bdfac7
>  0,          1,          1,        1,   152064, ebb2259451c3acf3ad6379d1f4092efb
> diff --git a/tests/ref/fate/vp9-segmentation-sf-akiyo b/tests/ref/fate/vp9-segmentation-sf-akiyo
> index 0fdb3f2..1ebd120 100644
> --- a/tests/ref/fate/vp9-segmentation-sf-akiyo
> +++ b/tests/ref/fate/vp9-segmentation-sf-akiyo
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1001/30000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   152064, f4e04a0f92fab3a52d858bb222807ac0
>  0,          1,          1,        1,   152064, 493cb96b8202a1518c6c9bdb848540e4
> diff --git a/tests/ref/fate/vp9-tiling-pedestrian b/tests/ref/fate/vp9-tiling-pedestrian
> index 2915323..4977a70 100644
> --- a/tests/ref/fate/vp9-tiling-pedestrian
> +++ b/tests/ref/fate/vp9-tiling-pedestrian
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/1000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        0,  3110400, 1e6c2e768a5107e57e6d626f0511193a
>  0,         40,         40,        0,  3110400, 972d3e2b5ee2e3b0907218a243e4cb7d
> diff --git a/tests/ref/fate/vp9-trac3849 b/tests/ref/fate/vp9-trac3849
> index 4d129b3..b1f9402 100644
> --- a/tests/ref/fate/vp9-trac3849
> +++ b/tests/ref/fate/vp9-trac3849
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/30
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 640x360
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   345600, c2ee30cb4529fcbd61938af1887e2b45
>  0,          1,          1,        1,   345600, 946e9bfee03777a07c122df038087d92
> diff --git a/tests/ref/fate/vp9-trac4359 b/tests/ref/fate/vp9-trac4359
> index cd271a7..8943143 100644
> --- a/tests/ref/fate/vp9-trac4359
> +++ b/tests/ref/fate/vp9-trac4359
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,  1382400, 2929e5318edee6cd6b24ede0c1015137
>  0,          1,          1,        1,  1382400, ca0d83b04297da33a1aa17129a9fe9c9
> diff --git a/tests/ref/fate/vp9p1-04-yuv422 b/tests/ref/fate/vp9p1-04-yuv422
> index 59abfb0..07381a5 100644
> --- a/tests/ref/fate/vp9p1-04-yuv422
> +++ b/tests/ref/fate/vp9p1-04-yuv422
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x90
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    28800, b81b8a8444ac6ce4a4807c37e0a44c8b
>  0,          1,          1,        1,    28800, 344458b82d35ea9944dc841643fc25c2
> diff --git a/tests/ref/fate/vp9p1-04-yuv440 b/tests/ref/fate/vp9p1-04-yuv440
> index 0c28f36..d3300b5 100644
> --- a/tests/ref/fate/vp9p1-04-yuv440
> +++ b/tests/ref/fate/vp9p1-04-yuv440
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x90
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    28800, 61157ad4fb02a254de8f34ae7b8915dc
>  0,          1,          1,        1,    28800, 9431337382bf90d40aa417e297ac05da
> diff --git a/tests/ref/fate/vp9p1-04-yuv444 b/tests/ref/fate/vp9p1-04-yuv444
> index e9559c6..8bc230d 100644
> --- a/tests/ref/fate/vp9p1-04-yuv444
> +++ b/tests/ref/fate/vp9p1-04-yuv444
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x288
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   304128, 859df7b3661783e337a16ee79f3c20bc
>  0,          1,          1,        1,   304128, 3b3ccf344cd5a478c4c1fa422497183d
> diff --git a/tests/ref/fate/vp9p2-20-10bit-yuv420 b/tests/ref/fate/vp9p2-20-10bit-yuv420
> index 297a178..1f433ac 100644
> --- a/tests/ref/fate/vp9p2-20-10bit-yuv420
> +++ b/tests/ref/fate/vp9p2-20-10bit-yuv420
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x90
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    43200, c3964ed9065de7f839b8d878444c6140
>  0,          1,          1,        1,    43200, 87595f7f53d6e84af9708dba72422cc4
> diff --git a/tests/ref/fate/vp9p2-20-12bit-yuv420 b/tests/ref/fate/vp9p2-20-12bit-yuv420
> index 1ba0094..b8f2414 100644
> --- a/tests/ref/fate/vp9p2-20-12bit-yuv420
> +++ b/tests/ref/fate/vp9p2-20-12bit-yuv420
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x90
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    43200, 8403bd5a381737e1c2d737047f6a5a0b
>  0,          1,          1,        1,    43200, 3c0bf7eecc3131e3598f6810d6b70539
> diff --git a/tests/ref/fate/vp9p3-20-10bit-yuv422 b/tests/ref/fate/vp9p3-20-10bit-yuv422
> index 5aaf056..2200495 100644
> --- a/tests/ref/fate/vp9p3-20-10bit-yuv422
> +++ b/tests/ref/fate/vp9p3-20-10bit-yuv422
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x90
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    57600, 18fed3eff623f0308561e5db0bc28691
>  0,          1,          1,        1,    57600, 3f22b2269cd53738e955c4b27ff6abce
> diff --git a/tests/ref/fate/vp9p3-20-10bit-yuv440 b/tests/ref/fate/vp9p3-20-10bit-yuv440
> index cd3f383..56769e9 100644
> --- a/tests/ref/fate/vp9p3-20-10bit-yuv440
> +++ b/tests/ref/fate/vp9p3-20-10bit-yuv440
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x90
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    57600, 504a347654ef41e568c484ab017f5387
>  0,          1,          1,        1,    57600, 6110f151a39144da5616227d44b81c21
> diff --git a/tests/ref/fate/vp9p3-20-10bit-yuv444 b/tests/ref/fate/vp9p3-20-10bit-yuv444
> index ca218b8..38113ef 100644
> --- a/tests/ref/fate/vp9p3-20-10bit-yuv444
> +++ b/tests/ref/fate/vp9p3-20-10bit-yuv444
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x90
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    86400, 06a4c4550dc31f75f842a4e65fc32398
>  0,          1,          1,        1,    86400, f7feda15d5c2babc1f6438c72d4900e4
> diff --git a/tests/ref/fate/vp9p3-20-12bit-yuv422 b/tests/ref/fate/vp9p3-20-12bit-yuv422
> index 1a8a83b..49b3337 100644
> --- a/tests/ref/fate/vp9p3-20-12bit-yuv422
> +++ b/tests/ref/fate/vp9p3-20-12bit-yuv422
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x90
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    57600, 442a6d932a163907303f1e08056b33b3
>  0,          1,          1,        1,    57600, 80b21954eb522f0140e2226a03062839
> diff --git a/tests/ref/fate/vp9p3-20-12bit-yuv440 b/tests/ref/fate/vp9p3-20-12bit-yuv440
> index f6e4cf1..df6ba5b 100644
> --- a/tests/ref/fate/vp9p3-20-12bit-yuv440
> +++ b/tests/ref/fate/vp9p3-20-12bit-yuv440
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x90
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    57600, 9c03fb4aa813522d9a44b3b309b85d19
>  0,          1,          1,        1,    57600, 73081beafa17bc23a170172e311c0f54
> diff --git a/tests/ref/fate/vp9p3-20-12bit-yuv444 b/tests/ref/fate/vp9p3-20-12bit-yuv444
> index 2e53221..7a14cfd 100644
> --- a/tests/ref/fate/vp9p3-20-12bit-yuv444
> +++ b/tests/ref/fate/vp9p3-20-12bit-yuv444
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/50
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x90
> +#sar 0: 1/1
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,    86400, d9500a2c9e0b6b44935de019c3583194
>  0,          1,          1,        1,    86400, 58edf3e69b332a2b62ca78a8dc99ea68
> diff --git a/tests/ref/fate/vqa-cc b/tests/ref/fate/vqa-cc
> index 8950f94..fd7bc70 100644
> --- a/tests/ref/fate/vqa-cc
> +++ b/tests/ref/fate/vqa-cc
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0x00000000
>  0,          1,          1,        1,   192000, 0x00000000
>  0,          2,          2,        1,   192000, 0x00000000
> diff --git a/tests/ref/fate/vqf-demux b/tests/ref/fate/vqf-demux
> index 3c1dd35..2d26a72 100644
> --- a/tests/ref/fate/vqf-demux
> +++ b/tests/ref/fate/vqf-demux
> @@ -1 +1 @@
> -084a9bf92d4096c8156d1fce50dac8b8
> +643ac05caf7ef16a8837933bf45281d5
> diff --git a/tests/ref/fate/wc3movie-xan b/tests/ref/fate/wc3movie-xan
> index 57b7f70..5812503 100644
> --- a/tests/ref/fate/wc3movie-xan
> +++ b/tests/ref/fate/wc3movie-xan
> @@ -1,5 +1,13 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x165
> +#sar 0: 0/1
>  #tb 1: 1/22050
> +#media_type 1: audio
> +#codec_id 1: pcm_s16le
> +#sample_rate 1: 22050
> +#channel_layout 1: 4
>  0,          0,          0,        1,   158400, 0x25aec781
>  1,          0,          0,     1470,     2940, 0x92cee2a6
>  0,          1,          1,        1,   158400, 0xda4dbf70
> diff --git a/tests/ref/fate/westwood-aud b/tests/ref/fate/westwood-aud
> index 9fab241..fedcd5d 100644
> --- a/tests/ref/fate/westwood-aud
> +++ b/tests/ref/fate/westwood-aud
> @@ -1,4 +1,8 @@
>  #tb 0: 1/22050
> +#media_type 0: audio
> +#codec_id 0: adpcm_ima_ws
> +#sample_rate 0: 22050
> +#channel_layout 0: 4
>  0,          0,          0,     1024,      512, 0x6694cc55
>  0,       1024,       1024,     1024,      512, 0xdbc5cb22
>  0,       2048,       2048,     1024,      512, 0x8e5bcbfd
> diff --git a/tests/ref/fate/wmv8-drm b/tests/ref/fate/wmv8-drm
> index 12d8fbb..d802b5e 100644
> --- a/tests/ref/fate/wmv8-drm
> +++ b/tests/ref/fate/wmv8-drm
> @@ -1,4 +1,8 @@
>  #tb 0: 1/24
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x176
> +#sar 0: 0/1
>  0,          0,          0,        1,    84480, 0x7760a00b
>  0,         29,         29,        1,    84480, 0xfe39a1db
>  0,         30,         30,        1,    84480, 0xd71961b4
> diff --git a/tests/ref/fate/wmv8-drm-nodec b/tests/ref/fate/wmv8-drm-nodec
> index 279c8b6..83aa92d 100644
> --- a/tests/ref/fate/wmv8-drm-nodec
> +++ b/tests/ref/fate/wmv8-drm-nodec
> @@ -1,7 +1,15 @@
>  #extradata 0:        4, 0x021800a2
>  #extradata 1:       46, 0x63d9043a
>  #tb 0: 1/1000
> +#media_type 0: video
> +#codec_id 0: wmv3
> +#dimensions 0: 320x176
> +#sar 0: 0/1
>  #tb 1: 1/1000
> +#media_type 1: audio
> +#codec_id 1: wmavoice
> +#sample_rate 1: 22050
> +#channel_layout 1: 4
>  0,          0,          0,        0,      282, 0x000d949a
>  1,          0,          0,        0,     1088, 0x5cd379bb
>  1,        435,        435,        0,     1088, 0x8dfa1368
> diff --git a/tests/ref/fate/wnv1 b/tests/ref/fate/wnv1
> index 4de35bf..5d48aed 100644
> --- a/tests/ref/fate/wnv1
> +++ b/tests/ref/fate/wnv1
> @@ -1,4 +1,8 @@
>  #tb 0: 13333/200000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 160x120
> +#sar 0: 0/1
>  0,          0,          0,        1,    38400, 0x4c3fdc2f
>  0,          1,          1,        1,    38400, 0x11c9d0cb
>  0,          2,          2,        1,    38400, 0x6c37fd7f
> diff --git a/tests/ref/fate/wtv-demux b/tests/ref/fate/wtv-demux
> index 904d78b..306fe00 100644
> --- a/tests/ref/fate/wtv-demux
> +++ b/tests/ref/fate/wtv-demux
> @@ -1,7 +1,15 @@
>  #extradata 0:       86, 0xc7ca09e5
>  #extradata 1:       22, 0x12dc010c
>  #tb 0: 1/10000000
> +#media_type 0: video
> +#codec_id 0: mpeg2video
> +#dimensions 0: 720x576
> +#sar 0: 64/45
>  #tb 1: 1/10000000
> +#media_type 1: audio
> +#codec_id 1: mp2
> +#sample_rate 1: 48000
> +#channel_layout 1: 3
>  1,         -2,         -2,   240000,      576, 0x9b6e1638
>  1,     239998,     239998,   240000,      576, 0x0ca91183
>  1,     479998,     479998,   240000,      576, 0xec6a180f
> diff --git a/tests/ref/fate/xbm10 b/tests/ref/fate/xbm10
> index 0038891..57a70d2 100644
> --- a/tests/ref/fate/xbm10
> +++ b/tests/ref/fate/xbm10
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 16x16
> +#sar 0: 0/1
>  0,          0,          0,        1,       32, 0x777f0737
> diff --git a/tests/ref/fate/xbm11 b/tests/ref/fate/xbm11
> index 77192b3..8385281 100644
> --- a/tests/ref/fate/xbm11
> +++ b/tests/ref/fate/xbm11
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 200x190
> +#sar 0: 0/1
>  0,          0,          0,        1,     4750, 0xc85f0b6d
> diff --git a/tests/ref/fate/xface b/tests/ref/fate/xface
> index 7f1f1e6..05a955c 100644
> --- a/tests/ref/fate/xface
> +++ b/tests/ref/fate/xface
> @@ -1,2 +1,6 @@
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 48x48
> +#sar 0: 0/1
>  0,          0,          0,        1,      288, 0x87ddaef8
> diff --git a/tests/ref/fate/xmv-demux b/tests/ref/fate/xmv-demux
> index d13270a..61eb232 100644
> --- a/tests/ref/fate/xmv-demux
> +++ b/tests/ref/fate/xmv-demux
> @@ -1,6 +1,14 @@
>  #extradata 0:        4, 0x015a00ad
>  #tb 0: 1/1000
> +#media_type 0: video
> +#codec_id 0: wmv2
> +#dimensions 0: 640x480
> +#sar 0: 0/1
>  #tb 1: 16/11025
> +#media_type 1: audio
> +#codec_id 1: adpcm_ima_wav
> +#sample_rate 1: 44100
> +#channel_layout 1: 3
>  0,          0,          0,        0,     1508, 0xefceba48
>  1,          0,          0,       83,     5976, 0xfa2c2db9
>  1,         83,         83,       83,     5976, 0x256b935c
> diff --git a/tests/ref/fate/xvid-custom-matrix b/tests/ref/fate/xvid-custom-matrix
> index c00a24b..be3e8fc 100644
> --- a/tests/ref/fate/xvid-custom-matrix
> +++ b/tests/ref/fate/xvid-custom-matrix
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 16/11
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   622080, 870e846b6b001d3e34fa87df96297e28
>  0,          1,          1,        1,   622080, de1a3dd9fcc32086ecdffd4591a8defa
> diff --git a/tests/ref/fate/xvid-idct b/tests/ref/fate/xvid-idct
> index 2fc93ee..7b657d3 100644
> --- a/tests/ref/fate/xvid-idct
> +++ b/tests/ref/fate/xvid-idct
> @@ -2,6 +2,10 @@
>  #version: 1
>  #hash: MD5
>  #tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 720x576
> +#sar 0: 16/11
>  #stream#, dts,        pts, duration,     size, hash
>  0,          0,          0,        1,   622080, 8fe318df973b5d7669e6d28ebf03b229
>  0,          1,          1,        1,   622080, 3568d92074e0298a2027f990004fe1a6
> diff --git a/tests/ref/fate/xxan-wc4 b/tests/ref/fate/xxan-wc4
> index 88dcc98..ae3bda3 100644
> --- a/tests/ref/fate/xxan-wc4
> +++ b/tests/ref/fate/xxan-wc4
> @@ -1,4 +1,8 @@
>  #tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x165
> +#sar 0: 0/1
>  0,          0,          0,        1,    79360, 0x8537821b
>  0,          1,          1,        1,    79360, 0x110c4343
>  0,          2,          2,        1,    79360, 0xa85105bb
> diff --git a/tests/ref/fate/yop b/tests/ref/fate/yop
> index 1920281..9d615b1 100644
> --- a/tests/ref/fate/yop
> +++ b/tests/ref/fate/yop
> @@ -1,4 +1,8 @@
>  #tb 0: 1/12
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 580x174
> +#sar 0: 1/2
>  0,          0,          0,        1,   302760, 0xf24dfa37
>  0,          1,          1,        1,   302760, 0xcedcbb6c
>  0,          2,          2,        1,   302760, 0xc87716a2
> diff --git a/tests/ref/fate/zerocodec b/tests/ref/fate/zerocodec
> index 2d368c3..10f9d4c 100644
> --- a/tests/ref/fate/zerocodec
> +++ b/tests/ref/fate/zerocodec
> @@ -1,4 +1,8 @@
>  #tb 0: 417083/10000000
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
>  0,          0,          0,        1,  1843200, 0x04154bd5
>  0,          1,          1,        1,  1843200, 0x3a872d04
>  0,          2,          2,        1,  1843200, 0x3b1304a0
> diff --git a/tests/ref/fate/zlib b/tests/ref/fate/zlib
> index 4ff76ff..007fe00 100644
> --- a/tests/ref/fate/zlib
> +++ b/tests/ref/fate/zlib
> @@ -1,2 +1,6 @@
>  #tb 0: 100/2997
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 352x240
> +#sar 0: 0/1
>  0,          0,          0,        1,   253440, 0x94af61e5
> diff --git a/tests/ref/fate/zmbv-15bit b/tests/ref/fate/zmbv-15bit
> index 384bb65..d3bee30 100644
> --- a/tests/ref/fate/zmbv-15bit
> +++ b/tests/ref/fate/zmbv-15bit
> @@ -1,4 +1,8 @@
>  #tb 0: 250000/1585341
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0x8f9020f2
>  0,          1,          1,        1,   192000, 0xbfba7f63
>  0,          2,          2,        1,   192000, 0x96b48d11
> diff --git a/tests/ref/fate/zmbv-16bit b/tests/ref/fate/zmbv-16bit
> index cb39014..d650e08 100644
> --- a/tests/ref/fate/zmbv-16bit
> +++ b/tests/ref/fate/zmbv-16bit
> @@ -1,4 +1,8 @@
>  #tb 0: 250000/1585341
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0xe869dc94
>  0,          1,          1,        1,   192000, 0x742932f2
>  0,          2,          2,        1,   192000, 0x742932f2
> diff --git a/tests/ref/fate/zmbv-32bit b/tests/ref/fate/zmbv-32bit
> index e1df123..ff4d69f 100644
> --- a/tests/ref/fate/zmbv-32bit
> +++ b/tests/ref/fate/zmbv-32bit
> @@ -1,4 +1,8 @@
>  #tb 0: 250000/1585341
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0x3ac10e8e
>  0,          1,          1,        1,   192000, 0xb772ee57
>  0,          2,          2,        1,   192000, 0x9b6e648a
> diff --git a/tests/ref/fate/zmbv-8bit b/tests/ref/fate/zmbv-8bit
> index 9f02ae3..7c2fab6 100644
> --- a/tests/ref/fate/zmbv-8bit
> +++ b/tests/ref/fate/zmbv-8bit
> @@ -1,4 +1,8 @@
>  #tb 0: 1000000/70086303
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 320x200
> +#sar 0: 0/1
>  0,          0,          0,        1,   192000, 0x5234b617
>  0,          1,          1,        1,   192000, 0x5234b617
>  0,          2,          2,        1,   192000, 0x5234b617

Please wait with this after TEP2 is merged.


More information about the ffmpeg-devel mailing list