On 17/01/2023 19:11, Paul B Mahol wrote:
> On 1/17/23, Jeffrey Chapuis <ashyni1...@gmail.com> wrote:
>> I'm getting there, don't give up on me.
>>
>> Now 'limit_upscaled' become the variable used in filter_frame() and
>> 'limit' is never change, unless by user
>> We only have to update 'limit_upscaled' if 'limit' really changes.
> 
> probably ok

>-    if (s->limit < 1.0)
>-        s->limit *= (1 << desc->comp[0].depth) - 1;
>+    s->bitdepth = desc->comp[0].depth;
>+    s->limit_upscaled = s->limit;
>+    if (s->limit_upscaled < 1.0)
>+        s->limit_upscaled *= (1 << s->bitdepth) - 1;

Is it better like this? we avoid a double assignment.

-    if (s->limit < 1.0)
-        s->limit *= (1 << desc->comp[0].depth) - 1;
+    s->bitdepth = desc->comp[0].depth;
+
+    if (s->limit_upscaled < 1.0)
+        s->limit_upscaled = s->limit * (1 << s->bitdepth) - 1;
+    else
+        s->limit_upscaled = s->limit;

The full patch without this change is in the previous reply
(https://ffmpeg.org/pipermail/ffmpeg-devel/2023-January/305806.html),
let me know if there is other change to make with formatting/renaming.
I really appreciate your patience with this patch.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to