Re: [FFmpeg-devel] [PATCH v24 6/9] avformat/mov_muxer: Extended MOV muxer to handle EVC video content

2023-06-27 Thread Wang Bin
James Almer  于2023年6月19日周一 10:43写道:

> On 6/18/2023 11:27 PM, Wang Bin wrote:
> > - Changes in mov_write_video_tag function to handle EVC elementary stream
> >> - Provided structure EVCDecoderConfigurationRecord that specifies the
> >> decoder configuration information for ISO/IEC 23094-1 video content
> >>
> >> Signed-off-by: Dawid Kozinski 
> >> ---
> >>   libavformat/Makefile|   2 +-
> >>   libavformat/evc.c   | 422 
> >>   libavformat/evc.h   |  44 +
> >>   libavformat/isom_tags.c |   2 +
> >>   libavformat/movenc.c|  33 
> >>   5 files changed, 502 insertions(+), 1 deletion(-)
> >>   create mode 100644 libavformat/evc.c
> >>   create mode 100644 libavformat/evc.h
> >>
> >> diff --git a/libavformat/Makefile b/libavformat/Makefile
> >> index 6e4231fda2..d3503196e3 100644
> >> --- a/libavformat/Makefile
> >> +++ b/libavformat/Makefile
> >> @@ -364,7 +364,7 @@ OBJS-$(CONFIG_MOV_DEMUXER)   += mov.o
> >> mov_chan.o mov_esds.o \
> >>   OBJS-$(CONFIG_MOV_MUXER) += movenc.o av1.o avc.o
> hevc.o
> >> vpcc.o \
> >>   movenchint.o mov_chan.o
> rtp.o
> >> \
> >>   movenccenc.o movenc_ttml.o
> >> rawutils.o \
> >> -dovi_isom.o
> >> +dovi_isom.o evc.o
> >>   OBJS-$(CONFIG_MP2_MUXER) += rawenc.o
> >>   OBJS-$(CONFIG_MP3_DEMUXER)   += mp3dec.o replaygain.o
> >>   OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o
> id3v2enc.o
> >>
> >
> > This breaks msvc build. golomb_tab.o is required in
> > OBJS-$(CONFIG_MOV_MUXER). otherwise i get this error
> >
> > 2023-06-18T12:48:08.5213414Z LD   libavformat/avformat-60.dll
> > 2023-06-18T12:48:08.6503045Z LINK : warning LNK4044: unrecognized
> > option '/-icf=safe'; ignored
> > 2023-06-18T12:48:08.8081443ZCreating library
> > libavformat/avformat.lib and object libavformat/avformat.exp
> > 2023-06-18T12:48:08.8219530Z evc.o : error LNK2001: unresolved
> > external symbol ff_golomb_vlc_len
> > 2023-06-18T12:48:08.8267361Z evc.o : error LNK2001: unresolved
> > external symbol ff_ue_golomb_vlc_code
> > 2023-06-18T12:48:09.0122434Z libavformat\avformat-60.dll : fatal error
> > LNK1120: 2 unresolved externals
> > 2023-06-18T12:48:09.0517997Z make: ***
> > [/d/a/avbuild/avbuild/ffmpeg-***/ffbuild/library.mak:119:
> > libavformat/avformat-60.dll] Error 96
> >
> >
> > full build log:
> >
> https://github.com/wang-bin/avbuild/actions/runs/5303646918/jobs/9599433665
>
> Should be fixed.
>

broken again, in commit d0fc1b3. why not adding  golomb_tab.o in makefile?

2023-06-27T02:21:02.4793190Z Undefined symbols for architecture x86_64:
2023-06-27T02:21:02.4793570Z   "_ff_golomb_vlc_len", referenced from:
2023-06-27T02:21:02.4793850Z   _get_ue_golomb_31 in evc.o
2023-06-27T02:21:02.4822020Z   "_ff_ue_golomb_vlc_code", referenced from:
2023-06-27T02:21:02.4822390Z   _get_ue_golomb_31 in evc.o
2023-06-27T02:21:02.4849070Z ld: symbol(s) not found for architecture x86_64


Regards
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v24 6/9] avformat/mov_muxer: Extended MOV muxer to handle EVC video content

2023-06-18 Thread James Almer

