Changeset View
Standalone View
intern/ffmpeg/tests/ffmpeg_codecs.cc
| Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | |||||
| FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_PNG, AV_PIX_FMT_RGBA) | FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_PNG, AV_PIX_FMT_RGBA) | ||||
| FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_H264, AV_PIX_FMT_YUV420P) | FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_H264, AV_PIX_FMT_YUV420P) | ||||
| FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_MPEG4, AV_PIX_FMT_YUV420P) | FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_MPEG4, AV_PIX_FMT_YUV420P) | ||||
| FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_THEORA, AV_PIX_FMT_YUV420P) | FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_THEORA, AV_PIX_FMT_YUV420P) | ||||
| FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_DVVIDEO, AV_PIX_FMT_YUV420P) | FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_DVVIDEO, AV_PIX_FMT_YUV420P) | ||||
| FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_MPEG1VIDEO, AV_PIX_FMT_YUV420P) | FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_MPEG1VIDEO, AV_PIX_FMT_YUV420P) | ||||
| FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_MPEG2VIDEO, AV_PIX_FMT_YUV420P) | FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_MPEG2VIDEO, AV_PIX_FMT_YUV420P) | ||||
| FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_FLV1, AV_PIX_FMT_YUV420P) | FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_FLV1, AV_PIX_FMT_YUV420P) | ||||
| FFMPEG_TEST_VCODEC_ID(AV_CODEC_ID_AV1, AV_PIX_FMT_YUV420P) | |||||
| /* Audio codecs */ | /* Audio codecs */ | ||||
| FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_AAC, AV_SAMPLE_FMT_FLTP) | FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_AAC, AV_SAMPLE_FMT_FLTP) | ||||
| FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_AC3, AV_SAMPLE_FMT_FLTP) | FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_AC3, AV_SAMPLE_FMT_FLTP) | ||||
| FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_FLAC, AV_SAMPLE_FMT_S16) | FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_FLAC, AV_SAMPLE_FMT_S16) | ||||
| FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_MP2, AV_SAMPLE_FMT_S16) | FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_MP2, AV_SAMPLE_FMT_S16) | ||||
| FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_MP3, AV_SAMPLE_FMT_FLTP) | FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_MP3, AV_SAMPLE_FMT_FLTP) | ||||
| FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_OPUS, AV_SAMPLE_FMT_FLT) | FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_OPUS, AV_SAMPLE_FMT_FLT) | ||||
| FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_PCM_S16LE, AV_SAMPLE_FMT_S16) | FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_PCM_S16LE, AV_SAMPLE_FMT_S16) | ||||
| FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_VORBIS, AV_SAMPLE_FMT_FLTP) | FFMPEG_TEST_ACODEC_ID(AV_CODEC_ID_VORBIS, AV_SAMPLE_FMT_FLTP) | ||||
| /* Libraries we count on ffmpeg being linked against */ | /* Libraries we count on ffmpeg being linked against */ | ||||
| FFMPEG_TEST_VCODEC_NAME(libtheora, AV_PIX_FMT_YUV420P) | FFMPEG_TEST_VCODEC_NAME(libtheora, AV_PIX_FMT_YUV420P) | ||||
| FFMPEG_TEST_VCODEC_NAME(libx264, AV_PIX_FMT_YUV420P) | FFMPEG_TEST_VCODEC_NAME(libx264, AV_PIX_FMT_YUV420P) | ||||
| FFMPEG_TEST_VCODEC_NAME(libvpx, AV_PIX_FMT_YUV420P) | FFMPEG_TEST_VCODEC_NAME(libvpx, AV_PIX_FMT_YUV420P) | ||||
| FFMPEG_TEST_VCODEC_NAME(libopenjpeg, AV_PIX_FMT_YUV420P) | FFMPEG_TEST_VCODEC_NAME(libopenjpeg, AV_PIX_FMT_YUV420P) | ||||
| FFMPEG_TEST_VCODEC_NAME(libxvid, AV_PIX_FMT_YUV420P) | FFMPEG_TEST_VCODEC_NAME(libxvid, AV_PIX_FMT_YUV420P) | ||||
| /* aom's AV1 encoder is "libaom-av1". FFMPEG_TEST_VCODEC_NAME(libaom-av1, ...) | |||||
| * will not work because the dash will not work with the test macro. */ | |||||
| TEST(ffmpeg, libaom_av1_AV_PIX_FMT_YUV420P) | |||||
| { | |||||
| EXPECT_TRUE(test_codec_video_by_name("libaom-av1", AV_PIX_FMT_YUV420P)); | |||||
zeddb: Hmm, perhaps you can make this a `OR` statement?
So "AOM or rav1e or svt".
Because we already… | |||||
Done Inline ActionsThe ffmpeg tests here are to validate : are we shipping the libraries we think we are shipping? ie it is a "did lazydodo screw up the libs during the last update" test. having multiple options here that would have the test pass would defeat the purpose, these tests need to specifically test for the lib(s?) we decide to ship with. LazyDodo: The ffmpeg tests here are to validate : are we shipping the libraries we think we are shipping? | |||||
Done Inline Actions
I talked to Sybren about this. However I think (and Sybren agrees) that we should probably separate out our internal packaging checks from our regular test suite. Because I think our make test tests should check for intent and not for details. IE if we expect Blender to be able to encode/decode AV1, we shouldn't care too much about which library or version is used. As long as it works. Otherwise the test suite is not that useful for people outside of the official Blender platform maintainers. If we mix internal packaging checks with functionality checks, then it is very hard for outsiders and even our own developers to know if failing tests are to be taken seriously or not. However this would need us to do quite a bit of work to split out our internal packaging tests from our regular test suite. zeddb: > having multiple options here that would have the test pass would defeat the purpose
I talked… | |||||
| } | |||||
| FFMPEG_TEST_ACODEC_NAME(libvorbis, AV_SAMPLE_FMT_FLTP) | FFMPEG_TEST_ACODEC_NAME(libvorbis, AV_SAMPLE_FMT_FLTP) | ||||
| FFMPEG_TEST_ACODEC_NAME(libopus, AV_SAMPLE_FMT_FLT) | FFMPEG_TEST_ACODEC_NAME(libopus, AV_SAMPLE_FMT_FLT) | ||||
| FFMPEG_TEST_ACODEC_NAME(libmp3lame, AV_SAMPLE_FMT_FLTP) | FFMPEG_TEST_ACODEC_NAME(libmp3lame, AV_SAMPLE_FMT_FLTP) | ||||
Hmm, perhaps you can make this a OR statement?
So "AOM or rav1e or svt".
Because we already have fallback code for actual encoding. So if one of them is available it should be fine.
However perhaps we should perhaps make a special case for rav1e as that only provides the encoder and not a decoder.
So if this test is there to check if we can both encode and decode, we should also check for dav1d if rav1e is the only one available out of the three.