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 C6EF74AA3F for ; Tue, 7 May 2024 20:22:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A8CE368CE03; Tue, 7 May 2024 23:22:09 +0300 (EEST) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2764368CD95 for ; Tue, 7 May 2024 23:22:03 +0300 (EEST) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-41ebcf01013so799875e9.0 for ; Tue, 07 May 2024 13:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20230601.gappssmtp.com; s=20230601; t=1715113322; x=1715718122; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=fvD4bc9n8lN8NOsestjFLrA4XSQpDd8dtSv1F9N4WKA=; b=WuR8X4u5Ierwr9u0raEP/i5v466OHqcEqfN4Ib0rfW6652LbDQ4OOXOScuLc19gCr9 zSAqd7+I1Vag/UcjAbqNaHj1Amf06TRJg2VHo7fQYAEwNSIUmt1nma53J8AfpJMXy3zr tIIGArz61t2kdshvdCAzK4bC3IJzEYWJ7iBW2sRi6CWF3gAe+JbolvpXE/Qwaezsvgk8 NFnHYMknl68RSOKAP+kEBlZfP+qZVE/8xQXvV8tKUvM0RmBGTXVUKuBo0bkjBAqNz4SU WpXJu0kj93yPM07QfdkyAKa13yvIGiqCphaTRUveO4rf8DvYYZ1kFegrRHu4XAoW51HJ R9Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715113322; x=1715718122; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fvD4bc9n8lN8NOsestjFLrA4XSQpDd8dtSv1F9N4WKA=; b=eF0O6TD8DfSM9reZNlnYrfUXAwjOd6JaddxMIoING4OLqrDfQBv3gaR2zxVEiB7NQL PmaWrxXWZyk9ikxh0L5Vf9CGdoKLvhTVLsZQdq5ciFK182f8ys5RNKdFW3ryeaj+4sKQ 4nNvKHbKrPY1lWug+PiPFqwCQHPxphjZoCzeBNYRiRYun8YQSwGy14Jy255LeHVjzCcp lP4+UJvxmxO8qq2VWJo9reRhGh6UHKMCF+hClRNgsQWrzHksolefcu+FerbyO4YMYl1q fC9U4LqfGJ6VBmk8CMBqjP4y7mPpxtqajlLXi+DIX1q4HCa8i62KU87BED8LRXS+XvSY xwgw== X-Gm-Message-State: AOJu0YzkxYlJzoX4TVwoRwOTPSjT97LxS/swgNEffyVQAaQrXBhGJQC2 7+VEhTMg7zM+GA5lB5WSPNWB/9tmxQNo/qMyxm44RrwsKfqihopexGNIP6IW/zCMMM6GtseZA8u s X-Google-Smtp-Source: AGHT+IHPTRY7CqNhMdKJJGCpz933EpEicZqa7DrCjm03ov5O9UNCvCvLNaXVIk6uwFjwg4+0Y29t0Q== X-Received: by 2002:a05:600c:3502:b0:41b:fad8:45e0 with SMTP id 5b1f17b1804b1-41f2cb6055cmr33533125e9.0.1715113322082; Tue, 07 May 2024 13:22:02 -0700 (PDT) Received: from [192.168.0.15] (cpc92302-cmbg19-2-0-cust1183.5-4.cable.virginm.net. [82.1.212.160]) by smtp.gmail.com with ESMTPSA id j13-20020a05600c1c0d00b0041be58cdf83sm20640638wms.4.2024.05.07.13.22.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 May 2024 13:22:01 -0700 (PDT) Message-ID: Date: Tue, 7 May 2024 21:22:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20240507060059.34246-2-nowrep@gmail.com> From: Mark Thompson In-Reply-To: <20240507060059.34246-2-nowrep@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH] lavc/vaapi_h264: Fix merging fields in DPB with missing references 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 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 07/05/2024 07:00, David Rosca wrote: > If there are missing references, h264 decode does error concealment > by copying previous refs which means there will be duplicated surfaces > and this code would try to merge them instead of correctly appending > to DPB. Make sure the fields were actually merged before early return. > --- > libavcodec/vaapi_h264.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c > index b47531ce1c..c62a320e97 100644 > --- a/libavcodec/vaapi_h264.c > +++ b/libavcodec/vaapi_h264.c > @@ -112,8 +112,9 @@ static int dpb_add(DPB *dpb, const H264Picture *pic) > } else { > va_pic->BottomFieldOrderCnt = temp_va_pic.BottomFieldOrderCnt; > } > + return 0; > } > - return 0; > + break; > } > } > I agree that the old code did nasty things, but can you explain a bit more about the reasoning for what you've got now? I'm thinking that given duplication a top field could appear twice, so you'd want to merge twice if you have the matching bottom field. Thanks, - Mark _______________________________________________ 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".