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 C968C40532 for ; Sat, 26 Mar 2022 15:42:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0FBEF68B205; Sat, 26 Mar 2022 17:42:55 +0200 (EET) Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 70FBA68B1E1 for ; Sat, 26 Mar 2022 17:42:49 +0200 (EET) Received: by mail-qv1-f46.google.com with SMTP id hu11so8540424qvb.7 for ; Sat, 26 Mar 2022 08:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=DAGu6ybKSzSjcaAwyiBCY3CBnVVjjYkTTKlDsj+LwOI=; b=Z76vhYKBliUX89AJy2DJ1qNKixb6ExcFYcpM0SYqiybNzLmANwH8cV7GAA8kdY+DIF 97pvomUcpCAXALC1nrTfAnd3EPdcHZ4toIBiOipY1fVP80fXx0HAg31eoVaWvoOZ097Z w+UBI+H/A+vQP0EW4FRR5bIzFZfUdkp8IMCzOkrHz4iN7r+VxKS6thkZTQm+vpryQ0Um rYr4LuA4zrlbNjXYLZrT+dJ6tpgAjPNpTgoI9RVuobydEaLWQslucVWUtWHWhOwpjOo+ V3iYj0vmXHcCXJnz4zyMJSydb7zOFNouT096LKQdFT5IM7uXrlZg1X4BagkTIN1yMAcc Dpbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=DAGu6ybKSzSjcaAwyiBCY3CBnVVjjYkTTKlDsj+LwOI=; b=TmfjrBX8AA5d5tvxq4fY9ZLfmsjZOwlmP3xILSDGEi6pVkaqdk8oY9CuiBcgeycwr0 ziU3XZTm8f2f/+siRGAumiCZadHUmnVCeKgaajrKgX6F015euFSKLcO5JPViF5gBLoMm eV1o0YD6F1D7PMtVy6tAVqft5PQ0Nkvj8zHJdnSfH8iIHRaTttTSyAw6EtaxLPkTz/oP sxJKEdBRT7pN3com0/bH02T7VTJ8aBYgm2ztMh+C5xSfAWeEPgk3SrhQHoHHG6fK3Ufz lQFzhzfwixwbcFWz9QlxYnvPIncunlygn9b4KGoyqLYzPaz9s4SBZiQmkuiUMwjrzLKK DiGg== X-Gm-Message-State: AOAM532PQ8TlrdGxJ9uNv3oTkmwejAZs83vuMQJsrSll4B4jgQmzPibV V531mhKpKct5HQtnACPa7JXHzNYDsh0= X-Google-Smtp-Source: ABdhPJz9amXGoKMWhMbWEFm1XhbEuEF64MjQ6VSAj4zhFkIY8zxyrk3LdxbuHrx+zK6RoLWgk+7O0w== X-Received: by 2002:a05:6214:7f2:b0:440:fa89:7fd8 with SMTP id bp18-20020a05621407f200b00440fa897fd8mr13801822qvb.94.1648309367801; Sat, 26 Mar 2022 08:42:47 -0700 (PDT) Received: from jackie (pool-108-20-201-137.bstnma.fios.verizon.net. [108.20.201.137]) by smtp.gmail.com with ESMTPSA id y196-20020a3764cd000000b0067d51bbacdfsm5271726qkb.107.2022.03.26.08.42.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Mar 2022 08:42:47 -0700 (PDT) Date: Sat, 26 Mar 2022 11:42:45 -0400 From: Andriy Gelman To: FFmpeg development discussions and patches Message-ID: <20220326154245.oy4usrr2fvymk2xx@jackie> References: <20220104090836.31660-1-ming.qian@nxp.com> <20220104090836.31660-7-ming.qian@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [FFmpeg-devel] [EXT] [PATCH v5 7/7] avcodec/v4l2_m2m_dec: setup capture queue before enqueue the first frame 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: Ming Qian 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: Hi Ming, On Mon, 21. Mar 07:27, Ming Qian wrote: > Hi Andriy, > > What do you think of this patch? > > The Initialization flow defined in linux/Documentation/userspace-api/media/v4l/dev-decoder.rst > 1. Set the coded format on OUTPUT via VIDIOC_S_FMT(). > 2. Allocate source (bytestream) buffers via VIDIOC_REQBUFS() on OUTPUT. > 3. Start streaming on the OUTPUT queue via VIDIOC_STREAMON(). > 4. This step only applies to coded formats that contain resolution information in the stream. Continue queuing/dequeuing bytestream buffers to/from the OUTPUT queue via VIDIOC_QBUF() and VIDIOC_DQBUF(). The buffers will be processed and returned to the client in order, until required metadata to configure the CAPTURE queue are found. This is indicated by the decoder sending a V4L2_EVENT_SOURCE_CHANGE event with changes set to V4L2_EVENT_SRC_CH_RESOLUTION. > Note: A client capable of acquiring stream parameters from the bytestream on its own may attempt to set the width and height of the OUTPUT format to non-zero values matching the coded size of the stream, skip this step and continue with the Capture Setup sequence. > > 5. Continue with the Capture Setup sequence. > > In ffmpeg's implementation, ffmpeg will set non-zero width and height on output queue, so the step 4 should be skipped, and setup the capture queue directly. > So the flow should be: > 1. Set the coded format and valid resolution on OUTPUT via VIDIOC_S_FMT(). > 2. Allocate source (bytestream) buffers via VIDIOC_REQBUFS() on OUTPUT. > 3. Start streaming on the OUTPUT queue via VIDIOC_STREAMON(). > 5. Continue with the Capture Setup sequence. > > And this patch is just following the above flow. > > Ming The v4 version didn't work for me on odroid xu4 http://ffmpeg.org/pipermail/ffmpeg-devel/2022-January/290679.html I haven't had time retest but don't think anything has changed. -- Andriy _______________________________________________ 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".