From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTP id F15E942254
	for <ffmpegdev@gitmailbox.com>; Sat, 30 Apr 2022 17:31:31 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1166B68B27B;
	Sat, 30 Apr 2022 20:31:29 +0300 (EEST)
Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com
 [209.85.221.49])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5FEA1680588
 for <ffmpeg-devel@ffmpeg.org>; Sat, 30 Apr 2022 20:31:23 +0300 (EEST)
Received: by mail-wr1-f49.google.com with SMTP id e2so14566044wrh.7
 for <ffmpeg-devel@ffmpeg.org>; Sat, 30 Apr 2022 10:31:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=jkqxz-net.20210112.gappssmtp.com; s=20210112;
 h=message-id:date:mime-version:user-agent:subject:content-language:to
 :references:from:in-reply-to:content-transfer-encoding;
 bh=HOO7RXPG10yNkKW275xkr8IWwaksdcH5L4wGr8Ju1d4=;
 b=MyScbOQ/HlcXecyt8yItw7a7pPcWyANIhIBqRIYGokezIIg4hLvrEtMjq6yEZRmJFw
 9/sv4md+vvUXl45GLGsaWvOZYWC4gWVx9qnZtohUIz+UpNqUVehIrlckGD4/IuqevSBu
 BVRQdb9Dqm3dZPbbkxmHL1eYT9a/pAdUMMgjO1Z1SHftsSZFmT0zeEIZj5ev2GnFid7H
 tr0FlnJFvGuLe8vSmNjM9nyNt6zaJSIYLD/RQgb1gwHHHuwLAlfnqv+z8pyT2GE2xJ53
 gfO43OY47YpVC82zuYKoL/1YXwIFqtSWkOUXpRKd8W7Y8BAsPZKnaobmvA+LnoljAFf/
 6Brg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:message-id:date:mime-version:user-agent:subject
 :content-language:to:references:from:in-reply-to
 :content-transfer-encoding;
 bh=HOO7RXPG10yNkKW275xkr8IWwaksdcH5L4wGr8Ju1d4=;
 b=jUk+Ae3THrS1KjZ0kwB18ZVjlCzUpFkZic56s621+4FhB1ROfnHR6rRUaCabvKIVom
 ky0lV9o+PK9Vnw6Uq/kMntD842iZ3gSvf3piuqVTIIPtwMvm0S03MBpnQVa3AttAiCBt
 yTTsoV1cb97meI3yHLqYRLMXNZ0iiN+X+m1KE3lkpZZbp5HeZheFL/IVrrVv55Bx7ch3
 jRxLPThxgRJ079suc3AAA7hQxPVHgo/7yTdt0BmtWk+gwU7slPwYo2N6jwPpj5Qwo1Rt
 Asx+R3DB6FTBGhjlu9O5KEiCWTuSW2PEnHMJZXTLVuMJaBmM2VVS/L71pL7hvfhsEN8H
 4Feg==
X-Gm-Message-State: AOAM53198w9kUF9Pc+Kjj00FcZBe5BXwxia6zoYwXvFrm8MeOoe/+znV
 YPCT7X6wY9XDGKr8UmsOZ+W170GztHT4lL66
X-Google-Smtp-Source: ABdhPJxftfzmaStxmde6Hik3s1dDGmseWY2vr/pH+xP8P/G0C1bz62exWkZ1E/LLAP07747rqlJYfg==
X-Received: by 2002:adf:ed03:0:b0:20c:4c8b:8e07 with SMTP id
 a3-20020adfed03000000b0020c4c8b8e07mr3607062wro.423.1651339882766; 
 Sat, 30 Apr 2022 10:31:22 -0700 (PDT)
Received: from [192.168.0.11]
 (cpc91222-cmbg18-2-0-cust46.5-4.cable.virginm.net. [81.106.30.47])
 by smtp.gmail.com with ESMTPSA id
 l37-20020a05600c1d2500b003942a244ec9sm2197737wms.14.2022.04.30.10.31.21
 for <ffmpeg-devel@ffmpeg.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 30 Apr 2022 10:31:22 -0700 (PDT)
