From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id C1D1B475C0 for ; Wed, 13 Sep 2023 00:36:13 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A7B8568C945; Wed, 13 Sep 2023 03:36:10 +0300 (EEST) Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C921E68C89A for ; Wed, 13 Sep 2023 03:36:03 +0300 (EEST) Received: by mail-ot1-f43.google.com with SMTP id 46e09a7af769-6bf01bcb1aeso4361503a34.3 for ; Tue, 12 Sep 2023 17:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694565361; x=1695170161; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=nxfP2+ByaQVq20BCnhknUk9rYJ8nxUTn8/sVLztW6f4=; b=o32QGvgvuSBZuh0wvquxaDRSmwhO85wEZfnB3ZJrHbHwcdsNjUzt2eINyYEHdNLQwI N/yvcz/q1Bow1CVs/l/dHZS6TNorDtVgCYqnGYcY4DGdFkcEP+HicTZRGEWfCaGxEhpU cUG/VXEIyRkyRaBGDs5rTgcvJ1u0o0ByPlSJ+Ap81a7EKBH7foqnz4bDXPmSugLkVrJI TqBtUn9lOAByMT2QUlc5/xTuICHo0GFAEqSY5e6yIb1j/SEGYZ/ns6lg+Utjj24h56ll KjXtNuyuo5kFSnzfJ95786jalHiz5DvAm9t6i+MEyqU8plvaoIvXiC5HbtFdkaW6Zi5a HYSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694565361; x=1695170161; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nxfP2+ByaQVq20BCnhknUk9rYJ8nxUTn8/sVLztW6f4=; b=b8cE7KRqluDEvgBthvbqUSMN2YvYCEnJzj7KozDZIV7MlsX11AwX57TlxuygKEJHXm zH+MTUs2u1J1tCiQREdig2uriSxTbFMa8crrJ/mDegg9XQqUnZP4v6ev32yqUjm6qt11 VJX0AaIq5xQDvzRbhKIsv2l4l7d9PUNZJ3ZUHYCdnTICbzi2rAfNsQs1+TSzJ+41/UyG FfQFPdeqqOVXoRCx+8/tsGN2ZZJ2lRmTf1txJENYFa0Ug9bW1unvkHWFtAZQ3Saaa74P oDvDOOUqd8eYS8OjD1XD9jLcetPbVAM0OQHhvrfdH8hevmCr9IsYHwUFG/4DvqZbM4C7 wGoQ== X-Gm-Message-State: AOJu0Yylebve0sRLzi5DEbA5ZqT480+29REstmbNRpJ+1jQmR3y0+xTZ B3LNe7ghL/a7BUmM7dQiArLLL7TG314= X-Google-Smtp-Source: AGHT+IE4T8BqbzPUVC2++gfsFXZNqtl53Npz1PftO2Y/9g3Q3QT3nW1Zk89wFe6TL0PI9v0zDV/Lsw== X-Received: by 2002:a9d:5f14:0:b0:6aa:ecb5:f186 with SMTP id f20-20020a9d5f14000000b006aaecb5f186mr1370335oti.7.1694565360966; Tue, 12 Sep 2023 17:36:00 -0700 (PDT) Received: from [192.168.0.10] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id q19-20020a05683033d300b006b94a14b52asm4494693ott.9.2023.09.12.17.35.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Sep 2023 17:36:00 -0700 (PDT) Message-ID: <4d5533bd-7c7c-b867-8186-e857adc63422@gmail.com> Date: Tue, 12 Sep 2023 21:36:00 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 To: ffmpeg-devel@ffmpeg.org References: Content-Language: en-US From: James Almer In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 1/3] avcodec/av1dec: Pass AVCodecContext* as logctx in get_sw_pixel_format() 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 9/12/2023 9:22 PM, Andreas Rheinhardt wrote: > Andreas Rheinhardt: >> It indicates to the reader that said function does not modify >> any state. >> >> Signed-off-by: Andreas Rheinhardt >> --- >> libavcodec/av1dec.c | 12 ++++++------ >> 1 file changed, 6 insertions(+), 6 deletions(-) >> >> diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c >> index 8f9c2dfefb..8f6c4f732e 100644 >> --- a/libavcodec/av1dec.c >> +++ b/libavcodec/av1dec.c >> @@ -440,7 +440,7 @@ static int get_tiles_info(AVCodecContext *avctx, const AV1RawTileGroup *tile_gro >> >> } >> >> -static enum AVPixelFormat get_sw_pixel_format(AVCodecContext *avctx, >> +static enum AVPixelFormat get_sw_pixel_format(void *logctx, >> const AV1RawSequenceHeader *seq) >> { >> uint8_t bit_depth; >> @@ -451,7 +451,7 @@ static enum AVPixelFormat get_sw_pixel_format(AVCodecContext *avctx, >> else if (seq->seq_profile <= 2) >> bit_depth = seq->color_config.high_bitdepth ? 10 : 8; >> else { >> - av_log(avctx, AV_LOG_ERROR, >> + av_log(logctx, AV_LOG_ERROR, >> "Unknown AV1 profile %d.\n", seq->seq_profile); >> return -1; >> } >> @@ -467,7 +467,7 @@ static enum AVPixelFormat get_sw_pixel_format(AVCodecContext *avctx, >> else if (bit_depth == 12) >> pix_fmt = AV_PIX_FMT_YUV444P12; >> else >> - av_log(avctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); >> + av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); >> } else if (seq->color_config.subsampling_x == 1 && >> seq->color_config.subsampling_y == 0) { >> if (bit_depth == 8) >> @@ -477,7 +477,7 @@ static enum AVPixelFormat get_sw_pixel_format(AVCodecContext *avctx, >> else if (bit_depth == 12) >> pix_fmt = AV_PIX_FMT_YUV422P12; >> else >> - av_log(avctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); >> + av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); >> } else if (seq->color_config.subsampling_x == 1 && >> seq->color_config.subsampling_y == 1) { >> if (bit_depth == 8) >> @@ -487,7 +487,7 @@ static enum AVPixelFormat get_sw_pixel_format(AVCodecContext *avctx, >> else if (bit_depth == 12) >> pix_fmt = AV_PIX_FMT_YUV420P12; >> else >> - av_log(avctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); >> + av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); >> } >> } else { >> if (bit_depth == 8) >> @@ -497,7 +497,7 @@ static enum AVPixelFormat get_sw_pixel_format(AVCodecContext *avctx, >> else if (bit_depth == 12) >> pix_fmt = AV_PIX_FMT_GRAY12; >> else >> - av_log(avctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); >> + av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); >> } >> >> return pix_fmt; > > Will apply this patchset tonight unless there are objections. Not against it, but this reminds me I'd really like a way to pass a const pointer to av_log(). _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".