On 6/18/2023 11:27 PM, Wang Bin wrote:

- Changes in mov_write_video_tag function to handle EVC elementary stream

- Provided structure EVCDecoderConfigurationRecord that specifies the
decoder configuration information for ISO/IEC 23094-1 video content

Signed-off-by: Dawid Kozinski 
---
  libavformat/Makefile|   2 +-
  libavformat/evc.c   | 422 
  libavformat/evc.h   |  44 +
  libavformat/isom_tags.c |   2 +
  libavformat/movenc.c|  33 
  5 files changed, 502 insertions(+), 1 deletion(-)
  create mode 100644 libavformat/evc.c
  create mode 100644 libavformat/evc.h

diff --git a/libavformat/Makefile b/libavformat/Makefile
index 6e4231fda2..d3503196e3 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -364,7 +364,7 @@ OBJS-$(CONFIG_MOV_DEMUXER)   += mov.o
mov_chan.o mov_esds.o \
  OBJS-$(CONFIG_MOV_MUXER) += movenc.o av1.o avc.o hevc.o
vpcc.o \
  movenchint.o mov_chan.o rtp.o
\
  movenccenc.o movenc_ttml.o
rawutils.o \
-dovi_isom.o
+dovi_isom.o evc.o
  OBJS-$(CONFIG_MP2_MUXER) += rawenc.o
  OBJS-$(CONFIG_MP3_DEMUXER)   += mp3dec.o replaygain.o
  OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o id3v2enc.o



This breaks msvc build. golomb_tab.o is required in
OBJS-$(CONFIG_MOV_MUXER). otherwise i get this error

2023-06-18T12:48:08.5213414Z LD libavformat/avformat-60.dll
2023-06-18T12:48:08.6503045Z LINK : warning LNK4044: unrecognized
option '/-icf=safe'; ignored
2023-06-18T12:48:08.8081443ZCreating library
libavformat/avformat.lib and object libavformat/avformat.exp
2023-06-18T12:48:08.8219530Z evc.o : error LNK2001: unresolved
external symbol ff_golomb_vlc_len
2023-06-18T12:48:08.8267361Z evc.o : error LNK2001: unresolved
external symbol ff_ue_golomb_vlc_code
2023-06-18T12:48:09.0122434Z libavformat\avformat-60.dll : fatal error
LNK1120: 2 unresolved externals
2023-06-18T12:48:09.0517997Z make: ***
[/d/a/avbuild/avbuild/ffmpeg-***/ffbuild/library.mak:119:
libavformat/avformat-60.dll] Error 96


full build log:
https://github.com/wang-bin/avbuild/actions/runs/5303646918/jobs/9599433665


Should be fixed.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v24 6/9] avformat/mov_muxer: Extended MOV muxer to handle EVC video content

2023-06-18 Thread Wang Bin
- Changes in mov_write_video_tag function to handle EVC elementary stream
> - Provided structure EVCDecoderConfigurationRecord that specifies the
> decoder configuration information for ISO/IEC 23094-1 video content
>
> Signed-off-by: Dawid Kozinski 
> ---
>  libavformat/Makefile|   2 +-
>  libavformat/evc.c   | 422 
>  libavformat/evc.h   |  44 +
>  libavformat/isom_tags.c |   2 +
>  libavformat/movenc.c|  33 
>  5 files changed, 502 insertions(+), 1 deletion(-)
>  create mode 100644 libavformat/evc.c
>  create mode 100644 libavformat/evc.h
>
> diff --git a/libavformat/Makefile b/libavformat/Makefile
> index 6e4231fda2..d3503196e3 100644
> --- a/libavformat/Makefile
> +++ b/libavformat/Makefile
> @@ -364,7 +364,7 @@ OBJS-$(CONFIG_MOV_DEMUXER)   += mov.o
> mov_chan.o mov_esds.o \
>  OBJS-$(CONFIG_MOV_MUXER) += movenc.o av1.o avc.o hevc.o
> vpcc.o \
>  movenchint.o mov_chan.o rtp.o
> \
>  movenccenc.o movenc_ttml.o
> rawutils.o \
> -dovi_isom.o
> +dovi_isom.o evc.o
>  OBJS-$(CONFIG_MP2_MUXER) += rawenc.o
>  OBJS-$(CONFIG_MP3_DEMUXER)   += mp3dec.o replaygain.o
>  OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o id3v2enc.o
>

