diff --git a/libavformat/cbs_av1.c b/libavformat/cbs_av1.c index efaed7dfd0..93bcbb878d 100644 --- a/libavformat/cbs_av1.c +++ b/libavformat/cbs_av1.c @@ -16,8 +16,5 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define CBS_AV1_OBU_TILE_LIST 0 -#define CBS_AV1_OBU_METADATA 0 -#define CBS_AV1_OBU_PADDING 0 -#include "cbs.h" +#include "cbs_av1.h" #include "libavcodec/cbs_av1.c" diff --git a/libavformat/cbs_av1.h b/libavformat/cbs_av1.h new file mode 100644 index 0000000000..0d5e28d388 --- /dev/null +++ b/libavformat/cbs_av1.h @@ -0,0 +1,30 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_CBS_AV1_H +#define AVFORMAT_CBS_AV1_H + +#include "cbs.h" + +#define CBS_AV1_OBU_TILE_LIST 0 +#define CBS_AV1_OBU_METADATA 0 +#define CBS_AV1_OBU_PADDING 0 + +#include "libavcodec/cbs_av1.h" + +#endif /* AVFORMAT_CBS_AV1_H */ diff --git a/libavformat/movenccenc.c b/libavformat/movenccenc.c index 4e1f31d2b5..4808b59773 100644 --- a/libavformat/movenccenc.c +++ b/libavformat/movenccenc.c @@ -21,7 +21,7 @@ #include "movenccenc.h" #include "libavcodec/av1_parse.h" #include "libavcodec/bytestream.h" -#include "libavcodec/cbs_av1.h" +#include "libavformat/cbs_av1.h" #include "libavutil/attributes.h" #include "libavutil/intreadwrite.h" #include "libavutil/mem.h" diff --git a/tests/fate/mov.mak b/tests/fate/mov.mak index 022e0214d6..ffe555bf74 100644 --- a/tests/fate/mov.mak +++ b/tests/fate/mov.mak @@ -208,6 +208,11 @@ fate-mov-mp4-fragmented-ttml-dfxp: CMD = transcode srt $(TARGET_SAMPLES)/sub/Sub "-f lavfi -i smptehdbars=duration=24.5245:size=320x180:rate=24000/1001,format=yuv420p" \ "" "" "data" +FATE_MOV_FFMPEG_SAMPLES-$(call REMUX, MP4 IVF, MOV_DEMUXER AV1_PARSER EXTRACT_EXTRADATA_BSF) += fate-mov-av1-cenc +fate-mov-av1-cenc: CMD = transcode ivf $(TARGET_SAMPLES)/av1/non_uniform_tiling.ivf mp4 \ + "-c:v copy -encryption_scheme cenc-aes-ctr -encryption_key 00112233445566778899aabbccddeeff -encryption_kid 00112233445566778899aabbccddeeff" \ + "-c:v copy" "" "" "-decryption_key 00112233445566778899aabbccddeeff" + # avif demuxing - still image with 1 item. FATE_MOV_FFMPEG_SAMPLES-$(call FRAMECRC, MOV, AV1, AV1_PARSER) \ += fate-mov-avif-demux-still-image-1-item diff --git a/tests/ref/fate/mov-av1-cenc b/tests/ref/fate/mov-av1-cenc new file mode 100644 index 0000000000..785ea598e3 --- /dev/null +++ b/tests/ref/fate/mov-av1-cenc @@ -0,0 +1,32 @@ +4c0d58049d04303b98cd7c07013a1183 *tests/data/fate/mov-av1-cenc.mp4 +39366 tests/data/fate/mov-av1-cenc.mp4 +#extradata 0: 17, 0x197103ea +#tb 0: 1/12288 +#media_type 0: video +#codec_id 0: av1 +#dimensions 0: 720x300 +#sar 0: 1/1 +0, 0, 0, 512, 17049, 0x6d66f097 +0, 512, 512, 512, 8365, 0x9c48024d, F=0x0 +0, 1024, 1024, 512, 77, 0x88251d4e, F=0x0 +0, 1536, 1536, 512, 232, 0x3c31706f, F=0x0 +0, 2048, 2048, 512, 245, 0x8195753f, F=0x0 +0, 2560, 2560, 512, 271, 0x134f86cc, F=0x0 +0, 3072, 3072, 512, 246, 0x04b777cf, F=0x0 +0, 3584, 3584, 512, 143, 0x6cbd43a3, F=0x0 +0, 4096, 4096, 512, 215, 0x88d66733, F=0x0 +0, 4608, 4608, 512, 83, 0xb2d22362, F=0x0 +0, 5120, 5120, 512, 50, 0x75d211e2, F=0x0 +0, 5632, 5632, 512, 5087, 0x505ec5f3, F=0x0 +0, 6144, 6144, 512, 242, 0x70fe6f2c, F=0x0 +0, 6656, 6656, 512, 366, 0xcb0caedc, F=0x0 +0, 7168, 7168, 512, 644, 0xf72e3623, F=0x0 +0, 7680, 7680, 512, 668, 0x0cff4537, F=0x0 +0, 8192, 8192, 512, 239, 0x364c77a4, F=0x0 +0, 8704, 8704, 512, 400, 0x7e3bbaef, F=0x0 +0, 9216, 9216, 512, 404, 0x175cb5db, F=0x0 +0, 9728, 9728, 512, 277, 0x113185c5, F=0x0 +0, 10240, 10240, 512, 46, 0x0c860cfa, F=0x0 +0, 10752, 10752, 512, 659, 0x501b392a, F=0x0 +0, 11264, 11264, 512, 478, 0x0503e8ec, F=0x0 +0, 11776, 11776, 512, 1132, 0x952a1543, F=0x0