From patchwork Mon Feb 24 12:37:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 17903 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id CB9C144A135 for ; Mon, 24 Feb 2020 14:39:26 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B125068B497; Mon, 24 Feb 2020 14:39:26 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.red.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 790E868B481 for ; Mon, 24 Feb 2020 14:39:19 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail.red.khirnov.net (Postfix) with ESMTP id 1E80B2951A9 for ; Mon, 24 Feb 2020 13:39:19 +0100 (CET) Received: from mail.red.khirnov.net ([IPv6:::1]) by localhost (mail.red.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id ekn0qU4F48l2 for ; Mon, 24 Feb 2020 13:39:17 +0100 (CET) Received: from quelana.khirnov.net (unknown [IPv6:2002:b061:f0a:201:5e:e696:5100:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "quelana.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail.red.khirnov.net (Postfix) with ESMTPS id 11AB3295126 for ; Mon, 24 Feb 2020 13:39:17 +0100 (CET) Received: from localhost (quelana.khirnov.net [IPv6:::1]) by quelana.khirnov.net (Postfix) with ESMTP id 8979825237 for ; Mon, 24 Feb 2020 13:39:16 +0100 (CET) Received: from quelana.khirnov.net ([IPv6:::1]) by localhost (quelana.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id gR-BdgE6dW4I for ; Mon, 24 Feb 2020 13:39:14 +0100 (CET) Received: from libav.daenerys.khirnov.net (libav.daenerys.khirnov.net [IPv6:2a00:c500:561:201::7]) by quelana.khirnov.net (Postfix) with ESMTP id 6B3A62522B for ; Mon, 24 Feb 2020 13:39:14 +0100 (CET) Received: by libav.daenerys.khirnov.net (Postfix, from userid 1000) id 242C220E0356; Mon, 24 Feb 2020 13:39:11 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Feb 2020 13:37:31 +0100 Message-Id: <20200224123739.31154-5-anton@khirnov.net> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200224123739.31154-1-anton@khirnov.net> References: <20200224123739.31154-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 04/12] vf_codecview: drop qp functionality X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" It depends on API that has been deprecated for five years and is of highly dubious usefulness. --- doc/filters.texi | 3 --- libavfilter/vf_codecview.c | 26 -------------------------- 2 files changed, 29 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 2a1235183f..43e52f930a 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -7182,9 +7182,6 @@ forward predicted MVs of B-frames backward predicted MVs of B-frames @end table -@item qp -Display quantization parameters using the chroma planes. - @item mv_type, mvt Set motion vectors type to visualize. Includes MVs from all frames unless specified by @var{frame_type} option. diff --git a/libavfilter/vf_codecview.c b/libavfilter/vf_codecview.c index 331bfba777..2657660b97 100644 --- a/libavfilter/vf_codecview.c +++ b/libavfilter/vf_codecview.c @@ -50,7 +50,6 @@ typedef struct CodecViewContext { unsigned frame_type; unsigned mv_type; int hsub, vsub; - int qp; } CodecViewContext; #define OFFSET(x) offsetof(CodecViewContext, x) @@ -62,7 +61,6 @@ static const AVOption codecview_options[] = { CONST("pf", "forward predicted MVs of P-frames", MV_P_FOR, "mv"), CONST("bf", "forward predicted MVs of B-frames", MV_B_FOR, "mv"), CONST("bb", "backward predicted MVs of B-frames", MV_B_BACK, "mv"), - { "qp", NULL, OFFSET(qp), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, .flags = FLAGS }, { "mv_type", "set motion vectors type", OFFSET(mv_type), AV_OPT_TYPE_FLAGS, {.i64=0}, 0, INT_MAX, FLAGS, "mv_type" }, { "mvt", "set motion vectors type", OFFSET(mv_type), AV_OPT_TYPE_FLAGS, {.i64=0}, 0, INT_MAX, FLAGS, "mv_type" }, CONST("fp", "forward predicted MVs", MV_TYPE_FOR, "mv_type"), @@ -218,30 +216,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) CodecViewContext *s = ctx->priv; AVFilterLink *outlink = ctx->outputs[0]; - if (s->qp) { - int qstride, qp_type; - int8_t *qp_table = av_frame_get_qp_table(frame, &qstride, &qp_type); - - if (qp_table) { - int x, y; - const int w = AV_CEIL_RSHIFT(frame->width, s->hsub); - const int h = AV_CEIL_RSHIFT(frame->height, s->vsub); - uint8_t *pu = frame->data[1]; - uint8_t *pv = frame->data[2]; - const int lzu = frame->linesize[1]; - const int lzv = frame->linesize[2]; - - for (y = 0; y < h; y++) { - for (x = 0; x < w; x++) { - const int qp = ff_norm_qscale(qp_table[(y >> 3) * qstride + (x >> 3)], qp_type) * 128/31; - pu[x] = pv[x] = qp; - } - pu += lzu; - pv += lzv; - } - } - } - if (s->mv || s->mv_type) { AVFrameSideData *sd = av_frame_get_side_data(frame, AV_FRAME_DATA_MOTION_VECTORS); if (sd) {