From patchwork Wed May 23 13:06:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 9064 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:155:0:0:0:0:0 with SMTP id c82-v6csp811438jad; Wed, 23 May 2018 06:07:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoWe3WBFa/D6cce3SkxLskZwgWhmJtycQApD8+cEy04mSP8GBkg5WadO06wTZmYLI+mcOAG X-Received: by 2002:adf:e501:: with SMTP id j1-v6mr2245659wrm.186.1527080830940; Wed, 23 May 2018 06:07:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527080830; cv=none; d=google.com; s=arc-20160816; b=SB3dpXCglPA4PTa4/cIT68YIgYBBdWsX/n4P7aYYYKUp+UNlIxfyQETK7a9vEbP/Im ErknvQfucucRUwEHY4btuV73s/66hK/TTJLPOD6uOpzBCHo/YwZCXtPTM8ppX1eVfEzT LRWyPGeKw4izhIGS6Xto+j8xa8Hl4yaRSYJROn7PUooTfvANDIQIqkC3M9P6+XtL9C4U GxgdBR6sQzQh+eWbqm/jKnHePHl0ZDP/XzEmRR1Cqwd3zMaKvc7b6HXL01mPrh1tPdrL ZIHjqJJqLW7siU8A0EKUZQ/6Zlzbf88BI12dtyC/OEUIjj3IDjTv8pw/0hAzeLDSCb3Q u1Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:delivered-to :arc-authentication-results; bh=LMmwZp5EQ9SbxqGBHk/EEDl1KEckZSQisxMY5apTlr0=; b=K2u2UXxQv2YAv74d1It+j3Y059tAZwApVbnQ6Px4mJAmAXGu+xnyQsJHlPo4rT6pdm 9/0ztyetXN9mMT9DR97hg5+TfP7VjY8J85kSI+gPKAlR1oXoUtEkbNxP84OZ88KDMixP j4KzvRdBLlfU55MyTKPc1tCBzApzE9bIFUuNzwrhD8vLpnHYNWAM2P/kaqgB+a6fFS4Z aI75lXh+DShQ591Es5MtGKnnTjsyCN6sdwDtLLOqoaYi2Xzh2Ef/rFnTi95wDOQo2PY9 8sqcAt8C8gCFtKekG4nOGm5kd5TuJNP53D0aKyGt41ix6zGqtl8LblJ/uVz7c2eWHHIs a7Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=j0DRSn1Z; 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 y5-v6si9484521wrp.149.2018.05.23.06.07.05; Wed, 23 May 2018 06:07:10 -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=@gmail.com header.s=20161025 header.b=j0DRSn1Z; 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 4287168A257; Wed, 23 May 2018 16:06:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-it0-f46.google.com (mail-it0-f46.google.com [209.85.214.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9E505689812 for ; Wed, 23 May 2018 16:06:15 +0300 (EEST) Received: by mail-it0-f46.google.com with SMTP id p3-v6so4315738itc.0 for ; Wed, 23 May 2018 06:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Aqi/YBAYJo9BZH9gMmYrCCmBtipbKMUyQcjdOwvVxf8=; b=j0DRSn1Zx+QU/qAQupmp6jxUm0gN5fPgCVqF+xFWcqAh6XarkWoDncYiFEQFvE8E8a k/f30Z3qO9Kv3M7d4YW5Mh6sgQdT5XOMaHmXC/Rj9YkZVbzjYn82guL2Pi+FO3wixJPf wPfojv6eZ3cTRSReM+YhVnj5/dDK/kgc3I3iO41P4Hjt693DiScmTONt/m0Vd2NfQIkk Vfkpylrmu+lE/NqGUqDLDMXOkqqBKBBQzwPjoGmTxQ4dOZoU4BowJnHamSi6m+BKfaIX AQX9NbPn7way/WUlmW7kRoONLOmLescFoG/Efzh6c5AT2RkUF57QvUxYLo7Av/RskxaF 102w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Aqi/YBAYJo9BZH9gMmYrCCmBtipbKMUyQcjdOwvVxf8=; b=qPJrSaolSsTaRPCXZfeeiwVJKjIvZ0KvVApyxSPOr1iFbcvquItzKJ0OnM50t97Aux iyg3Lg1xPGG9fkQqeHw/ZwekPkvnYFWlRrtLF/PudgNR2FY9yZMkRXdVdRi0iRVUYwUU TgZg1Ue0RTq+dpyVUOOy+FcncUslV3Ct2uwCcVzamZJMOh9Nqenh0hYtob4Nra+Jj8N2 qj7J53Sm6Y4y391Wo22aUBhrpboUNG/AnAEdsBGPNLrhqIl8IzZMatpZ3mAsSNaDtamG GFrpN36IC+GhKBwYj8RFzP0D6X9sjRsr4kETZagGfM1Vf7C50cy+v+xCLvsiFTg3xnz6 ZZ1g== X-Gm-Message-State: ALKqPwd7HKuCxGqLM2qTprZecZaE/xOc8Fo1985oaFcD/cwVt2k7X2Mn JBls64Fuovkte5RxxmUPVFLIj0NDDo19EcWFi7M= X-Received: by 2002:a24:af45:: with SMTP id l5-v6mr4473975iti.106.1527080815970; Wed, 23 May 2018 06:06:55 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:81c6:0:0:0:0:0 with HTTP; Wed, 23 May 2018 06:06:55 -0700 (PDT) From: Carl Eugen Hoyos Date: Wed, 23 May 2018 15:06:55 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]lavc/hevc_ps: Use correct pix_fmt for 9 bit monochrome. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" Hi! Attached patch uses the new AV_PIX_FMT_GRAY9 for monochrome hevc input. Please comment, Carl Eugen From 16a6f6b552d130600557fd19c7f86cd54c08c858 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Wed, 23 May 2018 15:04:24 +0200 Subject: [PATCH] lavc/hevc_ps: Use correct pix_fmt for 9 bit monochrome. --- libavcodec/hevc_ps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index f877fa5..bca3abb 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -825,7 +825,7 @@ static int map_pixel_format(AVCodecContext *avctx, HEVCSPS *sps) if (sps->chroma_format_idc == 3) sps->pix_fmt = AV_PIX_FMT_YUV444P; break; case 9: - if (sps->chroma_format_idc == 0) sps->pix_fmt = AV_PIX_FMT_GRAY16; + if (sps->chroma_format_idc == 0) sps->pix_fmt = AV_PIX_FMT_GRAY9; if (sps->chroma_format_idc == 1) sps->pix_fmt = AV_PIX_FMT_YUV420P9; if (sps->chroma_format_idc == 2) sps->pix_fmt = AV_PIX_FMT_YUV422P9; if (sps->chroma_format_idc == 3) sps->pix_fmt = AV_PIX_FMT_YUV444P9; -- 1.7.10.4