[FFmpeg-devel] [PATCH] rtp enc/dec update for vvc

2024-06-13 Thread Robin shi
Signed-off-by: ftaft2000 
---
  .gitignore |   1 +
  configure  |   4 +
  libavcodec/Makefile|   1 +
  libavcodec/allcodecs.c |   1 +
  libavcodec/libvvenc.c  | 566 +
  libavformat/Makefile   |   1 +
  libavformat/rtpdec.c   |   1 +
  libavformat/rtpdec_formats.h   |   1 +
  libavformat/rtpdec_vvc.c   | 349 
  libavformat/rtpenc.c   |   2 +
  libavformat/rtpenc_h264_hevc.c |  94 +-
  libavformat/sdp.c  | 182 +++
  12 files changed, 1197 insertions(+), 6 deletions(-)
  create mode 100644 libavcodec/libvvenc.c
  create mode 100644 libavformat/rtpdec_vvc.c

diff --git a/.gitignore b/.gitignore
index e810d11107..d7441a6cdc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,3 +41,4 @@
  /src
  /mapfile
  /tools/python/__pycache__/
+/build
\ No newline at end of file
diff --git a/configure b/configure
index 83284427df..d331688eb4 100755
--- a/configure
+++ b/configure
@@ -296,6 +296,7 @@ External library support:
--enable-libwebp enable WebP encoding via libwebp [no]
--enable-libx264 enable H.264 encoding via x264 [no]
--enable-libx265 enable HEVC encoding via x265 [no]
+  --enable-libvvencenable H.266/VVC encoding via vvenc [no]
--enable-libxeve enable EVC encoding via libxeve [no]
--enable-libxevd enable EVC decoding via libxevd [no]
--enable-libxavs enable AVS encoding via xavs [no]
@@ -1867,6 +1868,7 @@ EXTERNAL_LIBRARY_GPL_LIST="
  libvidstab
  libx264
  libx265
+libvvenc
  libxavs
  libxavs2
  libxvid
@@ -3569,6 +3571,7 @@ libx264rgb_encoder_deps="libx264"
  libx264rgb_encoder_select="libx264_encoder"
  libx265_encoder_deps="libx265"
  libx265_encoder_select="atsc_a53 dovi_rpuenc"
+libvvenc_encoder_deps="libvvenc"
  libxavs_encoder_deps="libxavs"
  libxavs2_encoder_deps="libxavs2"
  libxevd_decoder_deps="libxevd"
@@ -7041,6 +7044,7 @@ enabled libx264   && require_pkg_config
libx264 x264 "stdint.h x264.h" x
   check_cpp_condition libx262 x264.h
"X264_MPEG2"
  enabled libx265   && require_pkg_config libx265 x265 x265.h
x265_api_get &&
   require_cpp_condition libx265 x265.h
"X265_BUILD >= 89"
+enabled libvvenc  && require_pkg_config libvvenc "libvvenc >=
1.6.1" "vvenc/vvenc.h" vvenc_get_version
  enabled libxavs   && require libxavs "stdint.h xavs.h"
xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
  enabled libxavs2  && require_pkg_config libxavs2 "xavs2 >=
1.3.0" "stdint.h xavs2.h" xavs2_api_get
  enabled libxevd   && require_pkg_config libxevd "xevd >=
0.4.1" "xevd.h" xevd_decode
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 1a44352906..2e98e1c72f 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1155,6 +1155,7 @@ OBJS-$(CONFIG_LIBWEBP_ANIM_ENCODER)   +=
libwebpenc_common.o libwebpenc_anim
  OBJS-$(CONFIG_LIBX262_ENCODER)+= libx264.o
  OBJS-$(CONFIG_LIBX264_ENCODER)+= libx264.o
  OBJS-$(CONFIG_LIBX265_ENCODER)+= libx265.o
+OBJS-$(CONFIG_LIBVVENC_ENCODER)   += libvvenc.o
  OBJS-$(CONFIG_LIBXAVS_ENCODER)+= libxavs.o
  OBJS-$(CONFIG_LIBXAVS2_ENCODER)   += libxavs2.o
  OBJS-$(CONFIG_LIBXEVD_DECODER)+= libxevd.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index b102a8069e..7650abebe4 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -807,6 +807,7 @@ extern const FFCodec ff_libx262_encoder;
  extern const FFCodec ff_libx264_encoder;
  extern const FFCodec ff_libx264rgb_encoder;
  extern FFCodec ff_libx265_encoder;
+extern const FFCodec ff_libvvenc_encoder;
  extern const FFCodec ff_libxeve_encoder;
  extern const FFCodec ff_libxevd_decoder;
  extern const FFCodec ff_libxavs_encoder;
