diff options
author | Li Zetao <[email protected]> | 2024-08-30 03:17:51 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <[email protected]> | 2024-09-06 11:56:54 +0200 |
commit | 7adc7193537470839ec66ecbdb54f4dc9092e6f6 (patch) | |
tree | 5de8769de4bdb8132df86adc682f13b3b35a46e4 | |
parent | 7483ce8fc72f8c56b3dbc14424d2ade15233ac69 (diff) |
media: atomisp: use clamp() in ia_css_eed1_8_encode()
When it needs to get a value within a certain interval, using clamp()
makes the code easier to understand than min(max()).
Signed-off-by: Li Zetao <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
-rw-r--r-- | drivers/staging/media/atomisp/pci/isp/kernels/eed1_8/ia_css_eed1_8.host.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/atomisp/pci/isp/kernels/eed1_8/ia_css_eed1_8.host.c b/drivers/staging/media/atomisp/pci/isp/kernels/eed1_8/ia_css_eed1_8.host.c index e4fc90f88e24..55d102b479ac 100644 --- a/drivers/staging/media/atomisp/pci/isp/kernels/eed1_8/ia_css_eed1_8.host.c +++ b/drivers/staging/media/atomisp/pci/isp/kernels/eed1_8/ia_css_eed1_8.host.c @@ -276,7 +276,7 @@ ia_css_eed1_8_encode( for (i = 0; i < (IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS - 1); i++) { min_exp = max(min_exp, from->dew_enhance_seg_exp[i]); } - to->e_dew_enh_asr = 13 - min(max(min_exp, 0), 13); + to->e_dew_enh_asr = 13 - clamp(min_exp, 0, 13); to->dedgew_max = from->dedgew_max; } |