From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 6AC574382F for ; Mon, 1 Aug 2022 14:05:01 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4F97E68BACB; Mon, 1 Aug 2022 17:04:59 +0300 (EEST) Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2375068BAA2 for ; Mon, 1 Aug 2022 17:04:53 +0300 (EEST) Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-f2a4c51c45so13747850fac.9 for ; Mon, 01 Aug 2022 07:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=nU18hvKNGw9KQri4OUPk3LvHlkWWhTnn3KfFXdCSVT0=; b=VAaOEXC1hjabFwEZ24IJqRU5XO+1ATuFuVbi/2ZZfburxfElUEWPtSFVPQoCxZCnPq CU0UEw7a6rlJ2ZSoIWP4TFQ0yxe4z2QJZoV9fnWTSATMJlnoMkNJAreEB7dOZ30jj6Xd jMa/SR1Fx9OuxkYZxwBxmPZmHBWS11tsqxALH8HjDyd5rsRHTaG/kqTWOKWDn5ZCkoih JgVSesQzH1xWyKIPBUQsMFnqHGoBRtuWwuZvKEaGSMXZYzNxPpxd3ixJd8lm+hgACKJ0 jBIr0JAU6+6e/kFqYSa9WYwtpu+oOy9QbFTDCNjZ5wGrPdkzhcnOOEE/0ml7jPpIbR3C hbwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=nU18hvKNGw9KQri4OUPk3LvHlkWWhTnn3KfFXdCSVT0=; b=R8kfsxl7BJJF1LI4IboUdlj/0AwjnNdW/hUBFGDZ5sak9S0cLfb/dgS8DYZ5BOqnVx IogEamMVRubqqRuY2tVzjgWsfg29+P6P9x4fxHXhqqbQgoX4hjvhAKe7hemFdlOVOQE3 ASjJ/ZRZuk+phHjuvHJl/NAyCdwTHQajyYJLQ8VfkCh0KA5v1lfcStW30YuOSaIT9YLA mqNLbUClQqBQCVJMem1SsRD1t0UMYnC1gvQCdz3mGlgxhb6T4enCVkjcqiI+rzYN9nUr e4wOfpGHfoMffrrjrSyWR+EiizK5utKzcbKkJVD55I9xrAzcnGzwMjBQTioF2Ipw2fsz FpnQ== X-Gm-Message-State: AJIora8SFgfXB3dJUSJtRKI3Bl3BQhcUxpa/52L2Q+Sq8R4z6poMw3Jf v4IL9RJPSJD0LYxH7nw5eBERACMoBxg= X-Google-Smtp-Source: AGRyM1tLS9XhfHumnNG5EMdJs4iWVw5vLOrALyF82IyYPFXoZ+wnxWQBWTvUAZTJqB3fJTyTrZfGgw== X-Received: by 2002:a05:6870:58a9:b0:10d:7f19:349a with SMTP id be41-20020a05687058a900b0010d7f19349amr7932178oab.290.1659362691051; Mon, 01 Aug 2022 07:04:51 -0700 (PDT) Received: from [192.168.0.11] ([186.136.131.204]) by smtp.gmail.com with ESMTPSA id l14-20020a05683004ae00b0061c7ac52b75sm2836742otd.26.2022.08.01.07.04.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Aug 2022 07:04:50 -0700 (PDT) Message-ID: Date: Mon, 1 Aug 2022 11:04:49 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <002001d8a589$2272a170$6757e450$@samsung.com> From: James Almer In-Reply-To: <002001d8a589$2272a170$6757e450$@samsung.com> Subject: Re: [FFmpeg-devel] [PATCH 2/2] Provided support for MPEG-5 EVC (Essential Video Coding) codec X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 8/1/2022 6:29 AM, Dawid Kozinski wrote: > diff --git a/libavformat/movenc.c b/libavformat/movenc.c > index 5608afde42..d0b094c30d 100644 > --- a/libavformat/movenc.c > +++ b/libavformat/movenc.c > @@ -1392,6 +1392,16 @@ static int mov_write_hvcc_tag(AVIOContext *pb, MOVTrack *track) > return update_size(pb, pos); > } > > +static int mov_write_evcc_tag(AVIOContext *pb, MOVTrack *track) > +{ > + int64_t pos = avio_tell(pb); > + > + avio_wb32(pb, 0); > + ffio_wfourcc(pb, "evcC"); Is that it? That's all this atom contains? No structure containing a global SPS/PPS? Is there a spec anywhere defining this? > + > + return update_size(pb, pos); > +} > + > /* also used by all avid codecs (dv, imx, meridien) and their variants */ > static int mov_write_avid_tag(AVIOContext *pb, MOVTrack *track) > { > @@ -1641,6 +1651,16 @@ static int mov_get_h264_codec_tag(AVFormatContext *s, MOVTrack *track) > return tag; > } > > +static int mov_get_evc_codec_tag(AVFormatContext *s, MOVTrack *track) > +{ > + int tag = track->par->codec_tag; > + > + if (!tag) > + tag = MKTAG('e', 'v', 'c', 'i'); > + > + return tag; > +} > + > static const struct { > enum AVPixelFormat pix_fmt; > uint32_t tag; > @@ -1722,6 +1742,8 @@ static unsigned int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track) > tag = mov_get_mpeg2_xdcam_codec_tag(s, track); > else if (track->par->codec_id == AV_CODEC_ID_H264) > tag = mov_get_h264_codec_tag(s, track); > + else if (track->par->codec_id == AV_CODEC_ID_EVC) > + tag = mov_get_evc_codec_tag(s, track); > else if (track->par->codec_id == AV_CODEC_ID_DNXHD) > tag = mov_get_dnxhd_codec_tag(s, track); > else if (track->par->codec_type == AVMEDIA_TYPE_VIDEO) { > @@ -2280,6 +2302,9 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex > mov_write_avcc_tag(pb, track); > if (track->mode == MODE_IPOD) > mov_write_uuid_tag_ipod(pb); > + } > + else if (track->par->codec_id ==AV_CODEC_ID_EVC) { > + mov_write_evcc_tag(pb, track); > } else if (track->par->codec_id == AV_CODEC_ID_VP9) { > mov_write_vpcc_tag(mov->fc, pb, track); > } else if (track->par->codec_id == AV_CODEC_ID_AV1) { > @@ -6030,7 +6055,8 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt) > if ((par->codec_id == AV_CODEC_ID_DNXHD || > par->codec_id == AV_CODEC_ID_H264 || > par->codec_id == AV_CODEC_ID_HEVC || > - par->codec_id == AV_CODEC_ID_TRUEHD) && !trk->vos_len && > + par->codec_id == AV_CODEC_ID_TRUEHD || > + par->codec_id == AV_CODEC_ID_EVC) && !trk->vos_len && Why are you copying the first muxed packet's data (in the absence of extradata) into vos_data if you're seemingly doing nothing with it? I'd expect that's what the evcC tag should contain. > !TAG_IS_AVCI(trk->tag)) { > /* copy frame to create needed atoms */ > trk->vos_len = size; > @@ -7689,6 +7715,7 @@ static const AVCodecTag codec_mp4_tags[] = { > { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '3') }, > { AV_CODEC_ID_HEVC, MKTAG('h', 'e', 'v', '1') }, > { AV_CODEC_ID_HEVC, MKTAG('h', 'v', 'c', '1') }, > + { AV_CODEC_ID_EVC, MKTAG('e', 'v', 'c', '1') }, > { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'p', '4', 'v') }, > { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', '4', 'v') }, > { AV_CODEC_ID_MJPEG, MKTAG('m', 'p', '4', 'v') }, _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".