diff --git a/libavcodec/libvvenc.c b/libavcodec/libvvenc.c
new file mode 100644
index 00..78d4f55a2a
--- /dev/null
+++ b/libavcodec/libvvenc.c
@@ -0,0 +1,566 @@
+/*
+ * H.266 encoding using the VVenC library
+ *
+ * Copyright (C) 2022, Thomas Siedel
+ *
+ * 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

[FFmpeg-devel] [PATCH] rtp enc/dec update for vvc

2024-06-13 Thread Robin shi
Signed-off-by: ftaft2000 
---
 .gitignore |   1 +
 configure  |   4 +
 libavcodec/Makefile|   1 +
 libavcodec/allcodecs.c |   1 +
 libavcodec/libvvenc.c  | 566 +
 libavformat/Makefile   |   1 +
 libavformat/rtpdec.c   |   1 +
 libavformat/rtpdec_formats.h   |   1 +
 libavformat/rtpdec_vvc.c   | 349 
 libavformat/rtpenc.c   |   2 +
 libavformat/rtpenc_h264_hevc.c |  94 +-
 libavformat/sdp.c  | 182 +++
 12 files changed, 1197 insertions(+), 6 deletions(-)
 create mode 100644 libavcodec/libvvenc.c
 create mode 100644 libavformat/rtpdec_vvc.c

diff --git a/.gitignore b/.gitignore
index e810d11107..d7441a6cdc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,3 +41,4 @@
 /src
 /mapfile
 /tools/python/__pycache__/
+/build
\ No newline at end of file
diff --git a/configure b/configure
index 83284427df..d331688eb4 100755
--- a/configure
+++ b/configure
@@ -296,6 +296,7 @@ External library support:
   --enable-libwebp enable WebP encoding via libwebp [no]
   --enable-libx264 enable H.264 encoding via x264 [no]
   --enable-libx265 enable HEVC encoding via x265 [no]
+  --enable-libvvencenable H.266/VVC encoding via vvenc [no]
   --enable-libxeve enable EVC encoding via libxeve [no]
   --enable-libxevd enable EVC decoding via libxevd [no]
   --enable-libxavs enable AVS encoding via xavs [no]
@@ -1867,6 +1868,7 @@ EXTERNAL_LIBRARY_GPL_LIST="
 libvidstab
 libx264
 libx265
+libvvenc
 libxavs
 libxavs2
 libxvid
@@ -3569,6 +3571,7 @@ libx264rgb_encoder_deps="libx264"
 libx264rgb_encoder_select="libx264_encoder"
 libx265_encoder_deps="libx265"
 libx265_encoder_select="atsc_a53 dovi_rpuenc"
+libvvenc_encoder_deps="libvvenc"
 libxavs_encoder_deps="libxavs"
 libxavs2_encoder_deps="libxavs2"
 libxevd_decoder_deps="libxevd"
@@ -7041,6 +7044,7 @@ enabled libx264   && require_pkg_config libx264 
x264 "stdint.h x264.h" x
  check_cpp_condition libx262 x264.h "X264_MPEG2"
 enabled libx265   && require_pkg_config libx265 x265 x265.h 
x265_api_get &&
  require_cpp_condition libx265 x265.h "X265_BUILD 
>= 89"
+enabled libvvenc  && require_pkg_config libvvenc "libvvenc >= 1.6.1" 
"vvenc/vvenc.h" vvenc_get_version
 enabled libxavs   && require libxavs "stdint.h xavs.h" 
xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
 enabled libxavs2  && require_pkg_config libxavs2 "xavs2 >= 1.3.0" 
"stdint.h xavs2.h" xavs2_api_get
 enabled libxevd   && require_pkg_config libxevd "xevd >= 0.4.1" 
"xevd.h" xevd_decode
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 1a44352906..2e98e1c72f 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1155,6 +1155,7 @@ OBJS-$(CONFIG_LIBWEBP_ANIM_ENCODER)   += 
libwebpenc_common.o libwebpenc_anim
 OBJS-$(CONFIG_LIBX262_ENCODER)+= libx264.o
 OBJS-$(CONFIG_LIBX264_ENCODER)+= libx264.o
 OBJS-$(CONFIG_LIBX265_ENCODER)+= libx265.o
+OBJS-$(CONFIG_LIBVVENC_ENCODER)   += libvvenc.o
 OBJS-$(CONFIG_LIBXAVS_ENCODER)+= libxavs.o
 OBJS-$(CONFIG_LIBXAVS2_ENCODER)   += libxavs2.o
 OBJS-$(CONFIG_LIBXEVD_DECODER)+= libxevd.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index b102a8069e..7650abebe4 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -807,6 +807,7 @@ extern const FFCodec ff_libx262_encoder;
 extern const FFCodec ff_libx264_encoder;
 extern const FFCodec ff_libx264rgb_encoder;
 extern FFCodec ff_libx265_encoder;
+extern const FFCodec ff_libvvenc_encoder;
 extern const FFCodec ff_libxeve_encoder;
 extern const FFCodec ff_libxevd_decoder;
 extern const FFCodec ff_libxavs_encoder;
diff --git a/libavcodec/libvvenc.c b/libavcodec/libvvenc.c
new file mode 100644
index 00..78d4f55a2a
--- /dev/null
+++ b/libavcodec/libvvenc.c
@@ -0,0 +1,566 @@
+/*
+ * H.266 encoding using the VVenC library
+ *
+ * Copyright (C) 2022, Thomas Siedel
+ *
+ * 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
+ */

