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 B612745038 for ; Mon, 28 Aug 2023 12:38:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CA68B68C6E7; Mon, 28 Aug 2023 15:37:00 +0300 (EEST) Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2A9A068C643 for ; Mon, 28 Aug 2023 15:36:52 +0300 (EEST) Received: by mail-ot1-f43.google.com with SMTP id 46e09a7af769-6beff322a97so1382521a34.3 for ; Mon, 28 Aug 2023 05:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693226210; x=1693831010; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=k0LD2GDbkXxsBRvvDORBcnHK+fIrlL6wWzdtPYqlMtA=; b=XRo6g0YUZ+9kHKgdZsSNvhwdueL1ZJU5e8GXn1y9V0ZNcJijQQM706OcyPB3IzDHx7 /dQZPhUh7lUN6tARGLXz7Uvk0yERXzRu1S8SwsZerwaZZxapMztvQTuyYuphbMfPPt85 2+qZ+EdJqbOY/CCQfrPBM1ha8VSXxeZt2yfHxXZkhLi2sHNdcR9nnbiLLu99R5TvhQSL fjxh9kDtnHhpIpAVbsam1nx4XvLEXoiENXGCxIB5z6Y/kV4TdE8s4DOFL1I9NPitYBeB JxjdxHldFynbuxoOCVMxF3615KK1VwxTV8KWeEFwas0VYbQWrTD01h27sCJ48N3NPaoy mA3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693226210; x=1693831010; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k0LD2GDbkXxsBRvvDORBcnHK+fIrlL6wWzdtPYqlMtA=; b=PjCQQZ69zZyaNMWer+i9Cmmg+eCimjOHh9umyrn1PV5GHBn9b+fV2gCOTl+EboS83B hpZcRpmh3B88eGf1AwaNI03lpHdurJiOIkLgrFHMOx1WtpqUSj8vhg9z1/cp6MYeJtD0 6rik6x8/hxU3QubkFi/f7FwrYCBeklKLZoFy8tZfalAypFh71oZqUROx3rHjrnqCBmgM ShOscOe9AQuLjs8K22ocjenSh7RTYHHbNFEyMThwc7bng78mxpEa7L8ZpXouvP4019n+ biEBcK/mprhzQclkJDhfVw/SJ+KvRgEipuc1D9tW7WS1O8XFY+ffZ4/VDkWE4LioI0oD YpqA== X-Gm-Message-State: AOJu0Yy9SCGbcpWWWtPCv0PU+RwWeiLqSL4JPiMkkkT2ifpTF+8cl60s DC4XzCCrOP5oWiF9YDNJSAacaRgcM+0= X-Google-Smtp-Source: AGHT+IEUm2XSCp57GqVyKOx56B0yKVOU9flmfNvZwUNNNUh/4cNVJwXJvFt/oeadogfMBOLoUA4LZw== X-Received: by 2002:a9d:6f01:0:b0:6b9:1af7:48c5 with SMTP id n1-20020a9d6f01000000b006b91af748c5mr13040962otq.9.1693226210535; Mon, 28 Aug 2023 05:36:50 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id b15-20020a056830104f00b006b9a98b9659sm3404615otp.19.2023.08.28.05.36.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 05:36:50 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 28 Aug 2023 09:34:59 -0300 Message-ID: <20230828123617.57535-8-jamrial@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230828123617.57535-1-jamrial@gmail.com> References: <20230828123617.57535-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 07/12] avcodec/hevcdec: check for DOVI configuration record in AVCodecContext side data 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: Signed-off-by: James Almer --- libavcodec/hevcdec.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index df40c91ba6..dabfe89d4a 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -3337,8 +3337,15 @@ static int hevc_decode_frame(AVCodecContext *avctx, AVFrame *rframe, } sd = av_packet_get_side_data(avpkt, AV_PKT_DATA_DOVI_CONF, &sd_size); - if (sd && sd_size > 0) + if (sd && sd_size > 0) { + int old = s->dovi_ctx.dv_profile; + ff_dovi_update_cfg(&s->dovi_ctx, (AVDOVIDecoderConfigurationRecord *) sd); + if (old) + av_log(avctx, AV_LOG_DEBUG, + "New DOVI configuration record from input packet (profile %d -> %u).\n", + old, s->dovi_ctx.dv_profile); + } s->ref = NULL; ret = decode_nal_units(s, avpkt->data, avpkt->size); @@ -3641,12 +3648,18 @@ static av_cold int hevc_decode_init(AVCodecContext *avctx) atomic_init(&s->wpp_err, 0); if (!avctx->internal->is_copy) { + AVPacketSideData *sd; + if (avctx->extradata_size > 0 && avctx->extradata) { ret = hevc_decode_extradata(s, avctx->extradata, avctx->extradata_size, 1); if (ret < 0) { return ret; } } + + sd = av_packet_side_data_set_get(&avctx->packet_side_data, AV_PKT_DATA_DOVI_CONF); + if (sd && sd->size > 0) + ff_dovi_update_cfg(&s->dovi_ctx, (AVDOVIDecoderConfigurationRecord *) sd->data); } return 0; -- 2.41.0 _______________________________________________ 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".