Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Zhao Zhili <quinkblack-at-foxmail.com@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] lavc/videotoolboxenc: add hevc main42210 and p210
Date: Tue, 11 Mar 2025 16:45:20 +0800
Message-ID: <tencent_DE50A3E6D3A7D5AA8C932B9C468B96661406@qq.com> (raw)
In-Reply-To: <CAA4bkHaVbn5jVZyRQc++vMX2NAyYmFhUT9R5jJgxyL9daJ8gHQ@mail.gmail.com>



> On Mar 11, 2025, at 14:20, Wang Bin <wbsecg1@gmail.com> wrote:
> supported by apple silicon
> ---
>  libavcodec/videotoolboxenc.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
> index 55a440c7b4..92a4762caa 100644
> --- a/libavcodec/videotoolboxenc.c
> +++ b/libavcodec/videotoolboxenc.c
> @@ -120,6 +120,7 @@ static struct{
>  
>      CFStringRef kVTProfileLevel_HEVC_Main_AutoLevel;
>      CFStringRef kVTProfileLevel_HEVC_Main10_AutoLevel;
> +    CFStringRef kVTProfileLevel_HEVC_Main42210_AutoLevel;
>  
>      CFStringRef kVTCompressionPropertyKey_RealTime;
>      CFStringRef kVTCompressionPropertyKey_TargetQualityForAlpha;
> @@ -192,6 +193,7 @@ static void loadVTEncSymbols(void){
>  
>      GET_SYM(kVTProfileLevel_HEVC_Main_AutoLevel,     "HEVC_Main_AutoLevel");
>      GET_SYM(kVTProfileLevel_HEVC_Main10_AutoLevel,   "HEVC_Main10_AutoLevel");
> +    GET_SYM(kVTProfileLevel_HEVC_Main42210_AutoLevel,   "HEVC_Main10_AutoLevel");

A copy-paste error.

>  
>      GET_SYM(kVTCompressionPropertyKey_RealTime, "RealTime");
>      GET_SYM(kVTCompressionPropertyKey_TargetQualityForAlpha,
> @@ -979,6 +981,11 @@ static bool get_vt_hevc_profile_level(AVCodecContext *avctx,
>              *profile_level_val =
>                  compat_keys.kVTProfileLevel_HEVC_Main10_AutoLevel;
>              break;
> +        case AV_PROFILE_HEVC_REXT:
> +            // only main42210 is supported, omit depth and chroma subsampling
> +            *profile_level_val =
> +                compat_keys.kVTProfileLevel_HEVC_Main42210_AutoLevel;
> +            break;
>      }
>  
>      if (!*profile_level_val) {
> @@ -2854,6 +2861,7 @@ static const enum AVPixelFormat hevc_pix_fmts[] = {
>      AV_PIX_FMT_YUV420P,
>      AV_PIX_FMT_BGRA,
>      AV_PIX_FMT_P010LE,
> +    AV_PIX_FMT_P210,
>      AV_PIX_FMT_NONE
>  };
>  
> @@ -2988,6 +2996,8 @@ static const AVOption hevc_options[] = {
>      { "profile", "Profile", OFFSET(profile), AV_OPT_TYPE_INT, { .i64 = AV_PROFILE_UNKNOWN }, AV_PROFILE_UNKNOWN, INT_MAX, VE, .unit = "profile" },
>      { "main",     "Main Profile",     0, AV_OPT_TYPE_CONST, { .i64 = AV_PROFILE_HEVC_MAIN    }, INT_MIN, INT_MAX, VE, .unit = "profile" },
>      { "main10",   "Main10 Profile",   0, AV_OPT_TYPE_CONST, { .i64 = AV_PROFILE_HEVC_MAIN_10 }, INT_MIN, INT_MAX, VE, .unit = "profile" },
> +    { "main42210","Main 4:2:2 10 Profile",0, AV_OPT_TYPE_CONST, { .i64 = AV_PROFILE_HEVC_REXT }, INT_MIN, INT_MAX, VE, .unit = "profile" },
> +    { "rext",     "Main 4:2:2 10 Profile",0, AV_OPT_TYPE_CONST, { .i64 = AV_PROFILE_HEVC_REXT }, INT_MIN, INT_MAX, VE, .unit = "profile" },
>  
>      { "alpha_quality", "Compression quality for the alpha channel", OFFSET(alpha_quality), AV_OPT_TYPE_DOUBLE, { .dbl = 0.0 }, 0.0, 1.0, VE },
>  
> -- 
> 2.39.5 (Apple Git-154)


_______________________________________________
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:[~2025-03-11  8:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-11  6:20 Wang Bin
2025-03-11  8:45 ` Zhao Zhili [this message]
2025-03-11 10:15   ` Wang Bin
2025-03-11 14:46     ` Zhao Zhili
  -- strict thread matches above, loose matches on Subject: below --
2023-02-12  2:32 Wang Bin

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=tencent_DE50A3E6D3A7D5AA8C932B9C468B96661406@qq.com \
    --to=quinkblack-at-foxmail.com@ffmpeg.org \
    --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