This breaks msvc build. golomb_tab.o is required in
OBJS-$(CONFIG_MOV_MUXER). otherwise i get this error

2023-06-18T12:48:08.5213414Z LD libavformat/avformat-60.dll
2023-06-18T12:48:08.6503045Z LINK : warning LNK4044: unrecognized
option '/-icf=safe'; ignored
2023-06-18T12:48:08.8081443ZCreating library
libavformat/avformat.lib and object libavformat/avformat.exp
2023-06-18T12:48:08.8219530Z evc.o : error LNK2001: unresolved
external symbol ff_golomb_vlc_len
2023-06-18T12:48:08.8267361Z evc.o : error LNK2001: unresolved
external symbol ff_ue_golomb_vlc_code
2023-06-18T12:48:09.0122434Z libavformat\avformat-60.dll : fatal error
LNK1120: 2 unresolved externals
2023-06-18T12:48:09.0517997Z make: ***
[/d/a/avbuild/avbuild/ffmpeg-***/ffbuild/library.mak:119:
libavformat/avformat-60.dll] Error 96


full build log:
https://github.com/wang-bin/avbuild/actions/runs/5303646918/jobs/9599433665
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v24 6/9] avformat/mov_muxer: Extended MOV muxer to handle EVC video content

2023-06-15 Thread Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff Engineer/Samsung Electronics





> -Original Message-
> From: ffmpeg-devel  On Behalf Of James
> Almer
> Sent: środa, 14 czerwca 2023 03:00
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH v24 6/9] avformat/mov_muxer: Extended
> MOV muxer to handle EVC video content
> 
> On 6/13/2023 9:23 PM, Michael Niedermayer wrote:
> > On Mon, Jun 12, 2023 at 02:30:27PM +0200, Dawid Kozinski wrote:
> >> - Changes in mov_write_video_tag function to handle EVC elementary
> >> stream
> >> - Provided structure EVCDecoderConfigurationRecord that specifies the
> >> decoder configuration information for ISO/IEC 23094-1 video content
> >>
> >> Signed-off-by: Dawid Kozinski 
> >> ---
> >>   libavformat/Makefile|   2 +-
> >>   libavformat/evc.c   | 422
> 
> >>   libavformat/evc.h   |  44 +
> >>   libavformat/isom_tags.c |   2 +
> >>   libavformat/movenc.c|  33 
> >>   5 files changed, 502 insertions(+), 1 deletion(-)
> >>   create mode 100644 libavformat/evc.c
> >>   create mode 100644 libavformat/evc.h
> >>
> >> diff --git a/libavformat/Makefile b/libavformat/Makefile index
> >> 6e4231fda2..d3503196e3 100644
> >> --- a/libavformat/Makefile
> >> +++ b/libavformat/Makefile
> >> @@ -364,7 +364,7 @@ OBJS-$(CONFIG_MOV_DEMUXER)   += mov.o
> mov_chan.o mov_esds.o \
> >>   OBJS-$(CONFIG_MOV_MUXER) += movenc.o av1.o avc.o
hevc.o
> vpcc.o \
> >>   movenchint.o mov_chan.o
rtp.o \
> >>   movenccenc.o
movenc_ttml.o rawutils.o \
> >> -dovi_isom.o
> >> +dovi_isom.o evc.o
> >>   OBJS-$(CONFIG_MP2_MUXER) += rawenc.o
> >>   OBJS-$(CONFIG_MP3_DEMUXER)   += mp3dec.o replaygain.o
> >>   OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o
id3v2enc.o
> >> diff --git a/libavformat/evc.c b/libavformat/evc.c new file mode
> >> 100644 index 00..431cb107e3
> >> --- /dev/null
> >> +++ b/libavformat/evc.c
> >> @@ -0,0 +1,422 @@
> >> +/*
> >> + * EVC helper functions for muxers
> >> + * Copyright (c) 2022 Dawid Kozinski 
> >> + *
> >> + * 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  */
> >
> > [...]
> >
> >> +nalu_type = ff_evc_get_nalu_type(data, bytes_to_read, pb);
> >
> > functions shared between libavcodec and libavformat need an
> > av*/avpriv* prefix otherwise linking will fail with shared libs as ff*
> > isnt exported
> 
> It's small enough that it can go in the header instead. That way we save
one
> unnecessary exported symbol. Same with ff_evc_read_nal_unit_length().

