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 0/2] Minor avutil/film_grain_params tweaks
@ 2024-03-24  0:10 Leo Izen
  2024-03-24  0:10 ` [FFmpeg-devel] [PATCH 1/2] avutil/film_grain_params: remove unused variables Leo Izen
  2024-03-24  0:10 ` [FFmpeg-devel] [PATCH 2/2] avutil/film_grain_params: remove do loop in CHECK macro Leo Izen
  0 siblings, 2 replies; 3+ messages in thread
From: Leo Izen @ 2024-03-24  0:10 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Leo Izen

A few minor tweaks to libavutil/film_grain_params.c.

Leo Izen (2):
  avutil/film_grain_params: remove unused variables
  avutil/film_grain_params: remove do loop in CHECK macro

 libavutil/film_grain_params.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

-- 
2.44.0

_______________________________________________
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] 3+ messages in thread

* [FFmpeg-devel] [PATCH 1/2] avutil/film_grain_params: remove unused variables
  2024-03-24  0:10 [FFmpeg-devel] [PATCH 0/2] Minor avutil/film_grain_params tweaks Leo Izen
@ 2024-03-24  0:10 ` Leo Izen
  2024-03-24  0:10 ` [FFmpeg-devel] [PATCH 2/2] avutil/film_grain_params: remove do loop in CHECK macro Leo Izen
  1 sibling, 0 replies; 3+ messages in thread
From: Leo Izen @ 2024-03-24  0:10 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Leo Izen

These variables are never read from, so they trigger -Wunused-variables

Signed-off-by: Leo Izen <leo.izen@gmail.com>
---
 libavutil/film_grain_params.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavutil/film_grain_params.c b/libavutil/film_grain_params.c
index fff7252f2f..b3fa37f527 100644
--- a/libavutil/film_grain_params.c
+++ b/libavutil/film_grain_params.c
@@ -53,8 +53,6 @@ const AVFilmGrainParams *av_film_grain_params_select(const AVFrame *frame)
 {
     const AVFilmGrainParams *fgp, *best = NULL;
     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
-    const AVFilmGrainAOMParams *aom;
-    const AVFilmGrainH274Params *h274;
     int bit_depth_luma, bit_depth_chroma;
     if (!desc)
         return NULL;
@@ -88,7 +86,6 @@ const AVFilmGrainParams *av_film_grain_params_select(const AVFrame *frame)
         case AV_FILM_GRAIN_PARAMS_NONE:
             continue;
         case AV_FILM_GRAIN_PARAMS_AV1:
-            aom = &fgp->codec.aom;
             /* AOM FGS needs an exact match for the chroma resolution */
             if (fgp->subsampling_x != desc->log2_chroma_w ||
                 fgp->subsampling_y != desc->log2_chroma_h)
-- 
2.44.0

_______________________________________________
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] 3+ messages in thread

* [FFmpeg-devel] [PATCH 2/2] avutil/film_grain_params: remove do loop in CHECK macro
  2024-03-24  0:10 [FFmpeg-devel] [PATCH 0/2] Minor avutil/film_grain_params tweaks Leo Izen
  2024-03-24  0:10 ` [FFmpeg-devel] [PATCH 1/2] avutil/film_grain_params: remove unused variables Leo Izen
@ 2024-03-24  0:10 ` Leo Izen
  1 sibling, 0 replies; 3+ messages in thread
From: Leo Izen @ 2024-03-24  0:10 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Leo Izen

The continue statement will break out of the do/while loop, not the
outer loop as intended. This is one (compound) statement anyway, so we
can remove the do/while entirely.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
---
 libavutil/film_grain_params.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavutil/film_grain_params.c b/libavutil/film_grain_params.c
index b3fa37f527..8f8dcee569 100644
--- a/libavutil/film_grain_params.c
+++ b/libavutil/film_grain_params.c
@@ -70,10 +70,8 @@ const AVFilmGrainParams *av_film_grain_params_select(const AVFrame *frame)
             continue;
 
 #define CHECK(a, b, unspec)                                     \
-    do {                                                        \
         if ((a) != (unspec) && (b) != (unspec) && (a) != (b))   \
-            continue;                                           \
-    } while (0)
+            continue
 
         CHECK(fgp->bit_depth_luma,   bit_depth_luma,         0);
         CHECK(fgp->bit_depth_chroma, bit_depth_chroma,       0);
-- 
2.44.0

_______________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2024-03-24  0:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-24  0:10 [FFmpeg-devel] [PATCH 0/2] Minor avutil/film_grain_params tweaks Leo Izen
2024-03-24  0:10 ` [FFmpeg-devel] [PATCH 1/2] avutil/film_grain_params: remove unused variables Leo Izen
2024-03-24  0:10 ` [FFmpeg-devel] [PATCH 2/2] avutil/film_grain_params: remove do loop in CHECK macro Leo Izen

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