From patchwork Wed Oct 11 14:55:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 44225 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4b22:b0:15d:8365:d4b8 with SMTP id fp34csp965716pzb; Wed, 11 Oct 2023 08:10:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGLUOGIegQqdD0Mg1nZQl/bKRs/8Cdt1An5HzHcbK2HtwN8r8+e51i5GNTRWx/NfyqdfsSI X-Received: by 2002:a05:6402:910:b0:53d:983c:2673 with SMTP id g16-20020a056402091000b0053d983c2673mr4823007edz.29.1697037015306; Wed, 11 Oct 2023 08:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697037015; cv=none; d=google.com; s=arc-20160816; b=wjTz1J37sGOV0teYZtmaPtttRhh6gzJ4C4DXOuB7SEnJcWmK72U9egDdI4CL6vqKlw MFx2l/MR9TxtlCQHssPsGOkQggoDR+3cUinl7e5diuH8IPhs071Ke3K2eZ0MWsBcEpIS EGajMFv58nWrX0HOWFPEvm4OJGUkgBXGF/Nj1kdKxcLt/EHkNha5fWuYZUrx9oBQy+Wx yem6juVYYqkcV6JXUCtQQPl/3YK+sTcsqhoZOQwPtFJgxi+rMEk+4Ui60MiK9B2PORdX iL5JEfNtJ+AQfALq+1KEX8lY9IzSx1/RSlQRkyB4b7/d59exh2k/2A/O3qOhde+1XsPh 7YgA== 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=q8bReY60pXfU9SHJEYZUlxCKLGEwY07Hk3CVkh0NoJL5oQE69gyMon84xQN6Hw61ly mHM/IiXBo6h6UP1Rl0mKe74hZGD2h/1E8ov6k+b3u5GsukkU6cTsGJrHg23V922KPal0 +p4Dx45UcU1rMt3zP+epHlGzGuiwXh8iLD60cSkBoFx1OKSPzFf6Kg4DR/JpcQwNUN/i Yk/wKulcZv6vaQfO3Ac4cu6t/nZw1n17pfzRYU7XC/D/93YhhEIQZ0bhxqxM42gnCV9G H28wOxbjOu9iBZ86iM7na7AN4K4gxELGrI5bjbRcZX+/u47xJPozwNwbLWFiCybELKv4 zZvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=AA9nvH+r; 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 b15-20020aa7c90f000000b005381647f14fsi6542242edt.172.2023.10.11.08.10.09; Wed, 11 Oct 2023 08:10:15 -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=AA9nvH+r; 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 8359C68CC33; Wed, 11 Oct 2023 18:09:06 +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 14B8368CC01 for ; Wed, 11 Oct 2023 18:08:59 +0300 (EEST) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id C7E664BC3E; Wed, 11 Oct 2023 17:08:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1697036934; bh=lfK4Jc6rWQLTow6LTYGK02lp+Bo1XCrUxQr8vEirom4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AA9nvH+rO9A9TtuztW6NkgG5tSanlInSSOsEjK0+xD1hGAAa5n+rX3lnTb+7dfomb mvDN+kaDjdWgND3mbrZXQtyjb89PobZVDQgO/CHpUBywQJC45kf//m6omdZqEyqdMq Jkq+bE+x46vBfCm53aVlHSPWi9SmH3rLiyajZBB8= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Wed, 11 Oct 2023 16:55:40 +0200 Message-ID: <20231011150848.117897-7-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231011150848.117897-1-ffmpeg@haasn.xyz> References: <20231011150848.117897-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/7] 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: f69sAweo4yX+ 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, };