Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자" <d.kozinski@samsung.com>
To: "'FFmpeg development discussions and patches'" <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 2/2] Provided support for MPEG-5 EVC (Essential Video Coding) codec
Date: Wed, 3 Aug 2022 15:13:59 +0200
Message-ID: <004c01d8a73a$e5177090$af4651b0$@samsung.com> (raw)
In-Reply-To: <c829e89f-a6d8-722c-d4b1-81076b429085@gmail.com>



-----Original Message-----
From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of James Almer
Sent: Monday, August 1, 2022 4:05 PM
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 2/2] Provided support for MPEG-5 EVC (Essential Video Coding) codec

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?

####################################### 
David:
----------------------------------------------------------------
It seems that we need some information on how to do it in accordance with the rules of art. 
We have currently provided a minimalist version.
#######################################
> +
> +    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.

####################################### 
David:
----------------------------------------------------------------
It seems that we need some information on how to do it in accordance with the rules of art. 

I guess, that our minimalistic version is not enough and should be extended, but as I mentioned we need know-how, a piece of knowledge on how to do it, and what should be done.
#######################################

>            !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".

_______________________________________________
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".

  reply	other threads:[~2022-08-03 13:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220801092901eucas1p1f8d764e6269c88872566d616b74a6b99@eucas1p1.samsung.com>
2022-08-01  9:29 ` Dawid Kozinski
2022-08-01 14:04   ` James Almer
2022-08-03 13:13     ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자 [this message]
2022-08-08 12:47     ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
2022-08-01 19:30   ` Michael Niedermayer
2022-08-08 12:46     ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
     [not found] <CGME20220808123046eucas1p29b765ce70a123ffc01f34fca460bfc7a@eucas1p2.samsung.com>
2022-08-08 12:30 ` Dawid Kozinski
     [not found] <CGME20220811123648eucas1p1336fd2c107be031a4a274057bf20084f@eucas1p1.samsung.com>
2022-08-11 12:36 ` Dawid Kozinski
2022-08-11 21:05   ` Michael Niedermayer
2022-08-12  6:57     ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
2022-08-12  7:12     ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
2022-08-12 15:49       ` Michael Niedermayer
2022-08-13  7:06         ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
2022-08-13  7:10         ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
2022-08-18  9:00         ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
2022-08-12 10:24     ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
     [not found] <CGME20220812101852eucas1p1b2e5b0614d34d75e7dd7d5c601d0a31c@eucas1p1.samsung.com>
2022-08-12 10:18 ` Dawid Kozinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='004c01d8a73a$e5177090$af4651b0$@samsung.com' \
    --to=d.kozinski@samsung.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git