Done (v26)

> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://protect2.fireeye.com/v1/url?k=5297bb74-33ec11fc-5296303b-
> 74fe4860018a-ffe4f237f8ba290d=1=351d993e-ef97-4840-aeb8-
> 4fd043541ed8=https%3A%2F%2Fffmpeg.org%2Fmailman%2Flistinfo%2Fffmp
> eg-devel
> 
> To unsubscribe, visit link above, or email ffmpeg-devel-requ...@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-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v24 6/9] avformat/mov_muxer: Extended MOV muxer to handle EVC video content

2023-06-15 Thread Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff Engineer/Samsung Electronics





> -Original Message-
> From: ffmpeg-devel  On Behalf Of
> Michael Niedermayer
> Sent: środa, 14 czerwca 2023 02:23
> To: FFmpeg development discussions and patches 
> Subject: Re: [FFmpeg-devel] [PATCH v24 6/9] avformat/mov_muxer: Extended
> MOV muxer to handle EVC video content
> 
> On Mon, Jun 12, 2023 at 02:30:27PM +0200, Dawid Kozinski wrote:
> > - Changes in mov_write_video_tag function to handle EVC elementary
> > stream
> > - Provided structure EVCDecoderConfigurationRecord that specifies the
> > decoder configuration information for ISO/IEC 23094-1 video content
> >
> > Signed-off-by: Dawid Kozinski 
> > ---
> >  libavformat/Makefile|   2 +-
> >  libavformat/evc.c   | 422 
> >  libavformat/evc.h   |  44 +
> >  libavformat/isom_tags.c |   2 +
> >  libavformat/movenc.c|  33 
> >  5 files changed, 502 insertions(+), 1 deletion(-)  create mode 100644
> > libavformat/evc.c  create mode 100644 libavformat/evc.h
> >
> > diff --git a/libavformat/Makefile b/libavformat/Makefile index
> > 6e4231fda2..d3503196e3 100644
> > --- a/libavformat/Makefile
> > +++ b/libavformat/Makefile
> > @@ -364,7 +364,7 @@ OBJS-$(CONFIG_MOV_DEMUXER)   += mov.o
> mov_chan.o mov_esds.o \
> >  OBJS-$(CONFIG_MOV_MUXER) += movenc.o av1.o avc.o hevc.o
> vpcc.o \
> >  movenchint.o mov_chan.o
rtp.o \
> >  movenccenc.o movenc_ttml.o
rawutils.o \
> > -dovi_isom.o
> > +dovi_isom.o evc.o
> >  OBJS-$(CONFIG_MP2_MUXER) += rawenc.o
> >  OBJS-$(CONFIG_MP3_DEMUXER)   += mp3dec.o replaygain.o
> >  OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o
id3v2enc.o
> > diff --git a/libavformat/evc.c b/libavformat/evc.c new file mode
> > 100644 index 00..431cb107e3
> > --- /dev/null
> > +++ b/libavformat/evc.c
> > @@ -0,0 +1,422 @@
> > +/*
> > + * EVC helper functions for muxers
> > + * Copyright (c) 2022 Dawid Kozinski 
> > + *
> > + * 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  */
> 
> [...]
> 
> > +nalu_type = ff_evc_get_nalu_type(data, bytes_to_read, pb);
> 
> functions shared between libavcodec and libavformat need an av*/avpriv*
> prefix otherwise linking will fail with shared libs as ff* isnt exported
> 
> 
Done (v26)
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> Many that live deserve death. And some that die deserve life. Can you give
it to
> them? Then do not be too eager to deal out death in judgement. For even
the
> very wise cannot see all ends. -- Gandalf


___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v24 6/9] avformat/mov_muxer: Extended MOV muxer to handle EVC video content

2023-06-15 Thread Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff Engineer/Samsung Electronics





