diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-10 13:30:14 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-13 22:04:11 +0200 |
commit | c38693b4b099057553c0323cc2757470cede5614 (patch) | |
tree | c19e2189fb3f68185364d5cfa0fc9f8f13652927 /libavcodec/av1dec.c | |
parent | 654e4b00e2878ad213a0bf01e8b050735f3d50ac (diff) | |
download | ffmpeg-c38693b4b099057553c0323cc2757470cede5614.tar.gz |
avcodec/av1dec: Pass AVCodecContext* as logctx in get_sw_pixel_format()
It indicates to the reader that said function does not modify
any state.
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/av1dec.c')
-rw-r--r-- | libavcodec/av1dec.c | 12 |
1 files 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; |