From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id DFEBC48242 for ; Tue, 14 Nov 2023 18:46:27 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 64B4668CD51; Tue, 14 Nov 2023 20:46:25 +0200 (EET) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 40F7568CCE7 for ; Tue, 14 Nov 2023 20:46:18 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 9412DFF80D for ; Tue, 14 Nov 2023 18:46:17 +0000 (UTC) Date: Tue, 14 Nov 2023 19:46:16 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20231114184616.GL3543730@pb2> References: <20231114172051.13872-1-michael@niedermayer.cc> <20231114172051.13872-4-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 4/6] avcodec/h264: keep track of which frames used gray references X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============2148915405918112118==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============2148915405918112118== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8Arw/7BTCudGxOwx" Content-Disposition: inline --8Arw/7BTCudGxOwx Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 14, 2023 at 06:32:19PM +0100, Hendrik Leppkes wrote: > On Tue, Nov 14, 2023 at 6:21=E2=80=AFPM Michael Niedermayer > wrote: > > > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/h264_picture.c | 1 + > > libavcodec/h264_slice.c | 19 ++++++++++++++++++- > > libavcodec/h264dec.c | 1 + > > libavcodec/h264dec.h | 4 ++++ > > 4 files changed, 24 insertions(+), 1 deletion(-) > > > > diff --git a/libavcodec/h264_picture.c b/libavcodec/h264_picture.c > > index 691c61eea23..3234141dbd6 100644 > > --- a/libavcodec/h264_picture.c > > +++ b/libavcodec/h264_picture.c > > @@ -96,6 +96,7 @@ static void h264_copy_picture_params(H264Picture *dst= , const H264Picture *src) > > dst->field_picture =3D src->field_picture; > > dst->reference =3D src->reference; > > dst->recovered =3D src->recovered; > > + dst->gray =3D src->gray; > > dst->invalid_gap =3D src->invalid_gap; > > dst->sei_recovery_frame_cnt =3D src->sei_recovery_frame_cnt; > > dst->mb_width =3D src->mb_width; > > diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c > > index 4861a2cabba..2c4ab89dae1 100644 > > --- a/libavcodec/h264_slice.c > > +++ b/libavcodec/h264_slice.c > > @@ -457,6 +457,7 @@ int ff_h264_update_thread_context(AVCodecContext *d= st, > > h->poc.prev_frame_num =3D h->poc.frame_num; > > > > h->recovery_frame =3D h1->recovery_frame; > > + h->non_gray =3D h1->non_gray; > > > > return err; > > } > > @@ -1544,11 +1545,14 @@ static int h264_field_start(H264Context *h, con= st H264SliceContext *sl, > > if (ret < 0) > > return ret; > > h->short_ref[0]->poc =3D prev->poc + 2U; > > + h->short_ref[0]->gray =3D prev->gray; > > ff_thread_report_progress(&h->short_ref[0]->tf, INT_MA= X, 0); > > if (h->short_ref[0]->field_picture) > > ff_thread_report_progress(&h->short_ref[0]->tf, IN= T_MAX, 1); > > - } else if (!h->frame_recovered && !h->avctx->hwaccel) > > + } else if (!h->frame_recovered && !h->avctx->hwaccel) { > > color_frame(h->short_ref[0]->f, c); > > + h->short_ref[0]->gray =3D 1; > > + } >=20 > While we can't color invalid frames for hwaccels easily, the flag > should perhaps still be applied, as they are equally invalid. ok > Thinking about this, maybe the name should be less the color we > happened to use for it, and more like "placeholder" or "invalid" or > anything like that? "invalid" is a quite generic term that covers more than this case. and iam not sure if "placeholder" is really good description of them. I picked "gray" because i had no better idea and they are gray thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When you are offended at any man's fault, turn to yourself and study your own failings. Then you will forget your anger. -- Epictetus --8Arw/7BTCudGxOwx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZVPAdAAKCRBhHseHBAsP q/knAJ4+DcNv8fK732teSCetr9YsnJ4qeACeM21jbXtXDtOEF+Qmj1UBVIEpoeI= =Dq9l -----END PGP SIGNATURE----- --8Arw/7BTCudGxOwx-- --===============2148915405918112118== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============2148915405918112118==--