From patchwork Sun Jul 18 01:21:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zane van Iperen X-Patchwork-Id: 28961 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5d:965a:0:0:0:0:0 with SMTP id d26csp3149199ios; Sat, 17 Jul 2021 18:22:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYVPNhsAFVZgQRQ9LUTu31wC95JfnNAF9ED4OO+kI5llI6NpjpRw/U0DStAEcMOLjfgQ7n X-Received: by 2002:a17:906:150c:: with SMTP id b12mr19790474ejd.275.1626571368609; Sat, 17 Jul 2021 18:22:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626571368; cv=none; d=google.com; s=arc-20160816; b=cyi5GZtqFCJvRZDlntlTRomNorvTt3oiP/ytscpdZrgwkPKH4hX6QiPr/WvabJOEik ok83qGVRQvF4heQ66Ps9q4EkFAADnWVYQyh0m1ZPORjbDWxcWKoDYWA+c7/Abfkghdr9 PUevuN+7aEK3VUW+yEjek0pW/EfUDH3iwXMe3glP0pKPcgLgTA24nBwrXLVgFd2/QUci EBPH75ZNi7L0MBLMtWl+bwB7I9wB5Gy1kwFrUbdhxN6NXeFzdtkE3jlxdvoB7bwNPdFo /A4Jbh3zguvGl9WCMmPkZkP43JaWvF+GZW4IIhmo2Ue3j49N2pN/iaVtQDYtNVi9AKRb 8O+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=DeGGSqYLRxaODzMjONnKmlfm/1Vjzh5SSB5LovEkA2E=; b=DVwE8WNoAPCVQzisW6IAWa2YfXqC3JpYzxKV4qJ0Y8mn75qyt/FhZrt6X9RaXWCszZ 67PmZ5ZY/00m/bTpaU7KLVSHyMLZCyBmnISWmzYjsccRoxLK9VD7qUwkJ4N7mOz507hz SKdtzmeN/AV0PTX1yT2IAbHPPAX5mBDFVShfniaGYiy3+rrYQuSGybEngnU1SxqDwK95 lLXfW+KTUq803nc6MvmFhz9Zi+b3F9FEDb1k4KIk/db/ZnvYmWXTBydTwTd4fuuu+Zdo 8X/Ol37ANxZWNlOOYv2DIFAEXm/r0xh8BabfbWj75BsQJIUailurIfMzf+PxQVIf0qEZ X36Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@zanevaniperen.com header.s=key1 header.b=b6OVLmXZ; 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=NONE dis=NONE) header.from=zanevaniperen.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ay3si9912414ejb.646.2021.07.17.18.22.48; Sat, 17 Jul 2021 18:22:48 -0700 (PDT) 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=@zanevaniperen.com header.s=key1 header.b=b6OVLmXZ; 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=NONE dis=NONE) header.from=zanevaniperen.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0F69368A880; Sun, 18 Jul 2021 04:22:33 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5FAEC68A787 for ; Sun, 18 Jul 2021 04:22:26 +0300 (EEST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zanevaniperen.com; s=key1; t=1626571345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ojToAO+MR7xv7ub1ur70Hxdruqq4ywXfZHiNNt/hC2E=; b=b6OVLmXZDBwYPJD8ysdJjijLhDGM2IqwmQUBpeHXC6RNBocJyh4rJMkfPwhiSRWzitgmiR e/P0Ztmc9l1p5GApIEyuFuyTEzUFtM+sOwSTTWg9ISdMidDC2fTfRrgS0w3ycYjmV0XnsE YPOKiGWb4SvPMkU/s4pIK1E8g9QByM0le5jFW79uLJBNcG++ldRepwt8M/Vpwmerq8dDjz /WsF2x9k32ZgRfBnsarLHiI3pR4J9zHC4H1kE5Al+y2hOwfYTsjNSb6pPtqoCo52WMOwtV 4v3384ZYNqVgZPn41KCZPqsRpOWpEu1/qaWoHAweoN8YT708KxkaTr0KPMweMw== From: Zane van Iperen To: ffmpeg-devel@ffmpeg.org Date: Sun, 18 Jul 2021 11:21:58 +1000 Message-Id: <20210718012204.97733-2-zane@zanevaniperen.com> In-Reply-To: <20210718012204.97733-1-zane@zanevaniperen.com> References: <20210718012204.97733-1-zane@zanevaniperen.com> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: git-morningstar@zanevaniperen.com Subject: [FFmpeg-devel] [PATCH 2/8] avformat/argo_brp: set pixel format directly 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: OHZNUHfLEUQd Signed-off-by: Zane van Iperen --- libavformat/argo_brp.c | 11 ++++++++++- libavformat/version.h | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/libavformat/argo_brp.c b/libavformat/argo_brp.c index 059418cd1d..6cc0c4a3f8 100644 --- a/libavformat/argo_brp.c +++ b/libavformat/argo_brp.c @@ -230,7 +230,16 @@ static int argo_brp_read_header(AVFormatContext *s) st->codecpar->width = bvid->width; st->codecpar->height = bvid->height; st->nb_frames = bvid->num_frames; - st->codecpar->bits_per_raw_sample = bvid->depth; + + if (bvid->depth == 8) { + st->codecpar->format = AV_PIX_FMT_PAL8; + } else if (bvid->depth == 24) { + st->codecpar->format = AV_PIX_FMT_BGR0; + } else { + st->codecpar->format = AV_PIX_FMT_NONE; + avpriv_request_sample(s, "depth == %u", bvid->depth); + } + } else if (hdr->codec_id == BRP_CODEC_ID_BASF) { /* * It would make the demuxer significantly more complicated diff --git a/libavformat/version.h b/libavformat/version.h index 6519bba101..03eb20ad82 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -33,7 +33,7 @@ // Also please add any ticket numbers that you believe might be affected here #define LIBAVFORMAT_VERSION_MAJOR 59 #define LIBAVFORMAT_VERSION_MINOR 4 -#define LIBAVFORMAT_VERSION_MICRO 100 +#define LIBAVFORMAT_VERSION_MICRO 101 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \