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 1432E410B3 for ; Mon, 12 Sep 2022 23:50:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E126768B440; Tue, 13 Sep 2022 02:50:09 +0300 (EEST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F16D468B440 for ; Tue, 13 Sep 2022 02:50:02 +0300 (EEST) Received: by mail-pl1-f174.google.com with SMTP id iw17so10124631plb.0 for ; Mon, 12 Sep 2022 16:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=N1VjGaauDIRA90G/40GpiBYn/sDu/tQIlMGneH7G0+o=; b=YUnK79nCMEIQ9uMnA5IVhcx44LHYzZe2ePhPg6xRx7PP1ouhdxUuTI86FHpsCf0ZAa uc+zdwsFinOiQy9zb2hgvIaXr0ZFyfOm/IMyfpBjLSxL6KURAbGbgBlLxEwmeaFwfnt2 0kLWMBY1ckrIKYIDU9kJqeqWBeLNrQaXO5FlfDQUbUKl9I2luwl/WhrATW/w//4TYYEb kUormH6o1aFfcjq242NZBop002/Gia5r2QlHnL05lYoLIFTgfUIpEX/p6P5dgH9e/QsK 0Y2EIdDQGg/Avr4IRW7vOu8oI5dGvki9sqnlI5/95CLv0bK8MGnpnJ68ta0Zw2k3cmQn KHKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=N1VjGaauDIRA90G/40GpiBYn/sDu/tQIlMGneH7G0+o=; b=0eaQUkqDCVxh/TVPnPgnUOO397VBdWnC5mwgGlxr0SPtokTC7p8aWxJ0ZiVsQXPJU3 L/d+OVWWQZKfZfeWZxOxpso03+huBacFL3lzohz98cHERrKHrzx6Nwhxhf505XQo5cuz V7KuaK358uER2orH4vc+T/Vkue7lN/4t18hygqPQZpCPeyqSDnIROV1D7WMP/pZ6Wei2 N+W63lWIora5vNj778RPUU8d0um3nUdi55s6+A3j2WriypMbHEh/iasOLWp4K4M8CBld AdC4tuSGb8vxx/i0WI3PH846uylTlgq960fF9ty1p0J1D0j+6Xjwo2tvYz4cuK8wIOnX Hugw== X-Gm-Message-State: ACgBeo2RJsPArvFMOxnnWS07CIJp03UZceIok7XQF6a3fwFnB+YWs6Id jHMnssQsvynOPEjzjq4dsxtUIfWi1rI= X-Google-Smtp-Source: AA6agR5IUFLM3s5HMuoAiXoO9PEUtE4+l+S9obnHQYiBb3EJpytgborVAETo1LfHz27AKAjQ+Mt8mg== X-Received: by 2002:a17:90a:1f49:b0:202:7a55:558f with SMTP id y9-20020a17090a1f4900b002027a55558fmr917533pjy.108.1663026600507; Mon, 12 Sep 2022 16:50:00 -0700 (PDT) Received: from wilferico.thefacebook.com ([2620:10d:c090:400::5:62d5]) by smtp.gmail.com with ESMTPSA id s8-20020a17090a880800b0020036e008bcsm5895518pjn.4.2022.09.12.16.49.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Sep 2022 16:49:59 -0700 (PDT) From: Chema Gonzalez To: ffmpeg-devel@ffmpeg.org, u@pkh.me, rsbultje@gmail.com Date: Mon, 12 Sep 2022 16:49:56 -0700 Message-Id: <20220912234956.2879286-1-chemag@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] doc/examples/extract_mvs: add motion information 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 Cc: Chema Gonzalez 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: Note that the motion information includes subpel motion information This was likely forgotten in 56bdf61baa04c4fd8d165f34499115ce0aa97c43. Tested: ``` $ make examples -j ... $ doc/examples/extract_mvs in.264 | head -40 | \ csvcut -C framenum,source,flags |csvlook | blockw | blockh | srcx | srcy | dstx | dsty | motion_x | motion_y | motion_scale | | ------ | ------ | ----- | ---- | ----- | ---- | -------- | -------- | ------------ | | 16 | 16 | 20 | 26 | 8 | 8 | 49 | 72 | 4 | | 16 | 16 | 152 | 15 | 136 | 8 | 65 | 28 | 4 | | 16 | 8 | 360 | 3 | 360 | 4 | 1 | -6 | 4 | | 16 | 8 | 360 | 13 | 360 | 12 | -1 | 4 | 4 | | 16 | 16 | 440 | 10 | 440 | 8 | 3 | 10 | 4 | | 8 | 16 | 829 | 7 | 836 | 8 | -31 | -6 | 4 | | 8 | 16 | 844 | 7 | 844 | 8 | -1 | -4 | 4 | | 16 | 16 | 1,004 | 14 | 1,048 | 8 | -177 | 24 | 4 | | 16 | 16 | 1,096 | 8 | 1,096 | 8 | -1 | 0 | 4 | | 16 | 8 | 1,417 | 24 | 1,416 | 4 | 7 | 82 | 4 | | 16 | 8 | 1,416 | 13 | 1,416 | 12 | 0 | 6 | 4 | | 16 | 8 | 87 | 20 | 88 | 20 | -7 | 0 | 4 | | 16 | 8 | 99 | 44 | 88 | 28 | 45 | 66 | 4 | ... ``` Also: ``` $ make fate -j ... ``` --- doc/examples/extract_mvs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/examples/extract_mvs.c b/doc/examples/extract_mvs.c index cc1311da91..b80ba26bb7 100644 --- a/doc/examples/extract_mvs.c +++ b/doc/examples/extract_mvs.c @@ -61,10 +61,11 @@ static int decode_packet(const AVPacket *pkt) const AVMotionVector *mvs = (const AVMotionVector *)sd->data; for (i = 0; i < sd->size / sizeof(*mvs); i++) { const AVMotionVector *mv = &mvs[i]; - printf("%d,%2d,%2d,%2d,%4d,%4d,%4d,%4d,0x%"PRIx64"\n", + printf("%d,%2d,%2d,%2d,%4d,%4d,%4d,%4d,0x%"PRIx64",%4d,%4d,%4d\n", video_frame_count, mv->source, mv->w, mv->h, mv->src_x, mv->src_y, - mv->dst_x, mv->dst_y, mv->flags); + mv->dst_x, mv->dst_y, mv->flags, + mv->motion_x, mv->motion_y, mv->motion_scale); } } av_frame_unref(frame); @@ -166,7 +167,7 @@ int main(int argc, char **argv) goto end; } - printf("framenum,source,blockw,blockh,srcx,srcy,dstx,dsty,flags\n"); + printf("framenum,source,blockw,blockh,srcx,srcy,dstx,dsty,flags,motion_x,motion_y,motion_scale\n"); /* read frames from the file */ while (av_read_frame(fmt_ctx, pkt) >= 0) { -- 2.37.3 _______________________________________________ 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".