From patchwork Fri Jan 19 03:19:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhong Li X-Patchwork-Id: 7342 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.156.27 with SMTP id q27csp308964jak; Thu, 18 Jan 2018 19:19:34 -0800 (PST) X-Google-Smtp-Source: ACJfBouSZI4n53qsoNrd2h19z/63MuaT3C5I8Yy/vwQcLeRI706nwtKBbSTzCsfZb8DDerAJwdop X-Received: by 10.223.139.11 with SMTP id n11mr7432400wra.102.1516331974016; Thu, 18 Jan 2018 19:19:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516331973; cv=none; d=google.com; s=arc-20160816; b=csjVGwKANC3IfuWmHkIIFCDSXYEOQdHh3bVEHKH/LzYknNDBzseOuCs860+yV15EXM TaBhumC5V38pe3+jjzuUPZynpNy2gDAiHklwT4KLwA7fUDVHlemJ9Ho/M3ErbMVy6eyU w+7d2T2IWOwdnSRPkwMML5dHJQwZy/87gM63+BkZHwzMLkSUTo7WLY3SMVt4QwBQZlpe UPa9rxct4HFPQr2sxP6ygida+WzmXn1u/GiwiWPvIsbwAYuHDjUlrgR7hSEK1qBDVJF4 XTyTTFPRlEGSWVxctXLLryZ64I6WyP04unuN4tZoMWcYuEXxTpDNWPTXznKsSx9NLIIg 6Bvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:dlp-reaction:dlp-version :dlp-product:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:to:from:delivered-to :arc-authentication-results; bh=V8eHj8DNdhHI2/ScvDUN267gXbk1RmJzTNg/oTPqVVU=; b=ODtOyr+bkPm3HjRXkG/YeTutfLZYHeKWytr5pp6eTMczlzSPQEbdB87IWAFNpWrD7t RhnYiGmoel69W4CHR3paVOkXawks2Lb4BZSDZj568EZuCBOUYqiaUBTg7As0bcqzzhng X1UH+VXWAOP2YYgbt6jl/nRlhyQP6Lh67D9keDM5FOrU0ArBsJ8CVOkmOsuFtqg2XI3j o2ooPpV+FUJwAqMBmvagRHsd3w0bY3ia4sNyfWtSi01wLtXwyAU3+kOJu/muEWzZe3Tv stWSvzu88p+wVxNBmikTyPpd1iE10gsDm8FG4KPZ8HohL9CXiMphw4UWDUOFgfzC8VZL +Rug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id m25si7522770wrb.162.2018.01.18.19.19.33; Thu, 18 Jan 2018 19:19:33 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3CE3868A345; Fri, 19 Jan 2018 05:19:32 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1AAF9689885 for ; Fri, 19 Jan 2018 05:19:24 +0200 (EET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jan 2018 19:19:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,380,1511856000"; d="scan'208";a="11405421" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga007.fm.intel.com with ESMTP; 18 Jan 2018 19:19:23 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 18 Jan 2018 19:19:22 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 18 Jan 2018 19:19:22 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.189]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Fri, 19 Jan 2018 11:19:20 +0800 From: "Li, Zhong" To: FFmpeg development discussions and patches Thread-Topic: [FFmpeg-devel] [PATCH 1/2] lavc: Add coded_w/h to AVCodecParameters Thread-Index: AQHTkBn3Tkps8GbglkSsonxMvYIZxaN4kDAAgAH3ZfA= Date: Fri, 19 Jan 2018 03:19:20 +0000 Message-ID: <7D9B0A5171224A4A9A6308992BC4469B3BC46423@shsmsx102.ccr.corp.intel.com> References: <1516251814-6220-1-git-send-email-zhong.li@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2ZmNzI0ZjgtNzQxYS00ODI3LWI1NzktODIzODQwYWI5ZTY3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiI2TDM1SzRocWdjNGJLTXo4THM0QVllVkQzM2RZcnpzQTlScFpjOG9aTnpseWlEbmd3NStLUXRJU2toUnNCZEU5In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 1/2] lavc: Add coded_w/h to AVCodecParameters 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" > -----Original Message----- > From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf > Of James Almer > Sent: Thursday, January 18, 2018 1:15 PM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH 1/2] lavc: Add coded_w/h to > AVCodecParameters > > On 1/18/2018 2:03 AM, Zhong Li wrote: > > coded_width/height may be different from width/height sometimes > > > (e.g, crop or lowres cases). > > Which is why it's not a field that belongs to AVCodecParameters. > > Codec level cropping has nothing to do with containers. Same with lowres, > which is an internal feature, and scheduled for removal. Got it. How about fixing ticket #6958 as below? ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 0e7a771..233760d 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2512,10 +2512,12 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id case AVMEDIA_TYPE_VIDEO: print_int("width", par->width); print_int("height", par->height); +#if FF_API_LAVF_AVCTX if (dec_ctx) { print_int("coded_width", dec_ctx->coded_width); print_int("coded_height", dec_ctx->coded_height); } +#endif print_int("has_b_frames", par->video_delay); sar = av_guess_sample_aspect_ratio(fmt_ctx, stream, NULL); if (sar.den) { @@ -2912,6 +2914,10 @@ static int open_input_file(InputFile *ifile, const char *filename) ist->dec_ctx->pkt_timebase = stream->time_base; ist->dec_ctx->framerate = stream->avg_frame_rate; +#if FF_API_LAVF_AVCTX + ist->dec_ctx->coded_width = stream->codec->coded_width; + ist->dec_ctx->coded_height = stream->codec->coded_height; +#endif _______________________________________________ ffmpeg-devel mailing list