[FFmpeg-devel] [PATCH V3] Patch to add interlaced HEVC decoding to HEVCDEC
Michael Niedermayer
michael at niedermayer.cc
Thu Oct 31 20:09:59 EET 2024
On Wed, Oct 30, 2024 at 01:31:35PM -0500, Jose Santiago wrote:
> From d55b49766d5e0256685c4874568db002d3dd7889 Mon Sep 17 00:00:00 2001
> From: Jose Santiago <jsantiago at haivision.com>
> Date: Wed, 30 Oct 2024 12:28:35 -0500
> Subject: [PATCH] [PATCH V3] Patch to add interlaced HEVC decoding to
> HEVCDEC
>
> ---
> libavcodec/hevc/hevcdec.c | 24 ++-
> libavcodec/hevc/hevcdec.h | 13 ++
> libavcodec/hevc/refs.c | 412 +++++++++++++++++++++++++++++++++++++-
> libavcodec/hevc/sei.c | 16 +-
> libavcodec/hevc/sei.h | 129 +++++++++++-
> 5 files changed, 569 insertions(+), 25 deletions(-)
>
> diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
> index 1ea8df0fa0..d7179bdcf7 100644
> --- a/libavcodec/hevc/hevcdec.c
> +++ b/libavcodec/hevc/hevcdec.c
> @@ -359,7 +359,18 @@ static void export_stream_params(HEVCContext *s,
> const HEVCSPS *sps)
> avctx->profile = sps->ptl.general_ptl.profile_idc;
> avctx->level = sps->ptl.general_ptl.level_idc;
>
> - ff_set_sar(avctx, sps->vui.common.sar);
> + // There are some streams in the wild that were encode field pitcures
> + // and set double height aspect ratio so that some players that
> do not
> + // support interlaced HEVC display the field pictures with
> double height.
> + // Since we are now combining the field pictures into a single
> interlaced
> + // frame, fix the sample aspect ratio to restore the correct
> shape for the
> + // reconstructed interlaced frames.
> + if
> (ff_hevc_sei_pict_struct_is_field_picture(s->sei.picture_timing.picture_struct)
> &&
> + sps->vui.common.sar.num == 1 && sps->vui.common.sar.den ==
> 2) {
this patch is corrupted by linebreaks, please check your word/line wrap settings
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241031/41097ba6/attachment.sig>
More information about the ffmpeg-devel
mailing list