> -Original Message-
> From: ffmpeg-devel  On Behalf Of
> Michael Niedermayer
> Sent: środa, 14 czerwca 2023 02:23
> To: FFmpeg development discussions and patches 
> Subject: Re: [FFmpeg-devel] [PATCH v24 6/9] avformat/mov_muxer: Extended
> MOV muxer to handle EVC video content
> 
> On Mon, Jun 12, 2023 at 02:30:27PM +0200, Dawid Kozinski wrote:
> > - Changes in mov_write_video_tag function to handle EVC elementary
> > stream
> > - Provided structure EVCDecoderConfigurationRecord that specifies the
> > decoder configuration information for ISO/IEC 23094-1 video content
> >
> > Signed-off-by: Dawid Kozinski 
> > ---
> >  libavformat/Makefile|   2 +-
> >  libavformat/evc.c   | 422 
> >  libavformat/evc.h   |  44 +
> >  libavformat/isom_tags.c |   2 +
> >  libavformat/movenc.c|  33 
> >  5 files changed, 502 insertions(+), 1 deletion(-)  create mode 100644
> > libavformat/evc.c  create mode 100644 libavformat/evc.h
> >
> > diff --git a/libavformat/Makefile b/libavformat/Makefile index
> > 6e4231fda2..d3503196e3 100644
> > --- a/libavformat/Makefile
> > +++ b/libavformat/Makefile
> > @@ -364,7 +364,7 @@ OBJS-$(CONFIG_MOV_DEMUXER)   += mov.o
> mov_chan.o mov_esds.o \
> >  OBJS-$(CONFIG_MOV_MUXER) += movenc.o av1.o avc.o hevc.o
> vpcc.o \
> >  movenchint.o mov_chan.o
rtp.o \
> >  movenccenc.o movenc_ttml.o
rawutils.o \
> > -dovi_isom.o
> > +dovi_isom.o evc.o
> >  OBJS-$(CONFIG_MP2_MUXER) += rawenc.o
> >  OBJS-$(CONFIG_MP3_DEMUXER)   += mp3dec.o replaygain.o
> >  OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o
id3v2enc.o
> > diff --git a/libavformat/evc.c b/libavformat/evc.c new file mode
> > 100644 index 00..431cb107e3
> > --- /dev/null
> > +++ b/libavformat/evc.c
> > @@ -0,0 +1,422 @@
> > +/*
> > + * EVC helper functions for muxers
> > + * Copyright (c) 2022 Dawid Kozinski 
> > + *
> > + * 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  */
> 
> [...]
> 
> > +nalu_type = ff_evc_get_nalu_type(data, bytes_to_read, pb);
> 
> functions shared between libavcodec and libavformat need an av*/avpriv*
> prefix otherwise linking will fail with shared libs as ff* isnt exported
> 
Michael, thank you for your code review.
I've just pushed new patchset (v25) that fixes prefixes for functions shared
between libavcoded and libavformat.

> 
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> Many that live deserve death. And some that die deserve life. Can you give
it to
> them? Then do not be too eager to deal out death in judgement. For even
the
> very wise cannot see all ends. -- Gandalf


___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v24 6/9] avformat/mov_muxer: Extended MOV muxer to handle EVC video content

2023-06-15 Thread Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff Engineer/Samsung Electronics





