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 D475541283 for ; Sat, 10 Dec 2022 15:33:37 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 86EFD68BCFA; Sat, 10 Dec 2022 17:33:34 +0200 (EET) Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 37B3068B461 for ; Sat, 10 Dec 2022 17:33:28 +0200 (EET) Received: by mail-ot1-f54.google.com with SMTP id m6-20020a9d7e86000000b0066ec505ae93so4614342otp.9 for ; Sat, 10 Dec 2022 07:33:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=pbP4XM/1feIYU0WN6aWa7Yu5wdtsfOIs7rkiuz1AInc=; b=U2RUU6ngPiqy75M5sbdSr8HAd55lnou0bgkiyK6rDx3t1wCcKv2ZIa+5wjkzFEtEtv Cn8AhxtQbfyMtruL6np5iic5yJcvCjo1OTJv/hgpzT3BDQsTw0gXml0OQYNpmyEnGMV5 seghxBUSTta5LQy+mwLB/7+yYlinGJVboc3fOpQcuod6ZbsyqmNuxhQBYBhyy4L4ibYM FtCriq3ktp7BYjqPP+LbcIrIKcdwut2htDWR98+xOZTWdAjZKf//v1WMppi6NHAo4A20 TFTS5WDBTzJKT30Rha3ETeKTn62MhS1g+GP7yp/lGIBVQ9KSbqM+nhJBxU+l9hlloAFj M9Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pbP4XM/1feIYU0WN6aWa7Yu5wdtsfOIs7rkiuz1AInc=; b=IrPyWoSAmIimhsoI0HPrL22dycTy7bacaGAhFVtuONI9nOFZjB0JFCSywvNJD21fBB UI3UnGAJ8OS+ULGA4PbQ8qMwcPs1D9t3H/ycomjvlV2C01iqHk8Gec+xypKvQYCPYZqE rUDiECxMCZ7ZVfphqS1N6y6OlrQozFPiAevBSUInTi1XBXFP0zj+SVRK+WVLCTCEdoGv XdjCvNxNASjrdKr99WSVxVn5HI786zybMHdZYsXjgG0Z0wKzNLLI9/oXC2m7KfxQKUL6 tmi7QUICFIjClq363oRbCJSh19M7sbFrA8Lv9DHfE9r99a7FlMMjtfm+ilh8J4gRLPPV eOig== X-Gm-Message-State: ANoB5pkEA1RQoKzmH7q6E7pLeoytd4lEMGNIfoNG9qehwWOaRUqdf6RS iJDZ7kBOdDf+v2gJPhukP7nbTThKeZg= X-Google-Smtp-Source: AA0mqf7DsgiMXUn8cLN0JlMrvaYI3BuZqc7UB9o1dDvwo33z1xSgys6N9dk6+HryqUtLYT3DO7M+8g== X-Received: by 2002:a9d:4c04:0:b0:670:6518:ed17 with SMTP id l4-20020a9d4c04000000b006706518ed17mr4775404otf.32.1670686405871; Sat, 10 Dec 2022 07:33:25 -0800 (PST) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id t4-20020a9d7744000000b0067066250c57sm1941735otl.30.2022.12.10.07.33.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Dec 2022 07:33:25 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Dec 2022 12:33:19 -0300 Message-Id: <20221210153319.2831-1-jamrial@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/proresdec2: set color information on frames instead of the decoder context 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: Similar to how the encoder looks at frame color information to write the frame header bitstream. Should workaround ticket #10091, where container level color parameters passed to the decoder context were being overwritten. Signed-off-by: James Almer --- vf_scale should properly set output frame color fields to really fix this, since this information is in a per frame basis in the prores bitstream and as such making the encoder write encoder context fields into them would not be correct. libavcodec/proresdec2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c index b0d7f8d5d5..c821a07849 100644 --- a/libavcodec/proresdec2.c +++ b/libavcodec/proresdec2.c @@ -289,10 +289,10 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf, avctx->pix_fmt = ret; } - avctx->color_primaries = buf[14]; - avctx->color_trc = buf[15]; - avctx->colorspace = buf[16]; - avctx->color_range = AVCOL_RANGE_MPEG; + ctx->frame->color_primaries = buf[14]; + ctx->frame->color_trc = buf[15]; + ctx->frame->colorspace = buf[16]; + ctx->frame->color_range = AVCOL_RANGE_MPEG; ptr = buf + 20; flags = buf[19]; -- 2.38.1 _______________________________________________ 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".