[FFmpeg-cvslog] avformat/framecrc: enable new output

James Almer git at videolan.org
Wed Apr 13 19:40:27 CEST 2016


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Wed Apr 13 11:18:59 2016 -0300| [33aa8a62219d07f77f11f38dd71c5999e0f8e242] | committer: James Almer

avformat/framecrc: enable new output

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=33aa8a62219d07f77f11f38dd71c5999e0f8e242
---

 libavformat/framecrcenc.c                                      |    2 +-
 libavformat/uncodedframecrcenc.c                               |    2 +-
 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/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-rgb-scanline-float-b44                      |    4 ++++
 tests/ref/fate/exr-rgb-scanline-half-b44-12x8                  |    4 ++++
 tests/ref/fate/exr-rgb-scanline-half-b44-13x9                  |    4 ++++
 tests/ref/fate/exr-rgb-scanline-pxr24-float-12x8               |    4 ++++
 tests/ref/fate/exr-rgb-tile-float-raw-12x8                     |    4 ++++
 tests/ref/fate/exr-rgb-tile-float-raw-150x130                  |    4 ++++
 tests/ref/fate/exr-rgb-tile-half-raw-12x8                      |    4 ++++
 tests/ref/fate/exr-rgba-multiscanline-half-b44                 |    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-meta-4560-rotate0                        |    8 ++++++++
 tests/ref/fate/filter-mpdecimate                               |    4 ++++
 tests/ref/fate/filter-negate                                   |    4 ++++
 tests/ref/fate/filter-overlay                                  |    4 ++++
 tests/ref/fate/filter-overlay-dvdsub-2397                      |    8 ++++++++
 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/flv-demux                                       |    8 ++++++++
 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/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/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 ++++
 tests/ref/fate/h264-conformance-cabac_mot_fld0_full            |    4 ++++
 tests/ref/fate/h264-conformance-cabac_mot_frm0_full            |    4 ++++
 tests/ref/fate/h264-conformance-cabac_mot_mbaff0_full          |    4 ++++
 tests/ref/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 ++++
 tests/ref/fate/h264-conformance-cavlc_mot_fld0_full_b          |    4 ++++
 tests/ref/fate/h264-conformance-cavlc_mot_frm0_full_b          |    4 ++++
 tests/ref/fate/h264-conformance-cavlc_mot_mbaff0_full_b        |    4 ++++
 tests/ref/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 ++++
 tests/ref/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 ++++
 tests/ref/fate/h264-conformance-frext-frext01_jvc_d            |    4 ++++
 tests/ref/fate/h264-conformance-frext-frext02_jvc_c            |    4 ++++
 tests/ref/fate/h264-conformance-frext-frext1_panasonic_c       |    4 ++++
 tests/ref/fate/h264-conformance-frext-frext2_panasonic_b       |    4 ++++
 tests/ref/fate/h264-conformance-frext-frext3_panasonic_d       |    4 ++++
 tests/ref/fate/h264-conformance-frext-frext4_panasonic_a       |    4 ++++
 tests/ref/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 ++++
 tests/ref/fate/h264-conformance-frext-hcamff1_hhi_b            |    4 ++++
 tests/ref/fate/h264-conformance-frext-hi422fr10_sony_b         |    4 ++++
 tests/ref/fate/h264-conformance-frext-hi422fr13_sony_b         |    4 ++++
 tests/ref/fate/h264-conformance-frext-hi422fr1_sony_a          |    4 ++++
 tests/ref/fate/h264-conformance-frext-hi422fr6_sony_a          |    4 ++++
 tests/ref/fate/h264-conformance-frext-hpca_brcm_c              |    4 ++++
 tests/ref/fate/h264-conformance-frext-hpcadq_brcm_b            |    4 ++++
 tests/ref/fate/h264-conformance-frext-hpcafl_bcrm_c            |    4 ++++
 tests/ref/fate/h264-conformance-frext-hpcaflnl_bcrm_c          |    4 ++++
 tests/ref/fate/h264-conformance-frext-hpcalq_brcm_b            |    4 ++++
 tests/ref/fate/h264-conformance-frext-hpcamapalq_bcrm_b        |    4 ++++
 tests/ref/fate/h264-conformance-frext-hpcamolq_brcm_b          |    4 ++++
 tests/ref/fate/h264-conformance-frext-hpcanl_brcm_c            |    4 ++++
 tests/ref/fate/h264-conformance-frext-hpcaq2lq_brcm_b          |    4 ++++
 tests/ref/fate/h264-conformance-frext-hpcv_brcm_a              |    4 ++++
 tests/ref/fate/h264-conformance-frext-hpcvfl_bcrm_a            |    4 ++++
 tests/ref/fate/h264-conformance-frext-hpcvflnl_bcrm_a          |    4 ++++
 tests/ref/fate/h264-conformance-frext-hpcvmolq_brcm_b          |    4 ++++
 tests/ref/fate/h264-conformance-frext-hpcvnl_brcm_a            |    4 ++++
 tests/ref/fate/h264-conformance-frext-pph10i1_panasonic_a      |    4 ++++
 tests/ref/fate/h264-conformance-frext-pph10i2_panasonic_a      |    4 ++++
 tests/ref/fate/h264-conformance-frext-pph10i3_panasonic_a      |    4 ++++
 tests/ref/fate/h264-conformance-frext-pph10i4_panasonic_a      |    4 ++++
 tests/ref/fate/h264-conformance-frext-pph10i5_panasonic_a      |    4 ++++
 tests/ref/fate/h264-conformance-frext-pph10i6_panasonic_a      |    4 ++++
 tests/ref/fate/h264-conformance-frext-pph10i7_panasonic_a      |    4 ++++
 tests/ref/fate/h264-conformance-frext-pph422i1_panasonic_a     |    4 ++++
 tests/ref/fate/h264-conformance-frext-pph422i2_panasonic_a     |    4 ++++
 tests/ref/fate/h264-conformance-frext-pph422i3_panasonic_a     |    4 ++++
 tests/ref/fate/h264-conformance-frext-pph422i4_panasonic_a     |    4 ++++
 tests/ref/fate/h264-conformance-frext-pph422i5_panasonic_a     |    4 ++++
 tests/ref/fate/h264-conformance-frext-pph422i6_panasonic_a     |    4 ++++
 tests/ref/fate/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-direct-bff                                 |    4 ++++
 tests/ref/fate/h264-interlace-crop                             |    4 ++++
 tests/ref/fate/h264-lossless                                   |    4 ++++
 tests/ref/fate/h264-reinit-large_420_8-to-small_420_8          |    4 ++++
 tests/ref/fate/h264-reinit-small_420_8-to-large_444_10         |    4 ++++
 tests/ref/fate/h264-reinit-small_420_9-to-small_420_8          |    4 ++++
 tests/ref/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 ++++
 .../hevc-conformance-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 ++++
 tests/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 ++++
 tests/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 ++++
 tests/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 ++++
 tests/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 ++++
 tests/ref/fate/hevc-conformance-MVCLIP_A_qualcomm_3            |    4 ++++
 tests/ref/fate/hevc-conformance-MVDL1ZERO_A_docomo_3           |    4 ++++
 tests/ref/fate/hevc-conformance-MVEDGE_A_qualcomm_3            |    4 ++++
 tests/ref/fate/hevc-conformance-Main_422_10_A_RExt_Sony_1      |    4 ++++
 tests/ref/fate/hevc-conformance-Main_422_10_B_RExt_Sony_1      |    4 ++++
 tests/ref/fate/hevc-conformance-NUT_A_ericsson_5               |    4 ++++
 tests/ref/fate/hevc-conformance-NoOutPrior_A_Qualcomm_1        |    4 ++++
 tests/ref/fate/hevc-conformance-NoOutPrior_B_Qualcomm_1        |    4 ++++
 tests/ref/fate/hevc-conformance-OPFLAG_A_Qualcomm_1            |    4 ++++
 tests/ref/fate/hevc-conformance-OPFLAG_B_Qualcomm_1            |    4 ++++
 tests/ref/fate/hevc-conformance-OPFLAG_C_Qualcomm_1            |    4 ++++
 tests/ref/fate/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 ++++
 tests/ref/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 ++++
 tests/ref/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 ++++
 tests/ref/fate/hevc-conformance-WPP_A_ericsson_MAIN10_2        |    4 ++++
 tests/ref/fate/hevc-conformance-WPP_A_ericsson_MAIN_2          |    4 ++++
 tests/ref/fate/hevc-conformance-WPP_B_ericsson_MAIN10_2        |    4 ++++
 tests/ref/fate/hevc-conformance-WPP_B_ericsson_MAIN_2          |    4 ++++
 tests/ref/fate/hevc-conformance-WPP_C_ericsson_MAIN10_2        |    4 ++++
 tests/ref/fate/hevc-conformance-WPP_C_ericsson_MAIN_2          |    4 ++++
 tests/ref/fate/hevc-conformance-WPP_D_ericsson_MAIN10_2        |    4 ++++
 tests/ref/fate/hevc-conformance-WPP_D_ericsson_MAIN_2          |    4 ++++
 tests/ref/fate/hevc-conformance-WPP_E_ericsson_MAIN10_2        |    4 ++++
 tests/ref/fate/hevc-conformance-WPP_E_ericsson_MAIN_2          |    4 ++++
 tests/ref/fate/hevc-conformance-WPP_F_ericsson_MAIN10_2        |    4 ++++
 tests/ref/fate/hevc-conformance-WPP_F_ericsson_MAIN_2          |    4 ++++
 tests/ref/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 ++++
 tests/ref/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-delta                                    |    4 ++++
 tests/ref/fate/indeo2-intra                                    |    4 ++++
 tests/ref/fate/indeo3-1                                        |    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/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/oggopus-demux                                   |    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/rv20-1239                                       |    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/ts-demux                                        |    8 ++++++++
 tests/ref/fate/ts-opus-demux                                   |    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/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/vqa-cc                                          |    4 ++++
 tests/ref/fate/vqf-demux                                       |    2 +-
 tests/ref/fate/wav-ac3                                         |    4 ++++
 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/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 ++++
 960 files changed, 3990 insertions(+), 8 deletions(-)