RE: [WSG] Is it a good practice to have 'Back to Top' link?

2008-09-28 Thread Robin Shi
How about the tabs with JS? It visually breaks the page into small parts and 
switch by tabs.

Robin

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joe Chiang
Sent: Monday, September 29, 2008 3:49 PM
To: wsg@webstandardsgroup.org
Subject: [WSG] Is it a good practice to have 'Back to Top' link?

Hi all,

I have some VERY long pages in the website I maintain. Currently, I
insert 'Back to Top' after every section in the page.
Sometimes, I feel they are disturbing and am not sure if there is any
better way to do it or don't insert them at all.

Of course, splitting the page into smaller pages is the simplest way
out, but for our application, the page has to contain all the
information on the same page.

Any suggestions would be appreciated.

Cheers,
Joe


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



RE: [WSG] Is it a good practice to have 'Back to Top' link?

2008-09-29 Thread Robin Shi
No, i meant use the tabs as navigation, the tabs will sit on the top of the page

From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of David Dorward [EMAIL 
PROTECTED]
Sent: Monday, 29 September 2008 18:19
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Is it a good practice to have 'Back to Top' link?

Robin Shi wrote:
> How about the tabs with JS? It visually breaks the page into small parts and 
> switch by tabs.
>
So - the visitor comes, they read to the bottom, then they have to
scroll to the top and activate the next tab (and repeat). I'm not too
keen on this idea.

--
David Dorward
http://dorward.me.uk/



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



RE: [WSG] Is it a good practice to have 'Back to Top' link?

2008-09-29 Thread Robin Shi
 
Oh I did miss the point. You were talking about those small screens and the 
users really don't like scrolling. In that case, what if put the tabs on the 
bottom of the page?
Robin
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Dorward
Sent: Monday, September 29, 2008 8:20 PM
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Is it a good practice to have 'Back to Top' link?

Robin Shi wrote:
> No, i meant use the tabs as navigation, the tabs will sit on the top of the 
> page
>
Yes? My point stands:

> So - the visitor comes, they read to the bottom, then they have to
> scroll to the top and activate the next tab (and repeat). I'm not too
> keen on this idea.
>

--
David Dorward
http://dorward.me.uk/



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



RE: [WSG] Is it a good practice to have 'Back to Top' link?

2008-09-29 Thread Robin Shi
Thanks Mark for the explanation.

For those users who even don't see [Home] key or [back to top] link, I think 
they may need the extremely "good" sign to navigate inside the page.
We will be still using the tabs as navigation, but not on the top. Put the tabs 
in a div, then using the JS to position the div. If the page has been scrolled 
down or up, whatever, the JS will reposition the div to make sure it's not 
outside of the view.
But I don't like this crazy idea because
1. it increases the page-load;
2. a lot of work to do with media="print"

Cheers,

Robin

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Harris
Sent: Tuesday, September 30, 2008 9:20 AM
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Is it a good practice to have 'Back to Top' link?

Robin Shi wrote:
>
> Oh I did miss the point. You were talking about those small screens and the 
> users really don't like scrolling. In that case, what if put the tabs on the 
> bottom of the page?

No, I think his point was that the tabs would be at the top of the page
and the user would still have to scroll back to make use of them, unless
the page was not long enough to take them out of view.

Unless you were using frames, and the tabs were outside the content frame.

Which would be a Bad Thing(tm).

Cheers

mark


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



RE: [WSG] Is it a good practice to have 'Back to Top' link?

2008-09-29 Thread Robin Shi
Hi Blake,

In my experience, "position: fixed" seems not work with IE.

Robin


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Blake
Sent: Tuesday, September 30, 2008 10:06 AM
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Is it a good practice to have 'Back to Top' link?

On Tue, Sep 30, 2008 at 9:53 AM, Robin Shi <[EMAIL PROTECTED]> wrote:
> If the page has been scrolled down or up, whatever, the JS will reposition 
> the div to make sure it's not outside of the view.

Is it just me, or could you not use position: fixed?

--
Blake Haswell
http://www.blakehaswell.com/


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***