> -Original Message-
> From: ffmpeg-devel  On Behalf Of James
> Almer
> Sent: środa, 14 czerwca 2023 03:00
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH v24 6/9] avformat/mov_muxer: Extended
> MOV muxer to handle EVC video content
> 
> On 6/13/2023 9:23 PM, Michael Niedermayer wrote:
> > On Mon, Jun 12, 2023 at 02:30:27PM +0200, Dawid Kozinski wrote:
> >> - Changes in mov_write_video_tag function to handle EVC elementary
> >> stream
> >> - Provided structure EVCDecoderConfigurationRecord that specifies the
> >> decoder configuration information for ISO/IEC 23094-1 video content
> >>
> >> Signed-off-by: Dawid Kozinski 
> >> ---
> >>   libavformat/Makefile|   2 +-
> >>   libavformat/evc.c   | 422
> 
> >>   libavformat/evc.h   |  44 +
> >>   libavformat/isom_tags.c |   2 +
> >>   libavformat/movenc.c|  33 
> >>   5 files changed, 502 insertions(+), 1 deletion(-)
> >>   create mode 100644 libavformat/evc.c
> >>   create mode 100644 libavformat/evc.h
> >>
> >> diff --git a/libavformat/Makefile b/libavformat/Makefile index
> >> 6e4231fda2..d3503196e3 100644
> >> --- a/libavformat/Makefile
> >> +++ b/libavformat/Makefile
> >> @@ -364,7 +364,7 @@ OBJS-$(CONFIG_MOV_DEMUXER)   += mov.o
> mov_chan.o mov_esds.o \
> >>   OBJS-$(CONFIG_MOV_MUXER) += movenc.o av1.o avc.o
hevc.o
> vpcc.o \
> >>   movenchint.o mov_chan.o
rtp.o \
> >>   movenccenc.o
movenc_ttml.o rawutils.o \
> >> -dovi_isom.o
> >> +dovi_isom.o evc.o
> >>   OBJS-$(CONFIG_MP2_MUXER) += rawenc.o
> >>   OBJS-$(CONFIG_MP3_DEMUXER)   += mp3dec.o replaygain.o
> >>   OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o
id3v2enc.o
> >> diff --git a/libavformat/evc.c b/libavformat/evc.c new file mode
> >> 100644 index 00..431cb107e3
> >> --- /dev/null
> >> +++ b/libavformat/evc.c
> >> @@ -0,0 +1,422 @@
> >> +/*
> >> + * EVC helper functions for muxers
> >> + * Copyright (c) 2022 Dawid Kozinski 
> >> + *
> >> + * 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  */
> >
> > [...]
> >
> >> +nalu_type = ff_evc_get_nalu_type(data, bytes_to_read, pb);
> >
> > functions shared between libavcodec and libavformat need an
> > av*/avpriv* prefix otherwise linking will fail with shared libs as ff*
> > isnt exported
> 
> It's small enough that it can go in the header instead. That way we save
one
> unnecessary exported symbol. Same with ff_evc_read_nal_unit_length().

Thank you for your code review.
I've just pushed new patchset containig fixes for all the issues metnioned
in this email and changes following Paul's review.

Unfortunately I did that before I saw your last email and Michael
Neidermayer's last email.
So it seems that I still have some work to do like changing prefixes frmom
ff_* to av_* for functions shared between libavcodec and libavformat, and
moving int ff_evc_get_nalu_type(), ff_evc_read_nal_unit_length()
implementations from evc_parse.c file to evc+parse.h.

> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://protect2.fireeye.com/v1/url?k=5297bb74-33ec11fc-5296303b-
> 74fe4860018a-ffe4f237f8ba290d=1=351d993e-ef97-4840-aeb8-
> 4fd043541ed8=https%3A%2F%2Fffmpeg.org%2Fmailman%2Flistinfo%2Fffmp
> eg-devel
> 
> To unsubscribe, visit link above, or email ffmpeg-devel-requ...@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-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v24 6/9] avformat/mov_muxer: Extended MOV muxer to handle EVC video content

2023-06-13 Thread James Almer

On 6/13/2023 9:23 PM, Michael Niedermayer wrote:

On Mon, Jun 12, 2023 at 02:30:27PM +0200, Dawid Kozinski wrote:

- Changes in mov_write_video_tag function to handle EVC elementary stream
- Provided structure EVCDecoderConfigurationRecord that specifies the decoder 
configuration information for ISO/IEC 23094-1 video content

Signed-off-by: Dawid Kozinski 
---
  libavformat/Makefile|   2 +-
  libavformat/evc.c   | 422 
  libavformat/evc.h   |  44 +
  libavformat/isom_tags.c |   2 +
  libavformat/movenc.c|  33 
  5 files changed, 502 insertions(+), 1 deletion(-)
  create mode 100644 libavformat/evc.c
  create mode 100644 libavformat/evc.h

diff --git a/libavformat/Makefile b/libavformat/Makefile
index 6e4231fda2..d3503196e3 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -364,7 +364,7 @@ OBJS-$(CONFIG_MOV_DEMUXER)   += mov.o 
mov_chan.o mov_esds.o \
  OBJS-$(CONFIG_MOV_MUXER) += movenc.o av1.o avc.o hevc.o 