diff --git a/libavformat/framecrcenc.c b/libavformat/framecrcenc.c
index 3533c52..a7d729a 100644
--- a/libavformat/framecrcenc.c
+++ b/libavformat/framecrcenc.c
@@ -39,7 +39,7 @@ static int framecrc_write_header(struct AVFormatContext *s)
         }
     }
 
-    return ff_framehash_write_header(s, 1);
+    return ff_framehash_write_header(s, 2);
 }
 
 static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
diff --git a/libavformat/uncodedframecrcenc.c b/libavformat/uncodedframecrcenc.c
index 76f8527..4269015 100644
--- a/libavformat/uncodedframecrcenc.c
+++ b/libavformat/uncodedframecrcenc.c
@@ -121,7 +121,7 @@ static void audio_frame_cksum(AVBPrint *bp, AVFrame *frame)
 
 static int write_header(struct AVFormatContext *s)
 {
-    return ff_framehash_write_header(s, 1);
+    return ff_framehash_write_header(s, 2);
 }
 
 static int write_frame(struct AVFormatContext *s, int stream_index,
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/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-rgb-scanline-float-b44 b/tests/ref/fate/exr-rgb-scanline-float-b44
index d8f3934..91b0e1f 100644
--- a/tests/ref/fate/exr-rgb-scanline-float-b44
+++ b/tests/ref/fate/exr-rgb-scanline-float-b44
@@ -1,2 +1,6 @@
 #tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 12x8
+#sar 0: 1/1
 0,          0,          0,        1,      576, 0x39c8e03e
diff --git a/tests/ref/fate/exr-rgb-scanline-half-b44-12x8 b/tests/ref/fate/exr-rgb-scanline-half-b44-12x8
index ce1e009..8464203 100644
--- a/tests/ref/fate/exr-rgb-scanline-half-b44-12x8
+++ b/tests/ref/fate/exr-rgb-scanline-half-b44-12x8
@@ -1,2 +1,6 @@
 #tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 12x8
+#sar 0: 1/1
 0,          0,          0,        1,      576, 0x506469f9
diff --git a/tests/ref/fate/exr-rgb-scanline-half-b44-13x9 b/tests/ref/fate/exr-rgb-scanline-half-b44-13x9
index e40608d..675d2f0 100644
--- a/tests/ref/fate/exr-rgb-scanline-half-b44-13x9
+++ b/tests/ref/fate/exr-rgb-scanline-half-b44-13x9
@@ -1,2 +1,6 @@
 #tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 13x9
+#sar 0: 1/1
 0,          0,          0,        1,      702, 0x6914838a
diff --git a/tests/ref/fate/exr-rgb-scanline-pxr24-float-12x8 b/tests/ref/fate/exr-rgb-scanline-pxr24-float-12x8
index 0f3a112..13946d8 100644
--- a/tests/ref/fate/exr-rgb-scanline-pxr24-float-12x8
+++ b/tests/ref/fate/exr-rgb-scanline-pxr24-float-12x8
@@ -1,2 +1,6 @@
 #tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 12x8
+#sar 0: 1/1
 0,          0,          0,        1,      576, 0x7120e072
diff --git a/tests/ref/fate/exr-rgb-tile-float-raw-12x8 b/tests/ref/fate/exr-rgb-tile-float-raw-12x8
index 1c20982..abe41b8 100644
--- a/tests/ref/fate/exr-rgb-tile-float-raw-12x8
+++ b/tests/ref/fate/exr-rgb-tile-float-raw-12x8
@@ -1,2 +1,6 @@
 #tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 12x8
+#sar 0: 1/1
 0,          0,          0,        1,      576, 0x6b950ce3
diff --git a/tests/ref/fate/exr-rgb-tile-float-raw-150x130 b/tests/ref/fate/exr-rgb-tile-float-raw-150x130
index 4efacaa..3ac5c28 100644
--- a/tests/ref/fate/exr-rgb-tile-float-raw-150x130
+++ b/tests/ref/fate/exr-rgb-tile-float-raw-150x130
@@ -1,2 +1,6 @@
 #tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 150x130
+#sar 0: 1/1
 0,          0,          0,        1,   117000, 0xabc5eab2
diff --git a/tests/ref/fate/exr-rgb-tile-half-raw-12x8 b/tests/ref/fate/exr-rgb-tile-half-raw-12x8
index e03753e..f59e248 100644
--- a/tests/ref/fate/exr-rgb-tile-half-raw-12x8
+++ b/tests/ref/fate/exr-rgb-tile-half-raw-12x8
@@ -1,2 +1,6 @@
 #tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 12x8
+#sar 0: 1/1
 0,          0,          0,        1,      576, 0x667903f5
diff --git a/tests/ref/fate/exr-rgba-multiscanline-half-b44 b/tests/ref/fate/exr-rgba-multiscanline-half-b44
index e82481d..4b9a88b 100644
--- a/tests/ref/fate/exr-rgba-multiscanline-half-b44
+++ b/tests/ref/fate/exr-rgba-multiscanline-half-b44
@@ -1,2 +1,6 @@
 #tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 935x251
+#sar 0: 1/1
 0,          0,          0,        1,  1877480, 0x6f28b860
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-meta-4560-rotate0 b/tests/ref/fate/filter-meta-4560-rotate0
index a7bb9ce..6e870c7 100644
--- a/tests/ref/fate/filter-meta-4560-rotate0
+++ b/tests/ref/fate/filter-meta-4560-rotate0
@@ -1,5 +1,13 @@
 #tb 0: 1/30
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 480x272
+#sar 0: 0/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,   195840, 0x0602351d
 1,          0,          0,     1024,     2048, 0x00000000
 1,       1024,       1024,     1024,     2048, 0xe6b00ffc
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-dvdsub-2397 b/tests/ref/fate/filter-overlay-dvdsub-2397
index 318f739..0e0444d 100644
--- a/tests/ref/fate/filter-overlay-dvdsub-2397
+++ b/tests/ref/fate/filter-overlay-dvdsub-2397
@@ -1,5 +1,13 @@
 #tb 0: 100/2997
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 720x480
+#sar 0: 1/1
 #tb 1: 1/1000
+#media_type 1: audio
+#codec_id 1: dts
+#sample_rate 1: 48000
+#channel_layout 1: 60f
 0,          0,          0,        1,   518400, 0x6b05d48a
 1,         27,         27,       10,     2013, 0x68e7b03a
 0,          1,          1,        1,   518400, 0x2c2219cd
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/flv-demux b/tests/ref/fate/flv-demux
index 5db2305..79ee263 100644
--- a/tests/ref/fate/flv-demux
+++ b/tests/ref/fate/flv-demux
@@ -1,7 +1,15 @@
 #extradata 0:       39, 0xf8aa0d44
 #extradata 1:        2, 0x00b600a3
 #tb 0: 1/1000
+#media_type 0: video
+#codec_id 0: h264
+#dimensions 0: 426x240
+#sar 0: 1/1
 #tb 1: 1/1000
+#media_type 1: audio
+#codec_id 1: aac
+#sample_rate 1: 22050
+#channel_layout 1: 3
 0,          0,          0,       33,      135, 0x78b33078, S=1,       39, 0xf8aa0d44
 1,          0,          0,       46,        9, 0x07bc01b8, S=1,        2, 0x00b600a3
 0,         33,         33,       33,       92, 0x0d891dd0, F=0x0
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/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/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-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-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-delta b/tests/ref/fate/indeo2-delta
index c197dcc..05a01fd 100644
--- a/tests/ref/fate/indeo2-delta
+++ b/tests/ref/fate/indeo2-delta
@@ -1,4 +1,8 @@
 #tb 0: 16567/250000
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 160x120
+#sar 0: 0/1
 0,          0,          0,        1,    21600, 0xa3e914dd
 0,          1,          1,        1,    21600, 0x367eb420
 0,          2,          2,        1,    21600, 0x527488e2
diff --git a/tests/ref/fate/indeo2-intra b/tests/ref/fate/indeo2-intra
index 9f80f35..0831d91 100644
--- a/tests/ref/fate/indeo2-intra
+++ b/tests/ref/fate/indeo2-intra
@@ -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-1 b/tests/ref/fate/indeo3-1
index 0f55649..386e530 100644
--- a/tests/ref/fate/indeo3-1
+++ b/tests/ref/fate/indeo3-1
@@ -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/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/oggopus-demux b/tests/ref/fate/oggopus-demux
index acbfa4b..4621af6 100644
--- a/tests/ref/fate/oggopus-demux
+++ b/tests/ref/fate/oggopus-demux
@@ -1,5 +1,9 @@
 #extradata 0:       19, 0x399c0471
 #tb 0: 1/48000
+#media_type 0: audio
+#codec_id 0: opus
+#sample_rate 0: 48000
+#channel_layout 0: 3
 0,       -356,       -356,      960,      402, 0x89b1c40f
 0,        604,        604,      960,      216, 0x7bf97146
 0,       1564,       1564,      960,      215, 0x6cb86d8b
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/rv20-1239 b/tests/ref/fate/rv20-1239
index 1c3f546..3be1b8b 100644
--- a/tests/ref/fate/rv20-1239
+++ b/tests/ref/fate/rv20-1239
@@ -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,    28800, 0xe41c0ee2
 0,          1,          1,        1,    28800, 0x08054520
 0,          2,          2,        1,    28800, 0x272b3ed7
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/ts-demux b/tests/ref/fate/ts-demux
index 1d867b3..c66e907 100644
--- a/tests/ref/fate/ts-demux
+++ b/tests/ref/fate/ts-demux
@@ -1,6 +1,14 @@
 #extradata 0:      150, 0xb4192fb9
 #tb 0: 1/90000
+#media_type 0: video
+#codec_id 0: mpeg2video
+#dimensions 0: 1280x720
+#sar 0: 1/1
 #tb 1: 1/90000
+#media_type 1: audio
+#codec_id 1: ac3
+#sample_rate 1: 48000
+#channel_layout 1: 60f
 1,          0,          0,     2880,     1536, 0x773ffeea, S=1,        1, 0x00bd00bd
 1,       2880,       2880,     2880,     1536, 0x6dc10748
 1,       5760,       5760,     2880,     1536, 0xbab5129c
diff --git a/tests/ref/fate/ts-opus-demux b/tests/ref/fate/ts-opus-demux
index 1d4126e..9d2da43 100644
--- a/tests/ref/fate/ts-opus-demux
+++ b/tests/ref/fate/ts-opus-demux
@@ -1,5 +1,9 @@
 #extradata 0:       30, 0x53be0347
 #tb 0: 1/90000
+#media_type 0: audio
+#codec_id 0: opus
+#sample_rate 0: 48000
+#channel_layout 0: 63f
 0,          0,          0,     1800,      744, 0x172b615b, S=1,        1, 0x00bd00bd
 0,       1800,       1800,     1800,      743, 0x3f5b673d, S=1,        1, 0x00bd00bd
 0,       3600,       3600,     1800,      747, 0xe54e735d, S=1,        1, 0x00bd00bd
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/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/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/wav-ac3 b/tests/ref/fate/wav-ac3
index 197eb65..fd27f74 100644
--- a/tests/ref/fate/wav-ac3
+++ b/tests/ref/fate/wav-ac3
@@ -1,4 +1,8 @@
 #tb 0: 1/44100
+#media_type 0: audio
+#codec_id 0: ac3
+#sample_rate 0: 44100
+#channel_layout 0: 60f
 0,          0,          0,     1536,     2786, 0xe2fd0f40
 0,       1536,       1536,     1536,     2786, 0x7a6207c2
 0,       3072,       3072,     1536,     2786, 0x7a6207c2
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 75b515f..5840129 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/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



More information about the ffmpeg-cvslog mailing list