From: Stefano Sabatini <stefasab@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: "Clément Bœsch" <u@pkh.me>
Subject: Re: [FFmpeg-devel] [PATCH 1/2] avcodec/proresenc: make transparency honored in mov/QT
Date: Wed, 27 Dec 2023 12:54:28 +0100
Message-ID: <ZYwQdOQ1Fach0Kor@mariano> (raw)
In-Reply-To: <20231226222516.2513700-1-u@pkh.me>
On date Tuesday 2023-12-26 23:25:15 +0100, Clément Bœsch wrote:
> In the mov muxer (in mov_write_video_tag()), bits_per_coded_sample will
> be written under certain conditions and is required to be 32 for the
> transparency to be honored in QuickTime.
>
> prores_kostya already has this setting but prores_anatoliy and
> prores_videotoolbox didn't.
> ---
> libavcodec/proresenc_anatoliy.c | 3 +++
> libavcodec/videotoolboxenc.c | 2 ++
> 2 files changed, 5 insertions(+)
>
> diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
> index a1cb46aa59..16741afd68 100644
> --- a/libavcodec/proresenc_anatoliy.c
> +++ b/libavcodec/proresenc_anatoliy.c
> @@ -930,6 +930,9 @@ static av_cold int prores_encode_init(AVCodecContext *avctx)
> }
> }
>
> + if (ctx->need_alpha)
> + avctx->bits_per_coded_sample = 32;
> +
> ff_fdctdsp_init(&ctx->fdsp, avctx);
>
> avctx->codec_tag = AV_RL32((const uint8_t*)profiles[avctx->profile].name);
> diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
> index 15e0e1fe29..644fd60b00 100644
> --- a/libavcodec/videotoolboxenc.c
> +++ b/libavcodec/videotoolboxenc.c
> @@ -521,6 +521,8 @@ static CMVideoCodecType get_cm_codec_type(AVCodecContext *avctx,
> }
> return kCMVideoCodecType_HEVC;
> case AV_CODEC_ID_PRORES:
> + if (desc && (desc->flags & AV_PIX_FMT_FLAG_ALPHA))
> + avctx->bits_per_coded_sample = 32;
> switch (profile) {
> case AV_PROFILE_PRORES_PROXY:
> return MKBETAG('a','p','c','o'); // kCMVideoCodecType_AppleProRes422Proxy
LGTM.
_______________________________________________
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".
prev parent reply other threads:[~2023-12-27 11:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-26 22:25 Clément Bœsch
2023-12-26 22:25 ` [FFmpeg-devel] [PATCH 2/2] avcodec/proresenc: fix alpha plane encoding bitstream Clément Bœsch
2023-12-27 12:29 ` Stefano Sabatini
2023-12-29 19:55 ` Clément Bœsch
2023-12-27 11:54 ` Stefano Sabatini [this message]
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=ZYwQdOQ1Fach0Kor@mariano \
--to=stefasab@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
--cc=u@pkh.me \
/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