From patchwork Fri Oct 13 14:24:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 44248 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4b15:b0:15d:8365:d4b8 with SMTP id fp21csp1039909pzb; Fri, 13 Oct 2023 07:28:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE6zkq2VgCXzTqbXOUu6xxi+JpHrK4iFU4z/QRP+jqZ+QrY9xHQYh+UB9y/WQznZi7XC4hg X-Received: by 2002:a17:906:9c9:b0:9a1:bd33:4389 with SMTP id r9-20020a17090609c900b009a1bd334389mr22487805eje.74.1697207330488; Fri, 13 Oct 2023 07:28:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697207330; cv=none; d=google.com; s=arc-20160816; b=GbSbxUVyRsgnBCMtOH6i5PW0KnvtaCawWvb22F9WSHZfpqCnGXoXYWHFlvO/cZZ5AO 7bq80IQEAp1muCBZrGog9vg6F6lmtJ+IszBlsqjx0rCD/djZvloZchZD5iD3L1TMzqaW wkEZD3wTujZJjH3EJ8uhF88rvZLJCZpZ7CEp4iCT+TE5wlStWV+LmSac2jBEJNRg3p+c hCzSm0aYx6WRvD+O5BUjh8GA8rEBOP6TK5plnBpvrDKKn5IogQlSsfJMxbutr98xxVoj lfqqo1akgb48QmjhRD79o+Sz1v754knimmYQ6FBUB/ucBEGgZmogNcdLwXzO1N9wmSfM Yoog== 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:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=0QTPXtZsijyB0gX6pF1yRnG5J3AEVW63K0R3T0MWhK0=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=y4YlxknNdwGYq9cjmFkC6VInxbhhAZpJ7oEkMrRnXtfXLdHqx8kKDoANR0sJ5xGtct CIaSPXvfZKX+yDWw5MnwPHaOpmUW2ywymqMkSppwfSknlZjurWwxvQXqmFzXowUXd3RJ gKiUEgP+7016IbBVZ+EfMsOZ3L//s6Zk1sOgOrYY/H/w0Toys57nk5fiUVGH5l4vOcw/ EXSX9B22HBBEa94FVauPP6W6m62Vrd19+n/4kA7BCx0mLlIX37/NKVFV050hZPBglEwt 6Xmm8Igd8rZC5vYGgi1QtWUmMv+1Ky3M2QCiNAOR30hLPWYtZY82MxoXaJ5IJRLe1Bfx 7Qow== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=DT0LHfZe; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id c11-20020a170906694b00b00993a68a3af5si8389412ejs.529.2023.10.13.07.28.49; Fri, 13 Oct 2023 07:28:50 -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=@haasn.xyz header.s=mail header.b=DT0LHfZe; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2919C68CA14; Fri, 13 Oct 2023 17:27:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EC2D668C9DC for ; Fri, 13 Oct 2023 17:27:15 +0300 (EEST) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id E2D354BC33; Fri, 13 Oct 2023 16:27:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1697207233; bh=lfK4Jc6rWQLTow6LTYGK02lp+Bo1XCrUxQr8vEirom4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DT0LHfZeZT2cv7qVtTVi2oJvKnvT+0LCPBqj7Li4NFH6Rarxki6MCBZHSgiuoCW0l lZQwpZWsZCOw7BxMUi3GtVTh+1Rdy7WJs8BHLOH9k49PzAHoLRX2BicMI5baD3Tzww x9XrynSrITayTxbnqRgArIZZ6pADQ0cDbEiHsGr0= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Fri, 13 Oct 2023 16:24:47 +0200 Message-ID: <20231013142706.23971-10-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231013142706.23971-1-ffmpeg@haasn.xyz> References: <20231013142706.23971-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 09/13] lavc: set color_ranges for YUVJ-only codecs 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: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: cPcCmAFulSup From: Niklas Haas Only affects amv and roqvideo. (mjpeg is handled separately by fftools) --- libavcodec/mjpegenc.c | 3 +++ libavcodec/roqvideoenc.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index 508772987f..c827a47e59 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -685,6 +685,9 @@ const FFCodec ff_amv_encoder = { .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NONE }, + .p.color_ranges = (const enum AVColorRange[]) { + AVCOL_RANGE_JPEG, AVCOL_RANGE_UNSPECIFIED + }, .p.priv_class = &amv_class, .p.capabilities = AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE, }; diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c index 0933abf4f9..b584ee1142 100644 --- a/libavcodec/roqvideoenc.c +++ b/libavcodec/roqvideoenc.c @@ -1127,6 +1127,8 @@ const FFCodec ff_roq_encoder = { .close = roq_encode_end, .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_NONE }, + .p.color_ranges = (const enum AVColorRange[]){ AVCOL_RANGE_JPEG, + AVCOL_RANGE_UNSPECIFIED }, .p.priv_class = &roq_class, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, };