From patchwork Tue Jan 4 02:19:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Karmani X-Patchwork-Id: 33039 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp16607099iog; Mon, 3 Jan 2022 18:19:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwV7JkYRPLzm1YN78O/UvORBbw+NWdkTM/NfkuJkvmHP8GNRVicElp9TF2IBXb53OMe7bIy X-Received: by 2002:a05:6402:2709:: with SMTP id y9mr45445016edd.346.1641262771631; Mon, 03 Jan 2022 18:19:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641262771; cv=none; d=google.com; s=arc-20160816; b=wJtheL5UTIgwv0wFIGgVFP64w6lrUuxWl6iKmevp7ungc2310eWx++FZ3j5jSiQl+5 hbxWCqXc9y1XD+Z4FBgXXaAcwY/J5m/5kSFPoX+HhJyyzqZiZq6qWAlBeW9q35ICwyLT UMT5JdUm+jA2D/c1F98CIJNS7lMfUPATntIXrUriC28ANuv4Le8RI2sLCtLfW2iYdxre YZyYtnFIapuh37AF4+P7UwkfDNYC0p49YWCrvhc7YORotqKFx+L3tEZe9Ib7Jv2jRyJ+ uynKxKAOuTJCypudZpzX6BMdKZIAJF2rJZ3HkpIjCbddZ6Lo1R4JdH5v6zgciAa99Ny3 QPog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:to:mime-version:fcc:date:from:message-id :dkim-signature:delivered-to; bh=Z1Z3oGDWHDmPzBbEkvTaPULRD4RKhRKOAb8vxsXMes0=; b=zt3eBKbWiaNJvB6Z69HURbdc8lXCEkk6xKu44VXMGhRiuo3jlWevLq8SGrfjS5DmuB cYUok05cLnHr+qyhQDym9FaxlIrUU7CVsCDSZA61tHPPkvhnILXiWDbFx/9/oUhIomXB SEhtwHYZLPgTRFy6dXYV+kbb+TYi5PgCLk9ojFgOPJYtjxKXKQ6YwAD/py1nXoQgzLOi GM2I8osFqt0pRQekPk4K2DrDffonPmP7uzIYWMyy6mCTKOy1RlWTd6TJ5dH2faa16Btk idI+fwVHsM0jLWVxeunHCpw8JlBjpEsx5beioJNMCtCY8lFXbia77lUD+OfP1WYVgGJr puWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=nfjMES0X; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id c23si17838118edv.255.2022.01.03.18.19.31; Mon, 03 Jan 2022 18:19:31 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=nfjMES0X; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C87C968B1E7; Tue, 4 Jan 2022 04:19:28 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C171868B1E7 for ; Tue, 4 Jan 2022 04:19:21 +0200 (EET) Received: by mail-pj1-f50.google.com with SMTP id r16-20020a17090a0ad000b001b276aa3aabso26119558pje.0 for ; Mon, 03 Jan 2022 18:19:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:from:date:subject:fcc:content-transfer-encoding :mime-version:to:cc; bh=RgsLSBCD1YS7VQKZlJmdbl12jY2KoU4B+PAUq2fcdhQ=; b=nfjMES0XCf5BbZib2G7suuDzt/3mE5+BBwqGX16UA/zRqX0HLtAy+GwM5xH2Bwof+b vPICp54U7meCw9LP3mNI2IWqk8oCLH9mXIhaXQ0a47qqtL9NYfl8dOf/+36aKM16Z7LZ Ys80A6mvGgZ9DTmvxFbyp1Fw5fd+h3y+2wqbMoRHD0ZCZTQoh7M6dG63UY7kqjBvZDgk SsTTASyKnzUe3EtAU+4w3+LUkzWJGxSR48RCFGDMFrKIwwo0ToDPL2YsrKK3R/aCVISy HjjFtC2HiZF4tBuh1BLmq6Mc7+ooCZ4Q8OtJMUwOjSOR5Gfrt0HaJ9/NbefYoUbW/YE5 gC8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=RgsLSBCD1YS7VQKZlJmdbl12jY2KoU4B+PAUq2fcdhQ=; b=qILR/SnBTMy9aMX1otO2zwI9QOJcblaqIpfyAYDC1P6rxINYOrnCLJsLbeU6k7Vzjc 63Iic4TSsfA+scVUuUYPRu0G0cw/pU1bfOOlaE0CbNo9fBKAW1UfjowWJnMxc3eSyaez jW/tl3Y/oQCBu67Wlbmm6ZF8wLFA09lTVNwNOJQWH3HAfu9pdERJ/gt3AQJdr03bBr5k Ehdu25M4wBRlipYywoSHDcuGnaL1q9Lh3qT6qG2kcTLUuAIn64H7ZkgmRldzl8JhYhcW 7Vv+Szca8HbGlzyrnnqvKuNuauyaFwfYUUaDn2301uGYD2tF3Jw52xKU6PLF5EVxfyxw I+CA== X-Gm-Message-State: AOAM530lBWUhS+/n1X6TDJychWgJ7/zosZJfEjceOiSzkr7FjLe9O0Fm LHxA8eY0ObmUvykFOFa7NXYS7CO+OmySLA== X-Received: by 2002:a17:903:1c7:b0:149:7cab:6d7f with SMTP id e7-20020a17090301c700b001497cab6d7fmr36309286plh.101.1641262760101; Mon, 03 Jan 2022 18:19:20 -0800 (PST) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id p15sm25637710pfh.86.2022.01.03.18.19.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jan 2022 18:19:19 -0800 (PST) Message-Id: From: ffmpegagent Date: Tue, 04 Jan 2022 02:19:19 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH] avcodec/dvdsubdec: fix incorrect yellow appearance of dvd subtitles 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: softworkz Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: hOmiqUMGNQD0 From: softworkz The guess_palette() implementation is questionable in itself as its results don't match those from other DVD subtitle decoders. This commit starts cleanup by fixing an obvious bug which has made certain DVD subs appear yellow instead of white or grey for more than 10 years.. Signed-off-by: softworkz --- avcodec/dvdsubdec: fix incorrect yellow appearance of dvd subtitles Fixes an age-old bug in decoding DVD subtitles. Ever wondered why certain DVD subtitles are shown in yellow color when ffmpeg is involved... Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-16%2Fsoftworkz%2Fpatch_dvdsubdec_fix-v1 Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-16/softworkz/patch_dvdsubdec_fix-v1 Pull-Request: https://github.com/ffstaging/FFmpeg/pull/16 libavcodec/dvdsubdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 573b6b8a607398c5f34108efda9c29d41c5727ff diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 52259f0730..a3fdb535a5 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -400,7 +400,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, } else { sub_header->rects[0]->nb_colors = 4; guess_palette(ctx, (uint32_t*)sub_header->rects[0]->data[1], - 0xffff00); + 0xffffff); } sub_header->rects[0]->x = x1; sub_header->rects[0]->y = y1;