Message-ID: <02a9b3be-e7a0-6283-188a-6033fde862b5@jkqxz.net>
Date: Sat, 30 Apr 2022 18:31:21 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.8.1
Content-Language: en-US
To: ffmpeg-devel@ffmpeg.org
References: <20220424101409.95486-1-zane@zanevaniperen.com>
 <20220424101409.95486-6-zane@zanevaniperen.com>
From: Mark Thompson <sw@jkqxz.net>
In-Reply-To: <20220424101409.95486-6-zane@zanevaniperen.com>
Subject: Re: [FFmpeg-devel] [PATCH v2 5/7] avcodec/cbs_sei: refactor to use
 avutil/uuid
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/02a9b3be-e7a0-6283-188a-6033fde862b5@jkqxz.net/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

On 24/04/2022 11:14, Zane van Iperen wrote:
> From: Pierre-Anthony Lemieux <pal@palemieux.com>
> 
> ---
>   libavcodec/cbs_sei.h           | 3 ++-
>   libavcodec/vaapi_encode_h264.c | 8 ++++----
>   2 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/libavcodec/cbs_sei.h b/libavcodec/cbs_sei.h
> index c7a7a95be0..67c6e6cbbd 100644
> --- a/libavcodec/cbs_sei.h
> +++ b/libavcodec/cbs_sei.h
> @@ -23,6 +23,7 @@
>   #include <stdint.h>
>   
>   #include "libavutil/buffer.h"
> +#include "libavutil/uuid.h"
>   
>   #include "cbs.h"
>   #include "sei.h"
> @@ -41,7 +42,7 @@ typedef struct SEIRawUserDataRegistered {
>   } SEIRawUserDataRegistered;
>   
>   typedef struct SEIRawUserDataUnregistered {
> -    uint8_t      uuid_iso_iec_11578[16];
> +    AVUUID      uuid_iso_iec_11578;
>       uint8_t     *data;
>       AVBufferRef *data_ref;
>       size_t       data_length;

This feels like a step backwards?  The syntax template files are explicitly relying on this being uint8_t[16], so giving it a different name is confusing.

> diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c
> index 7a6b54ab6f..b3105d6ccc 100644
> --- a/libavcodec/vaapi_encode_h264.c
> +++ b/libavcodec/vaapi_encode_h264.c
> @@ -25,6 +25,7 @@
>   #include "libavutil/common.h"
>   #include "libavutil/internal.h"
>   #include "libavutil/opt.h"
> +#include "libavutil/uuid.h"
>   
>   #include "avcodec.h"
>   #include "cbs.h"
> @@ -43,7 +44,7 @@ enum {
>   };
>   
>   // Random (version 4) ISO 11578 UUID.
> -static const uint8_t vaapi_encode_h264_sei_identifier_uuid[16] = {
> +static const AVUUID vaapi_encode_h264_sei_identifier_uuid = {
>       0x59, 0x94, 0x8b, 0x28, 0x11, 0xec, 0x45, 0xaf,
>       0x96, 0x75, 0x19, 0xd4, 0x1f, 0xea, 0xa9, 0x4d,
>   };
> @@ -1089,9 +1090,8 @@ static av_cold int vaapi_encode_h264_configure(AVCodecContext *avctx)
>           const char *driver;
>           int len;
>   
> -        memcpy(priv->sei_identifier.uuid_iso_iec_11578,
> -               vaapi_encode_h264_sei_identifier_uuid,
> -               sizeof(priv->sei_identifier.uuid_iso_iec_11578));
> +        av_uuid_copy(priv->sei_identifier.uuid_iso_iec_11578,
> +                     vaapi_encode_h264_sei_identifier_uuid);
>   
>           driver = vaQueryVendorString(ctx->hwctx->display);
>           if (!driver)

This is fair.

- 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".