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 845C642879 for ; Sat, 8 Jan 2022 17:13:27 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E1A2068A86C; Sat, 8 Jan 2022 19:13:24 +0200 (EET) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D8E3E68A21C for ; Sat, 8 Jan 2022 19:13:18 +0200 (EET) Received: by mail-qt1-f176.google.com with SMTP id o17so9081891qtk.1 for ; Sat, 08 Jan 2022 09:13:18 -0800 (PST) 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=HI9bFVDuLCm0JqAxxCfNf2iu71pES5D1WlfQ57/lUfg=; b=lyqcQH0YrYAvV1rfYWd8IWtw7t00puIYEo3gj3QQNExratxKg7WTwwmqg/qYrZE43D hnvC4Yxh0wvSrMlvVV/TXV7GSdRBjxMijQFbUsILzmDP7OvdMnFQal8Np7k55sRZwYSW BRt7l8Ml9ZVPSSwA8Hygcl4O1ZOrvjL2p9MzjlFotnk5Ueu9p3ARHPpwn8SkI0M8SB2t nVxqTpI1m3UYYxQnYmjPfF36SFtMpEPrx47rlKgmr5QmDvUAWuCoSHNmfM6Vf+Zv8Aij FRW02GSdzAb/+hHtpfYSDl/zpxNUEaDIxCWhI2lEgF8bFltD38PfQ0iNG8MfOzr761TQ k6AA== 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=HI9bFVDuLCm0JqAxxCfNf2iu71pES5D1WlfQ57/lUfg=; b=400ukhXDy1nieMSDhRlppg4yRL/GzmJhafAv5HSGRk9frqYcvHOVT7LofKu3Cdc5yJ iU+g+hjq2rZuRbDc9DJRm94JruLUloPLWQnNeNPyGiAJivq/ARp1mDngyOgVNNMQR0ug yUKF1BlU8qHJUcwzcL6gZ3EKScPC7uKF9zpygJXYD6VDX+gqfFX36vktwtk1xBGZN5XQ /9pzb3d95hmOifUSq5qwNN4hx9WYfKdwVm+2OkxKElgUOaY9/gy1oUA0LZ2ZvKl5fQoP htAYPmDQSukbwx5HT3AGlLRmIMaaGA6dMgeytgR1ygEZZS2k3xNasNs1E+SrVIBz5W2g EDsw== X-Gm-Message-State: AOAM530QBpHt1PloV4AjVbtoiMVRoAniODUHxc6y3zP2QnV43/ADiTnh wizO3AHHU3iU/93V/n7ci8w= X-Google-Smtp-Source: ABdhPJwGN6n+pmI8s3NAXxYMsWwVZbC++JuBtZpW4nqdcde63EIjoiaLwgZLsvqUfGW7grJJyqohOw== X-Received: by 2002:a05:622a:13ca:: with SMTP id p10mr10518157qtk.225.1641661997385; Sat, 08 Jan 2022 09:13:17 -0800 (PST) Received: from jackie (pool-108-20-185-127.bstnma.fios.verizon.net. [108.20.185.127]) by smtp.gmail.com with ESMTPSA id br13sm1333764qkb.10.2022.01.08.09.13.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Jan 2022 09:13:16 -0800 (PST) Date: Sat, 8 Jan 2022 12:13:15 -0500 From: Andriy Gelman To: Ming Qian Message-ID: <20220108171315.zpuxgjxvu7lxswxa@jackie> References: <20210819085533.1174-1-ming.qian@nxp.com> <20210819085533.1174-2-ming.qian@nxp.com> <20220102164106.ptu4eet7rmwla7bg@jackie> <20220104224813.cfsz6oafoi7a2qwp@jackie> <20220104225802.btiwwikprkeaqf2e@jackie> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220104225802.btiwwikprkeaqf2e@jackie> Subject: Re: [FFmpeg-devel] [EXT] Re: [PATCH v4 2/3] avcodec/v4l2_context: resume the decoding process after source change event received. 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: 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 Tue, 04. Jan 17:58, Andriy Gelman wrote: > On Tue, 04. Jan 17:48, Andriy Gelman wrote: > > Hi Ming, > > > > On Tue, 04. Jan 07:51, Ming Qian wrote: > > > > > > > -----Original Message----- > > > > From: Andriy Gelman [mailto:andriy.gelman@gmail.com] > > > > Sent: Monday, January 3, 2022 12:41 AM > > > > To: FFmpeg development discussions and patches > > > > Cc: Ming Qian > > > > Subject: [EXT] Re: [FFmpeg-devel] [PATCH v4 2/3] avcodec/v4l2_context: > > > > resume the decoding process after source change event received. > > > > > > > > Caution: EXT Email > > > > > > > > On Thu, 19. Aug 16:55, Ming Qian wrote: > > > > > client need to resume the decoding process after it dequeues the > > > > > source change event. > > > > > no matter what's the return value of v4l2_resolution_changed(). > > > > > if the client doesn't resume the decoding process, the decoder may > > > > > keep waiting > > > > > > > > > > in documentation of v4l2 stateful decoder, we can see the following > > > > > description: > > > > > The client must continue the sequence as described below to > > > > > continue the decoding process. > > > > > 1. Dequeue the source change event. > > > > > Important > > > > > A source change triggers an implicit decoder drain, > > > > > similar to the explicit Drain sequence. The decoder is > > > > > stopped after it completes. The decoding process must be > > > > > resumed with either a pair of calls to > > > > > VIDIOC_STREAMOFF() and VIDIOC_STREAMON() on the > > > > CAPTURE > > > > > queue, or a call to VIDIOC_DECODER_CMD() with the > > > > > V4L2_DEC_CMD_START command. > > > > > 2. Continue with the Capture Setup sequence. > > > > > > > > Please also add that this fixes decoding of > > > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstreams > > > > .videolan.org%2Fffmpeg%2Fincoming%2F720p60.mp4&data=04%7C01% > > > > 7Cming.qian%40nxp.com%7Cea94a9c4cc0643b0a41f08d9ce0eadc5%7C686e > > > > a1d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C637767384703207931%7CU > > > > nknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6 > > > > Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=X4rKQX19MQg1gO3ILiBCQ > > > > qSLIvqovZLA95KKiyoVNzI%3D&reserved=0 on RPi4. > > > > > > > > > > > > Hi Andriy, > > > What's wrong with this stream? Everything is normal on my side when I play it using ffplay. > > > > > > > > I couldn't decode the file on the Raspberry Pi4. After enqueuing the first few packets > > there was a dynamic resolution change event, and the start decode command > > was not sent. This is fixed by your patch. > > Also you may have to upgrade kernel to reproduce. It may have been working fine > before this commit: > https://github.com/raspberrypi/linux/commit/b7e6b495eff31298ba4665f71b2414cc9a8f99c2#diff-93defb6da917ce9bb43cb195d0e61f81673c5183ac75d631f3e1ee475a810dd6 > I confirmed the above. I'll apply patches 1 and 3 from this series later tonight if no one objects. -- 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".