vpcc.o \
  movenchint.o mov_chan.o rtp.o \
  movenccenc.o movenc_ttml.o 
rawutils.o \
-dovi_isom.o
+dovi_isom.o evc.o
  OBJS-$(CONFIG_MP2_MUXER) += rawenc.o
  OBJS-$(CONFIG_MP3_DEMUXER)   += mp3dec.o replaygain.o
  OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o id3v2enc.o
diff --git a/libavformat/evc.c b/libavformat/evc.c
new file mode 100644
index 00..431cb107e3
--- /dev/null
+++ b/libavformat/evc.c
@@ -0,0 +1,422 @@
+/*
+ * EVC helper functions for muxers
+ * Copyright (c) 2022 Dawid Kozinski 
+ *
+ * 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
+ */


[...]


+nalu_type = ff_evc_get_nalu_type(data, bytes_to_read, pb);


functions shared between libavcodec and libavformat need an av*/avpriv* prefix
otherwise linking will fail with shared libs as ff* isnt exported


It's small enough that it can go in the header instead. That way we save 
one unnecessary exported symbol. Same with ff_evc_read_nal_unit_length().

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v24 6/9] avformat/mov_muxer: Extended MOV muxer to handle EVC video content

2023-06-13 Thread Michael Niedermayer
On Mon, Jun 12, 2023 at 02:30:27PM +0200, Dawid Kozinski wrote:
> - Changes in mov_write_video_tag function to handle EVC elementary stream
> - Provided structure EVCDecoderConfigurationRecord that specifies the decoder 
> configuration information for ISO/IEC 23094-1 video content
> 
> Signed-off-by: Dawid Kozinski 
> ---
>  libavformat/Makefile|   2 +-
>  libavformat/evc.c   | 422 
>  libavformat/evc.h   |  44 +
>  libavformat/isom_tags.c |   2 +
>  libavformat/movenc.c|  33 
>  5 files changed, 502 insertions(+), 1 deletion(-)
>  create mode 100644 libavformat/evc.c
>  create mode 100644 libavformat/evc.h
> 
> diff --git a/libavformat/Makefile b/libavformat/Makefile
> index 6e4231fda2..d3503196e3 100644
> --- a/libavformat/Makefile
> +++ b/libavformat/Makefile
> @@ -364,7 +364,7 @@ OBJS-$(CONFIG_MOV_DEMUXER)   += mov.o 
> mov_chan.o mov_esds.o \
>  OBJS-$(CONFIG_MOV_MUXER) += movenc.o av1.o avc.o hevc.o 
> vpcc.o \
>  movenchint.o mov_chan.o rtp.o \
>  movenccenc.o movenc_ttml.o 
> rawutils.o \
> -dovi_isom.o
> +dovi_isom.o evc.o
>  OBJS-$(CONFIG_MP2_MUXER) += rawenc.o
>  OBJS-$(CONFIG_MP3_DEMUXER)   += mp3dec.o replaygain.o
>  OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o id3v2enc.o
> diff --git a/libavformat/evc.c b/libavformat/evc.c
> new file mode 100644
> index 00..431cb107e3
> --- /dev/null
> +++ b/libavformat/evc.c
> @@ -0,0 +1,422 @@
> +/*
> + * EVC helper functions for muxers
> + * Copyright (c) 2022 Dawid Kozinski 
> + *
> + * 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
> + */

[...]

> +nalu_type = ff_evc_get_nalu_type(data, bytes_to_read, pb);

functions shared between libavcodec and libavformat need an av*/avpriv* prefix
otherwise linking will fail with shared libs as ff* isnt exported


[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH v24 6/9] avformat/mov_muxer: Extended MOV muxer to handle EVC video content

2023-06-12 Thread Dawid Kozinski
- Changes in mov_write_video_tag function to handle EVC elementary stream
- Provided structure EVCDecoderConfigurationRecord that specifies the decoder 
configuration information for ISO/IEC 23094-1 video content

Signed-off-by: Dawid Kozinski 
---
 libavformat/Makefile|   2 +-
 libavformat/evc.c   | 422 
 libavformat/evc.h   |  44 +
 libavformat/isom_tags.c |   2 +
 libavformat/movenc.c|  33 
 5 files changed, 502 insertions(+), 1 deletion(-)
 create mode 100644 libavformat/evc.c
 create mode 100644 libavformat/evc.h

