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 9FF8545AB8 for ; Wed, 15 Mar 2023 17:55:19 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D92BF68A7D9; Wed, 15 Mar 2023 19:55:16 +0200 (EET) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F3BBB689C6C for ; Wed, 15 Mar 2023 19:55:10 +0200 (EET) Received: by mail-qk1-f171.google.com with SMTP id j10so7055434qkg.12 for ; Wed, 15 Mar 2023 10:55:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=obe-tv.20210112.gappssmtp.com; s=20210112; t=1678902909; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=Nyhguo1DaHdzhiSeX7S93ey9tQiN1T0p4DMsVBagt64=; b=uFmr9Kqq40sxnQKFWIh61QipDnHqjVfQu+oiyU26xKI03sMc89WDKxNJJlBQmuKRZ4 qFjAPdrW2LggitYPk5oT8d30uj5RcssRsrc9/Pi1PpqRU3acypZDPqIyshrN+FGbGsj5 L927pOI1IUjm3+VuaUBLooBRv0WBqznQRyHNzrZyBE/GynECyYz/SAyPVD7uUsQ/5MKA YdH5k2bF4CHO1KknTwSZkjNJZrGFVqbVDxtwPlq1vg0FOfHX6zhjshBU/v1L/5CHh+j8 ZtfbjUnPb6ByNjJUFtuXYbN4Sc7gA7JaF26J6C4i8tmuIT7VoPvyzdUnH+wUA4dc6bII El9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678902909; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Nyhguo1DaHdzhiSeX7S93ey9tQiN1T0p4DMsVBagt64=; b=QvWVI4HwS5rmZ555o2crcWGXWVW4rH2knir1t1nDsmdKeQ35+oXH5mwby1C1wOnUAq k/U7oEt+J8JceswdZn5zw4YfBTo8tdQm55etlZDwfofpCT8vzzH8aY3GMbYbtKCvknPQ sJWQXx3uP2JAURdWO48ESTcGuNVqyoZJPAXPCXhfn+2nUIcZPRzATBGVZcEROxTaugYQ N1zsaw8KysYXqR9/79JZ90m8mDY97Y4wybxn5pb8bbp872Xd4WQepQdkBX2rQc/JJ1Qf pCZu+Apo/CKsUH8pKqtsmNQv50TpB3L1nd4dmLZN3K2FeEoYkrSNmuylmzcGUbN9ShuA b9HA== X-Gm-Message-State: AO0yUKUIbmnnwQ+4jFf6ew8DqPhnMYZT2Wja4ir075m5ZQp8hoMjXaNx q/BomFWn91pJHVO2Bj+YmMfHJZhBRpX9+O5/9EDN1r4mfgQYbegk X-Google-Smtp-Source: AK7set84lO3SsfFuUDeS+Kps7XUhTT5eaj0+9vR9VjPzkaGZhZThhBK8LQfPzgW16dKskNPMKVP7TAWQroqv+JhVNNY= X-Received: by 2002:ae9:f00d:0:b0:745:6afc:9bb2 with SMTP id l13-20020ae9f00d000000b007456afc9bb2mr2998764qkg.14.1678902909111; Wed, 15 Mar 2023 10:55:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kieran Kunhya Date: Wed, 15 Mar 2023 17:54:58 +0000 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] avcodec/h264dec: Remove dead function 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Wed, 15 Mar 2023 at 17:17, Andreas Rheinhardt < andreas.rheinhardt@outlook.com> wrote: > Andreas Rheinhardt: > > The H.264 decoder does not support draw_horiz_band (it does not have > > the AV_CODEC_CAP_DRAW_HORIZ_BAND), making ff_h264_draw_horiz_band() > > practically dead. > > > > Signed-off-by: Andreas Rheinhardt > > --- > > libavcodec/dxva2_h264.c | 7 +------ > > libavcodec/h264_slice.c | 2 -- > > libavcodec/h264dec.c | 35 ----------------------------------- > > libavcodec/h264dec.h | 2 -- > > libavcodec/vaapi_h264.c | 11 +---------- > > libavcodec/vdpau_h264.c | 2 -- > > 6 files changed, 2 insertions(+), 57 deletions(-) > > > > diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c > > index 6300b1418d..26e18a71b0 100644 > > --- a/libavcodec/dxva2_h264.c > > +++ b/libavcodec/dxva2_h264.c > > @@ -499,20 +499,15 @@ static int dxva2_h264_decode_slice(AVCodecContext > *avctx, > > static int dxva2_h264_end_frame(AVCodecContext *avctx) > > { > > H264Context *h = avctx->priv_data; > > - H264SliceContext *sl = &h->slice_ctx[0]; > > struct dxva2_picture_context *ctx_pic = > > h->cur_pic_ptr->hwaccel_picture_private; > > - int ret; > > > > if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0) > > return -1; > > - ret = ff_dxva2_common_end_frame(avctx, h->cur_pic_ptr->f, > > + return ff_dxva2_common_end_frame(avctx, h->cur_pic_ptr->f, > > &ctx_pic->pp, sizeof(ctx_pic->pp), > > &ctx_pic->qm, sizeof(ctx_pic->qm), > > commit_bitstream_and_slice_buffer); > > - if (!ret) > > - ff_h264_draw_horiz_band(h, sl, 0, h->avctx->height); > > - return ret; > > } > > > > #if CONFIG_H264_DXVA2_HWACCEL > > diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c > > index 7767e16cf1..912f1ea9c7 100644 > > --- a/libavcodec/h264_slice.c > > +++ b/libavcodec/h264_slice.c > > @@ -2490,8 +2490,6 @@ static void decode_finish_row(const H264Context > *h, H264SliceContext *sl) > > top = 0; > > } > > > > - ff_h264_draw_horiz_band(h, sl, top, height); > > - > > if (h->droppable || h->er.error_occurred) > > return; > > > > diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c > > index 2d691731c5..023716645f 100644 > > --- a/libavcodec/h264dec.c > > +++ b/libavcodec/h264dec.c > > @@ -96,41 +96,6 @@ static void h264_er_decode_mb(void *opaque, int ref, > int mv_dir, int mv_type, > > ff_h264_hl_decode_mb(h, &h->slice_ctx[0]); > > } > > > > -void ff_h264_draw_horiz_band(const H264Context *h, H264SliceContext *sl, > > - int y, int height) > > -{ > > - AVCodecContext *avctx = h->avctx; > > - const AVFrame *src = h->cur_pic.f; > > - const AVPixFmtDescriptor *desc = > av_pix_fmt_desc_get(avctx->pix_fmt); > > - int vshift = desc->log2_chroma_h; > > - const int field_pic = h->picture_structure != PICT_FRAME; > > - if (field_pic) { > > - height <<= 1; > > - y <<= 1; > > - } > > - > > - height = FFMIN(height, avctx->height - y); > > - > > - if (field_pic && h->first_field && !(avctx->slice_flags & > SLICE_FLAG_ALLOW_FIELD)) > > - return; > > - > > - if (avctx->draw_horiz_band) { > > - int offset[AV_NUM_DATA_POINTERS]; > > - int i; > > - > > - offset[0] = y * src->linesize[0]; > > - offset[1] = > > - offset[2] = (y >> vshift) * src->linesize[1]; > > - for (i = 3; i < AV_NUM_DATA_POINTERS; i++) > > - offset[i] = 0; > > - > > - emms_c(); > > - > > - avctx->draw_horiz_band(avctx, src, offset, > > - y, h->picture_structure, height); > > - } > > -} > > - > > void ff_h264_free_tables(H264Context *h) > > { > > int i; > > diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h > > index 9a1ec1bace..28f62dbbba 100644 > > --- a/libavcodec/h264dec.h > > +++ b/libavcodec/h264dec.h > > @@ -787,8 +787,6 @@ void ff_h264_unref_picture(H264Context *h, > H264Picture *pic); > > > > void ff_h264_slice_context_init(H264Context *h, H264SliceContext *sl); > > > > -void ff_h264_draw_horiz_band(const H264Context *h, H264SliceContext > *sl, int y, int height); > > - > > /** > > * Submit a slice for decoding. > > * > > diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c > > index 9332aa6f31..386adae346 100644 > > --- a/libavcodec/vaapi_h264.c > > +++ b/libavcodec/vaapi_h264.c > > @@ -311,17 +311,8 @@ static int vaapi_h264_end_frame(AVCodecContext > *avctx) > > { > > const H264Context *h = avctx->priv_data; > > VAAPIDecodePicture *pic = h->cur_pic_ptr->hwaccel_picture_private; > > - H264SliceContext *sl = &h->slice_ctx[0]; > > - int ret; > > > > - ret = ff_vaapi_decode_issue(avctx, pic); > > - if (ret < 0) > > - goto finish; > > - > > - ff_h264_draw_horiz_band(h, sl, 0, h->avctx->height); > > - > > -finish: > > - return ret; > > + return ff_vaapi_decode_issue(avctx, pic); > > } > > > > /** Decode the given H.264 slice with VA API. */ > > diff --git a/libavcodec/vdpau_h264.c b/libavcodec/vdpau_h264.c > > index 525e208495..d39dbdd042 100644 > > --- a/libavcodec/vdpau_h264.c > > +++ b/libavcodec/vdpau_h264.c > > @@ -201,7 +201,6 @@ static int vdpau_h264_decode_slice(AVCodecContext > *avctx, > > static int vdpau_h264_end_frame(AVCodecContext *avctx) > > { > > H264Context *h = avctx->priv_data; > > - H264SliceContext *sl = &h->slice_ctx[0]; > > H264Picture *pic = h->cur_pic_ptr; > > struct vdpau_picture_context *pic_ctx = > pic->hwaccel_picture_private; > > int val; > > @@ -210,7 +209,6 @@ static int vdpau_h264_end_frame(AVCodecContext > *avctx) > > if (val < 0) > > return val; > > > > - ff_h264_draw_horiz_band(h, sl, 0, h->avctx->height); > > return 0; > > } > > > > Will apply this patch tomorrow unless there are objections. > > - Andreas > Err...this used to work, what changed? Kieran _______________________________________________ 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".