package testdata import ( "git.gammaspectra.live/S.O.N.G/Ignite/color" "os" "path" "runtime" ) func init() { _, filename, _, _ := runtime.Caller(0) // The ".." may change depending on you folder structure dir := path.Join(path.Dir(filename), "..") err := os.Chdir(dir) if err != nil { panic(err) } } type TestSample struct { Path string Url string Type string Width, Height int Frames int ColorSpace color.Space SkipNotFound bool } var ( Y4M_Sintel_Trailer_720p24_YUV420_8bit = TestSample{ Path: "testdata/sintel_trailer_2k_720p24.y4m", // https://media.xiph.org/video/derf/y4m/sintel_trailer_2k_720p24.y4m Url: "https://git.gammaspectra.live/S.O.N.G/Video-Samples/media/branch/master/sintel_trailer_2k_720p24.y4m", Type: "y4m", Width: 1280, Height: 720, Frames: 1253, ColorSpace: color.MustColorFormatFromString("420jpeg"), } Y4M_Big_Buck_Bunny_360p24_YUV420_8bit = TestSample{ Path: "testdata/big_buck_bunny_360p24.y4m.xz", Url: "https://media.xiph.org/video/derf/y4m/big_buck_bunny_360p24.y4m.xz", Type: "y4m.xz", Width: 640, Height: 360, Frames: 14315, ColorSpace: color.MustColorFormatFromString("420jpeg"), SkipNotFound: true, } Y4M_Ducks_Take_Off_720p50_YUV444_8bit = TestSample{ Path: "testdata/ducks_take_off_444_720p50.y4m", // https://media.xiph.org/video/derf/y4m/ducks_take_off_444_720p50.y4m Url: "https://git.gammaspectra.live/S.O.N.G/Video-Samples/media/branch/master/ducks_take_off_444_720p50.y4m", Type: "y4m", Width: 1280, Height: 720, Frames: 500, ColorSpace: color.MustColorFormatFromString("444p8"), } Y4M_Ducks_Take_Off_720p50_YUV422_8bit = TestSample{ Path: "testdata/ducks_take_off_422_720p50.y4m", // https://media.xiph.org/video/derf/y4m/ducks_take_off_422_720p50.y4m Url: "https://git.gammaspectra.live/S.O.N.G/Video-Samples/media/branch/master/ducks_take_off_422_720p50.y4m", Type: "y4m", Width: 1280, Height: 720, Frames: 500, ColorSpace: color.MustColorFormatFromString("422p8"), } Y4M_Netflix_FoodMarket_2160p60_YUV420_10bit = TestSample{ Path: "testdata/Netflix_FoodMarket_4096x2160_60fps_10bit_420.y4m", Url: "https://media.xiph.org/video/derf/ElFuente/Netflix_FoodMarket_4096x2160_60fps_10bit_420.y4m", Type: "y4m", Width: 4096, Height: 2160, Frames: 600, ColorSpace: color.MustColorFormatFromString("420p10"), SkipNotFound: true, } AV1_Sintel_Trailer_720p24_YUV420_8bit_Low = TestSample{ Path: "testdata/sintel_trailer_2k_720p24_av1_low.ivf", Url: "https://git.gammaspectra.live/S.O.N.G/Video-Samples/media/branch/master/sintel_trailer_2k_720p24_av1_low.ivf", Type: "ivf", Width: 1280, Height: 720, Frames: 1253, ColorSpace: color.MustColorFormatFromString("420jpeg"), } AV1_Netflix_Sol_Levante_2160p24_YUV444_12bit_Lossy = TestSample{ Path: "testdata/netflix_sol_levante_2160p24_12bit_av1_lossy.ivf", Url: "https://git.gammaspectra.live/S.O.N.G/Video-Samples/media/branch/master/netflix_sol_levante_2160p24_12bit_av1_lossy.ivf", Type: "ivf", Width: 3840, Height: 2160, Frames: 6313, ColorSpace: color.MustColorFormatFromString("444p12"), } )