diff --git a/libavformat/Makefile b/libavformat/Makefile
index 6e4231fda2..d3503196e3 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -364,7 +364,7 @@ OBJS-$(CONFIG_MOV_DEMUXER)   += mov.o 
mov_chan.o mov_esds.o \
 OBJS-$(CONFIG_MOV_MUXER) += movenc.o av1.o avc.o hevc.o vpcc.o 
\
 movenchint.o mov_chan.o rtp.o \
 movenccenc.o movenc_ttml.o 
rawutils.o \
-dovi_isom.o
+dovi_isom.o evc.o
 OBJS-$(CONFIG_MP2_MUXER) += rawenc.o
 OBJS-$(CONFIG_MP3_DEMUXER)   += mp3dec.o replaygain.o
 OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o id3v2enc.o
diff --git a/libavformat/evc.c b/libavformat/evc.c
new file mode 100644
index 00..431cb107e3
--- /dev/null
+++ b/libavformat/evc.c
@@ -0,0 +1,422 @@
+/*
+ * EVC helper functions for muxers
+ * Copyright (c) 2022 Dawid Kozinski 
+ *
+ * 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
+ */
+
+#include "libavutil/intreadwrite.h"
+#include "libavcodec/get_bits.h"
+#include "libavcodec/golomb.h"
+#include "libavcodec/evc.h"
+#include "libavcodec/evc_parse.h"
+#include "avformat.h"
+#include "avio.h"
+#include "evc.h"
+#include "avio_internal.h"
+
+// The length field that indicates the length in bytes of the following NAL 
unit is configured to be of 4 bytes
+#define EVC_NALU_LENGTH_PREFIX_SIZE(4)  /* byte */
+#define EVC_NALU_HEADER_SIZE   (2)  /* byte */
+
+// @see ISO/IEC 14496-15:2021 Coding of audio-visual objects - Part 15: 
section 12.3.3.1
+enum {
+SPS_INDEX,
+PPS_INDEX,
+APS_INDEX,
+SEI_INDEX,
+NB_ARRAYS
+};
+
+// The sturcture reflects SPS RBSP(raw byte sequence payload) layout
+// @see ISO_IEC_23094-1 section 7.3.2.1
+//
+// The following descriptors specify the parsing process of each element
+// u(n) - unsigned integer using n bits
+// ue(v) - unsigned integer 0-th order Exp_Golomb-coded syntax element with 
the left bit first
+typedef struct EVCSPS {
+int sps_seq_parameter_set_id;   // ue(v)
+int profile_idc;// u(8)
+int level_idc;  // u(8)
+int toolset_idc_h;  // u(32)
+int toolset_idc_l;  // u(32)
+int chroma_format_idc;  // ue(v)
+int pic_width_in_luma_samples;  // ue(v)
+int pic_height_in_luma_samples; // ue(v)
+int bit_depth_luma_minus8;  // ue(v)
+int bit_depth_chroma_minus8;// ue(v)
+
+// @note
+// Currently the structure does not reflect the entire SPS RBSP layout.
+// It contains only the fields that are necessary to read from the NAL 
unit all the values
+// necessary for the correct initialization of 
EVCDecoderConfigurationRecord
+
+// @note
+// If necessary, add the missing fields to the structure to reflect
+// the contents of the entire NAL unit of the SPS type
+
+} EVCSPS;
+
+// @see ISO/IEC 14496-15:2021 Coding of audio-visual objects - Part 15: 
section 12.3.3.3
+typedef struct EVCNALUnitArray {
+uint8_t  array_completeness; // when equal to 1 indicates that all NAL 
units of the given type are in the following array
+uint8_t  NAL_unit_type;  // indicates the type of the NAL units in the 
following array
+uint16_t numNalus;   // indicates the number of NAL units of the 
indicated type
+uint16_t *nalUnitLength; // indicates the length in bytes of the NAL 
unit
+uint8_t  **nalUnit;  // contains an SPS, PPS, APS or a SEI NAL 
unit, as specified in ISO/IEC 23094-1
+} EVCNALUnitArray;
+