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55 LS_A_Orange_2 \ 56 LS_B_ORANGE_4 \ 57 LTRPSPS_A_Qualcomm_1 \ 58 MAXBINS_A_TI_4 \ 59 MAXBINS_B_TI_4 \ 60 MAXBINS_C_TI_4 \ 61 MERGE_A_TI_3 \ 62 MERGE_B_TI_3 \ 63 MERGE_C_TI_3 \ 64 MERGE_D_TI_3 \ 65 MERGE_E_TI_3 \ 66 MERGE_F_MTK_4 \ 67 MERGE_G_HHI_4 \ 68 MVCLIP_A_qualcomm_3 \ 69 MVDL1ZERO_A_docomo_3 \ 70 MVEDGE_A_qualcomm_3 \ 71 NoOutPrior_A_Qualcomm_1 \ 72 NoOutPrior_B_Qualcomm_1 \ 73 NUT_A_ericsson_5 \ 74 OPFLAG_A_Qualcomm_1 \ 75 OPFLAG_B_Qualcomm_1 \ 76 OPFLAG_C_Qualcomm_1 \ 77 PICSIZE_A_Bossen_1 \ 78 PICSIZE_B_Bossen_1 \ 79 PICSIZE_C_Bossen_1 \ 80 PICSIZE_D_Bossen_1 \ 81 PMERGE_A_TI_3 \ 82 PMERGE_B_TI_3 \ 83 PMERGE_C_TI_3 \ 84 PMERGE_D_TI_3 \ 85 PMERGE_E_TI_3 \ 86 POC_A_Bossen_3 \ 87 PPS_A_qualcomm_7 \ 88 PS_A_VIDYO_3 \ 89 PS_B_VIDYO_3 \ 90 RAP_A_docomo_4 \ 91 RAP_B_Bossen_1 \ 92 RPLM_A_qualcomm_4 \ 93 RPLM_B_qualcomm_4 \ 94 RPS_A_docomo_4 \ 95 RPS_B_qualcomm_5 \ 96 RPS_C_ericsson_5 \ 97 RPS_D_ericsson_6 \ 98 RPS_E_qualcomm_5 \ 99 RPS_F_docomo_1 \ 100 RQT_A_HHI_4 \ 101 RQT_B_HHI_4 \ 102 RQT_C_HHI_4 \ 103 RQT_D_HHI_4 \ 104 RQT_E_HHI_4 \ 105 RQT_F_HHI_4 \ 106 RQT_G_HHI_4 \ 107 SAO_A_MediaTek_4 \ 108 SAO_B_MediaTek_5 \ 109 SAO_C_Samsung_4 \ 110 SAO_C_Samsung_5 \ 111 SAO_D_Samsung_4 \ 112 SAO_D_Samsung_5 \ 113 SAO_E_Canon_4 \ 114 SAO_F_Canon_3 \ 115 SAO_G_Canon_3 \ 116 SDH_A_Orange_3 \ 117 SLICES_A_Rovi_3 \ 118 SLIST_A_Sony_4 \ 119 SLIST_B_Sony_8 \ 120 SLIST_C_Sony_3 \ 121 SLIST_D_Sony_9 \ 122 SLPPLP_A_VIDYO_1 \ 123 SLPPLP_A_VIDYO_2 \ 124 STRUCT_A_Samsung_5 \ 125 STRUCT_B_Samsung_4 \ 126 STRUCT_B_Samsung_6 \ 127 TILES_A_Cisco_2 \ 128 TILES_B_Cisco_1 \ 129 TMVP_A_MS_3 \ 130 TSCL_A_VIDYO_5 \ 131 TSCL_B_VIDYO_4 \ 132 TSKIP_A_MS_3 \ 133 TUSIZE_A_Samsung_1 \ 134 VPSID_A_VIDYO_1 \ 135 VPSID_A_VIDYO_2 \ 136 WP_A_Toshiba_3 \ 137 WP_B_Toshiba_3 \ 138 WPP_A_ericsson_MAIN_2 \ 139 WPP_B_ericsson_MAIN_2 \ 140 WPP_C_ericsson_MAIN_2 \ 141 WPP_D_ericsson_MAIN_2 \ 142 WPP_E_ericsson_MAIN_2 \ 143 WPP_F_ericsson_MAIN_2 \ 144 145HEVC_SAMPLES_10BIT = \ 146 DBLK_A_MAIN10_VIXS_3 \ 147 WP_A_MAIN10_Toshiba_3 \ 148 WP_MAIN10_B_Toshiba_3 \ 149 WPP_A_ericsson_MAIN10_2 \ 150 WPP_B_ericsson_MAIN10_2 \ 151 WPP_C_ericsson_MAIN10_2 \ 152 WPP_D_ericsson_MAIN10_2 \ 153 WPP_E_ericsson_MAIN10_2 \ 154 WPP_F_ericsson_MAIN10_2 \ 155 INITQP_B_Sony_1 \ 156 157HEVC_SAMPLES_422_10BIT = \ 158 ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1 \ 159 IPCM_A_RExt_NEC \ 160 161HEVC_SAMPLES_422_10BIN = \ 162 Main_422_10_A_RExt_Sony_1 \ 163 164HEVC_SAMPLES_422_10BIN_LARGE = \ 165 Main_422_10_B_RExt_Sony_1 \ 166 167HEVC_SAMPLES_444_8BIT = \ 168 QMATRIX_A_RExt_Sony_1 \ 169 170HEVC_SAMPLES_444_12BIT = \ 171 IPCM_B_RExt_NEC \ 172 PERSIST_RPARAM_A_RExt_Sony_1\ 173 PERSIST_RPARAM_A_RExt_Sony_3\ 174 175HEVC_SAMPLES_444_12BIT_LARGE = \ 176 SAO_A_RExt_MediaTek_1 \ 177 178 179# equivalent bitstreams 180# AMP_D_Hisilicon_3 -- AMP_D_Hisilicon 181# AMP_E_Hisilicon_3 -- AMP_E_Hisilicon 182# MVDL1ZERO_A_docomo_4 -- MVDL1ZERO_A_docomo_3 183# RAP_A_docomo_5 -- RAP_A_docomo_4 184# RAP_B_bossen_2 -- RAP_B_bossen_1 185# RPS_A_docomo_5 -- RPS_A_docomo_4 186# RPS_F_docomo_2 -- RPS_F_docomo_1 187 188# do not pass: 189# TSUNEQBD_A_MAIN10_Technicolor_2.bit (segfault mix 9-10bits) 190# PERSIST_RPARAM_A_RExt_Sony_1 (rext) 191 192 193define FATE_HEVC_TEST 194FATE_HEVC += fate-hevc-conformance-$(1) 195fate-hevc-conformance-$(1): CMD = framecrc -flags unaligned -i $(TARGET_SAMPLES)/hevc-conformance/$(1).bit -pix_fmt yuv420p 196endef 197 198define FATE_HEVC_TEST_10BIT 199FATE_HEVC += fate-hevc-conformance-$(1) 200fate-hevc-conformance-$(1): CMD = framecrc -flags unaligned -i $(TARGET_SAMPLES)/hevc-conformance/$(1).bit -pix_fmt yuv420p10le -vf scale 201endef 202 203define FATE_HEVC_TEST_422_10BIT 204FATE_HEVC += fate-hevc-conformance-$(1) 205fate-hevc-conformance-$(1): CMD = framecrc -flags unaligned -i $(TARGET_SAMPLES)/hevc-conformance/$(1).bit -pix_fmt yuv422p10le -vf scale 206endef 207 208define FATE_HEVC_TEST_422_10BIN 209FATE_HEVC += fate-hevc-conformance-$(1) 210fate-hevc-conformance-$(1): CMD = framecrc -flags unaligned -i $(TARGET_SAMPLES)/hevc-conformance/$(1).bin -pix_fmt yuv422p10le -vf scale 211endef 212 213define FATE_HEVC_TEST_422_10BIN_LARGE 214FATE_HEVC_LARGE += fate-hevc-conformance-$(1) 215fate-hevc-conformance-$(1): CMD = framecrc -flags unaligned -i $(TARGET_SAMPLES)/hevc-conformance/$(1).bin -pix_fmt yuv422p10le -vf scale 216endef 217 218define FATE_HEVC_TEST_444_8BIT 219FATE_HEVC += fate-hevc-conformance-$(1) 220fate-hevc-conformance-$(1): CMD = framecrc -flags unaligned -i $(TARGET_SAMPLES)/hevc-conformance/$(1).bit -pix_fmt yuv444p 221endef 222 223define FATE_HEVC_TEST_444_12BIT 224FATE_HEVC += fate-hevc-conformance-$(1) 225fate-hevc-conformance-$(1): CMD = framecrc -flags unaligned -i $(TARGET_SAMPLES)/hevc-conformance/$(1).bit -pix_fmt yuv444p12le -vf scale 226endef 227 228define FATE_HEVC_TEST_444_12BIT_LARGE 229FATE_HEVC_LARGE += fate-hevc-conformance-$(1) 230fate-hevc-conformance-$(1): CMD = framecrc -flags unaligned -i $(TARGET_SAMPLES)/hevc-conformance/$(1).bit -pix_fmt yuv444p12le -vf scale 231endef 232 233$(foreach N,$(HEVC_SAMPLES),$(eval $(call FATE_HEVC_TEST,$(N)))) 234$(foreach N,$(HEVC_SAMPLES_10BIT),$(eval $(call FATE_HEVC_TEST_10BIT,$(N)))) 235$(foreach N,$(HEVC_SAMPLES_422_10BIT),$(eval $(call FATE_HEVC_TEST_422_10BIT,$(N)))) 236$(foreach N,$(HEVC_SAMPLES_422_10BIN),$(eval $(call FATE_HEVC_TEST_422_10BIN,$(N)))) 237$(foreach N,$(HEVC_SAMPLES_422_10BIN_LARGE),$(eval $(call FATE_HEVC_TEST_422_10BIN_LARGE,$(N)))) 238$(foreach N,$(HEVC_SAMPLES_444_8BIT),$(eval $(call FATE_HEVC_TEST_444_8BIT,$(N)))) 239$(foreach N,$(HEVC_SAMPLES_444_12BIT),$(eval $(call FATE_HEVC_TEST_444_12BIT,$(N)))) 240$(foreach N,$(HEVC_SAMPLES_444_12BIT_LARGE),$(eval $(call FATE_HEVC_TEST_444_12BIT_LARGE,$(N)))) 241 242fate-hevc-paramchange-yuv420p-yuv420p10: CMD = framecrc -vsync 0 -i $(TARGET_SAMPLES)/hevc/paramchange_yuv420p_yuv420p10.hevc -sws_flags area+accurate_rnd+bitexact 243FATE_HEVC_LARGE += fate-hevc-paramchange-yuv420p-yuv420p10 244 245tests/data/hevc-mp4.mov: TAG = GEN 246tests/data/hevc-mp4.mov: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data 247 $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ 248 -i $(TARGET_SAMPLES)/hevc-conformance/WPP_A_ericsson_MAIN10_2.bit -c copy -flags +bitexact $(TARGET_PATH)/$@ -y 2>/dev/null 249 250FATE_HEVC-$(call ALLYES, HEVC_DEMUXER MOV_DEMUXER HEVC_MP4TOANNEXB_BSF MOV_MUXER HEVC_MUXER) += fate-hevc-bsf-mp4toannexb 251fate-hevc-bsf-mp4toannexb: tests/data/hevc-mp4.mov 252fate-hevc-bsf-mp4toannexb: CMD = md5 -i $(TARGET_PATH)/tests/data/hevc-mp4.mov -c:v copy -fflags +bitexact -f hevc 253fate-hevc-bsf-mp4toannexb: CMP = oneline 254fate-hevc-bsf-mp4toannexb: REF = 1873662a3af1848c37e4eb25722c8df9 255 256fate-hevc-skiploopfilter: CMD = framemd5 -skip_loop_filter nokey -i $(TARGET_SAMPLES)/hevc-conformance/SAO_D_Samsung_5.bit -sws_flags bitexact 257FATE_HEVC += fate-hevc-skiploopfilter 258 259FATE_HEVC-$(call DEMDEC, HEVC, HEVC) += $(FATE_HEVC) 260FATE_HEVC-$(call ALLYES, HEVC_DEMUXER HEVC_DECODER LARGE_TESTS) += $(FATE_HEVC_LARGE) 261 262# this sample has two stsd entries and needs to reload extradata 263FATE_HEVC-$(call DEMDEC, MOV, HEVC) += fate-hevc-extradata-reload 264 265fate-hevc-extradata-reload: CMD = framemd5 -i $(TARGET_SAMPLES)/hevc/extradata-reload-multi-stsd.mov -sws_flags bitexact 266 267fate-hevc-paired-fields: CMD = probeframes -show_entries frame=interlaced_frame,top_field_first $(TARGET_SAMPLES)/hevc/paired_fields.hevc 268FATE_HEVC_FFPROBE-$(call DEMDEC, HEVC, HEVC) += fate-hevc-paired-fields 269 270fate-hevc-monochrome-crop: CMD = probeframes -show_entries frame=width,height:stream=width,height $(TARGET_SAMPLES)/hevc/hevc-monochrome.hevc 271FATE_HEVC_FFPROBE-$(call DEMDEC, HEVC, HEVC) += fate-hevc-monochrome-crop 272 273fate-hevc-hdr10-plus-metadata: CMD = probeframes -show_entries frame=side_data_list $(TARGET_SAMPLES)/hevc/hdr10_plus_h265_sample.hevc 274FATE_HEVC_FFPROBE-$(call DEMDEC, HEVC, HEVC) += fate-hevc-hdr10-plus-metadata 275 276fate-hevc-two-first-slice: CMD = threads=2 framemd5 -i $(TARGET_SAMPLES)/hevc/two_first_slice.mp4 -sws_flags bitexact -t 00:02.00 -an 277FATE_HEVC-$(call DEMDEC, MOV, HEVC) += fate-hevc-two-first-slice 278 279fate-hevc-cabac-tudepth: CMD = framecrc -flags unaligned -i $(TARGET_SAMPLES)/hevc/cbf_cr_cb_TUDepth_4_circle.h265 -pix_fmt yuv444p 280FATE_HEVC-$(call DEMDEC, HEVC, HEVC) += fate-hevc-cabac-tudepth 281 282fate-hevc-small422chroma: CMD = framecrc -flags unaligned -i $(TARGET_SAMPLES)/hevc/food.hevc -pix_fmt yuv422p10le -vf scale 283FATE_HEVC-$(call DEMDEC, HEVC, HEVC) += fate-hevc-small422chroma 284 285FATE_SAMPLES_AVCONV += $(FATE_HEVC-yes) 286FATE_SAMPLES_FFPROBE += $(FATE_HEVC_FFPROBE-yes) 287 288fate-hevc: $(FATE_HEVC-yes) $(FATE_HEVC_FFPROBE-yes) 289