Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 01/10] avcodec/libvpxenc: Avoid unused-variable warning if VP9 enc is disabled
@ 2024-03-31  5:30 Andreas Rheinhardt
  2024-03-31  5:31 ` [FFmpeg-devel] [PATCH 02/10] avcodec/tiff: Don't cast const away via bsearch Andreas Rheinhardt
                   ` (10 more replies)
  0 siblings, 11 replies; 15+ messages in thread
From: Andreas Rheinhardt @ 2024-03-31  5:30 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/libvpxenc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 635cdf7a0e..bcbdc4981e 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -49,6 +49,9 @@
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 
+#define IS_VP9(avctx) (CONFIG_LIBVPX_VP9_ENCODER && avctx->codec_id == AV_CODEC_ID_VP9)
+#define IS_VP8(avctx) (CONFIG_LIBVPX_VP8_ENCODER && avctx->codec_id == AV_CODEC_ID_VP8)
+
 /**
  * Portion of struct vpx_codec_cx_pkt from vpx_encoder.h.
  * One encoded frame returned from the library.
@@ -359,8 +362,7 @@ static int frame_data_submit(AVCodecContext *avctx, AVFifo *fifo,
     FrameData fd = { .pts = frame->pts };
     int ret;
 
-#if CONFIG_LIBVPX_VP9_ENCODER
-    if (avctx->codec_id == AV_CODEC_ID_VP9 &&
+    if (IS_VP9(avctx) &&
         // Keep HDR10+ if it has bit depth higher than 8 and
         // it has PQ trc (SMPTE2084).
         enccfg->g_bit_depth > 8 && avctx->color_trc == AVCOL_TRC_SMPTE2084) {
@@ -372,7 +374,6 @@ static int frame_data_submit(AVCodecContext *avctx, AVFifo *fifo,
                 return AVERROR(ENOMEM);
         }
     }
-#endif
 
     fd.duration     = frame->duration;
     fd.frame_opaque = frame->opaque;
-- 
2.40.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-04-03 15:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-31  5:30 [FFmpeg-devel] [PATCH 01/10] avcodec/libvpxenc: Avoid unused-variable warning if VP9 enc is disabled Andreas Rheinhardt
2024-03-31  5:31 ` [FFmpeg-devel] [PATCH 02/10] avcodec/tiff: Don't cast const away via bsearch Andreas Rheinhardt
2024-03-31  5:31 ` [FFmpeg-devel] [PATCH 03/10] avfilter/avfilter: Use AV_DICT_DONT_STRDUP_(KEY|VAL) when possible Andreas Rheinhardt
2024-03-31  5:31 ` [FFmpeg-devel] [PATCH 04/10] avfilter/avfilter: Honour the short options documentation Andreas Rheinhardt
2024-03-31  5:31 ` [FFmpeg-devel] [PATCH 05/10] avfilter/vf_swapuv: Remove empty options and AVClass Andreas Rheinhardt
2024-03-31  5:31 ` [FFmpeg-devel] [PATCH 06/10] avfilter/vf_vflip: " Andreas Rheinhardt
2024-03-31  5:31 ` [FFmpeg-devel] [PATCH 07/10] avfilter/vf_hflip: " Andreas Rheinhardt
2024-03-31  5:31 ` [FFmpeg-devel] [PATCH 08/10] avfilter/vf_grayworld: " Andreas Rheinhardt
2024-03-31  5:31 ` [FFmpeg-devel] [PATCH 09/10] avfilter/avfilter: Don't use av_uninit Andreas Rheinhardt
2024-03-31  5:31 ` [FFmpeg-devel] [PATCH 10/10] all: " Andreas Rheinhardt
2024-04-01 18:21 ` [FFmpeg-devel] [PATCH 01/10] avcodec/libvpxenc: Avoid unused-variable warning if VP9 enc is disabled James Zern via ffmpeg-devel
2024-04-01 18:28   ` Andreas Rheinhardt
2024-04-02 18:32     ` James Zern via ffmpeg-devel
2024-04-03  8:36 ` Anton Khirnov
2024-04-03 15:28   ` Andreas Rheinhardt

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git