Documentation of chromanr filter

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Documentation of chromanr filter

Michael Koch
Hello,

The documentation of the new chromanr filter, especially this sentence
for the "thres" option is hard to understand:

"Sum of absolute difference of U and V pixel components or current pixel
and neighbour pixels lower than this threshold will be used in averaging."

First of all I think "or" is a typo and should be "of". But even with
this change the sentence is still hard to understand.
The sum of absolute differences of what? Sum of absolute differences of
the U and V pixel components? That makes no sense.

This is how I think it might work:
Foreach neighbour pixel
{
   A = absolute difference of U components of current pixel and
neighbour pixel
   B = absolute difference of V components of current pixel and
neighbour pixel
   if (A+B < threshold) then
     use this neighbour pixel for averaging
}

If the above is correct, I suggest to change the sentence as follows:

"The algorithm calculates the absolute difference of the U components of
the current pixel and a neighbour pixel. The same is also calculated for
the V components. A neighbour pixel is used for averaging, if the sum of
both absolute differences is lower than the threshold."

Also the meaning of  "stepw" and "steph" options is unclear:
-- Do these options refer to the pixels? If stepw=2 and steph=2 then
only a quarter of the pixels is analyzed, and the same U and V
components are used for 4 pixels?
-- Or do they refer to the selection of the neighbour pixels? If stepw=2
and steph=2 then only a quarter of the neighbour pixels is analyzed?

Michael
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Documentation of chromanr filter

Paul B Mahol
Please send patch, otherwise it have little sense to discuss this.

On 7/11/20, Michael Koch <[hidden email]> wrote:

> Hello,
>
> The documentation of the new chromanr filter, especially this sentence
> for the "thres" option is hard to understand:
>
> "Sum of absolute difference of U and V pixel components or current pixel
> and neighbour pixels lower than this threshold will be used in averaging."
>
> First of all I think "or" is a typo and should be "of". But even with
> this change the sentence is still hard to understand.
> The sum of absolute differences of what? Sum of absolute differences of
> the U and V pixel components? That makes no sense.
>
> This is how I think it might work:
> Foreach neighbour pixel
> {
>    A = absolute difference of U components of current pixel and
> neighbour pixel
>    B = absolute difference of V components of current pixel and
> neighbour pixel
>    if (A+B < threshold) then
>      use this neighbour pixel for averaging
> }
>
> If the above is correct, I suggest to change the sentence as follows:
>
> "The algorithm calculates the absolute difference of the U components of
> the current pixel and a neighbour pixel. The same is also calculated for
> the V components. A neighbour pixel is used for averaging, if the sum of
> both absolute differences is lower than the threshold."
>
> Also the meaning of  "stepw" and "steph" options is unclear:
> -- Do these options refer to the pixels? If stepw=2 and steph=2 then
> only a quarter of the pixels is analyzed, and the same U and V
> components are used for 4 pixels?
> -- Or do they refer to the selection of the neighbour pixels? If stepw=2
> and steph=2 then only a quarter of the neighbour pixels is analyzed?
>
> Michael
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Documentation of chromanr filter

Michael Koch
Am 11.07.2020 um 10:12 schrieb Paul B Mahol:
> Please send patch, otherwise it have little sense to discuss this.

This is the ffmpeg _user_ list, and 90% of all users (including me) are
not professional programmers and don't know how to use git.
I have seen the instructions at https://www.ffmpeg.org/git-howto.html 
but this looks quite complicated to me. I did already try git some time
ago without success.

Michael

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Documentation of chromanr filter

Paul B Mahol
On 7/11/20, Michael Koch <[hidden email]> wrote:
> Am 11.07.2020 um 10:12 schrieb Paul B Mahol:
>> Please send patch, otherwise it have little sense to discuss this.
>
> This is the ffmpeg _user_ list, and 90% of all users (including me) are
> not professional programmers and don't know how to use git.
> I have seen the instructions at https://www.ffmpeg.org/git-howto.html
> but this looks quite complicated to me. I did already try git some time
> ago without success.

Can you elaborate what you tried and what failed?

>
> Michael
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Documentation of chromanr filter

Michael Koch
Am 11.07.2020 um 10:39 schrieb Paul B Mahol:
> On 7/11/20, Michael Koch <[hidden email]> wrote:
>> Am 11.07.2020 um 10:12 schrieb Paul B Mahol:
>>> Please send patch, otherwise it have little sense to discuss this.
>> This is the ffmpeg _user_ list, and 90% of all users (including me) are
>> not professional programmers and don't know how to use git.
>> I have seen the instructions at https://www.ffmpeg.org/git-howto.html
>> but this looks quite complicated to me. I did already try git some time
>> ago without success.
> Can you elaborate what you tried and what failed?

I don't remember. It's too long ago.

Michael

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Documentation of chromanr filter

Carl Zwanzig
In reply to this post by Paul B Mahol
On 7/11/2020 1:39 AM, Paul B Mahol wrote:
> Can you elaborate what you tried and what failed?

Why does it matter???????

Someone has gone to the effort to identify a problem and suggest a solution.
I'd expect that whomever has been maintaining that code would welcome this
and incorporate that doc change almost immediately (looks like almost the
simplest thing to change).

As Michael points out, being a "user" list there are few people on it who
are developers; you're expecting one of them to install (and learn) git,
pull the code, _find_ that piece of the doc, created a git patch, and send
it up to where it might be rejected for a trivial and opaque reason. That is
not rational. What _is_ rational is for the code maintainer to say "Oh,
cool, that looks better that what I have, I'll use it." And if that specific
developer doesn't read this list, I'm willing to bet that someone who does
can send them the relevant info.

(I've been on both the developer and QA sides of the process. People can
make it easy or they can make it difficult; I prefer the former.)

Later,

z!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Documentation of chromanr filter

Mark Filipak
In reply to this post by Michael Koch
On 07/11/2020 03:27 AM, Michael Koch wrote:
-snip-
> Foreach neighbour pixel
> {
>    A = absolute difference of U components of current pixel and neighbour pixel
>    B = absolute difference of V components of current pixel and neighbour pixel
>    if (A+B < threshold) then
>      use this neighbour pixel for averaging
> }
-snip-

May I suggest this:

1, For each 'input' sample, and
2, For each of 3 (corner) or 5 (edge) or 8 (interior) 'neighbor' samples,
2.1, If the sum of 'input' U and 'neighbor' U is less than 'threshold', and
2.2, If the sum of 'input' V and 'neighbor' V is less than 'threshold', then
2.3, Add 'neighbor' to 'candidates'.
3, Average U and V of 'input' and all 'candidates', if any, and assign the new U and V to the new
'output' sample.

Instead of describing what an algorithm does, simply translate the code to human readable form, line
by line. Taking that approach makes the documentation easier to understand, it assures
code-documentation coverage, and it actually makes the documentation easier & faster to write.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Documentation of chromanr filter

Carl Eugen Hoyos-2
In reply to this post by Carl Zwanzig
Am Sa., 11. Juli 2020 um 19:58 Uhr schrieb Carl Zwanzig <[hidden email]>:
>
> On 7/11/2020 1:39 AM, Paul B Mahol wrote:
> > Can you elaborate what you tried and what failed?
>
> Why does it matter???????

I believe you misunderstand that the only limiting
factor of FFmpeg development is time, therefore
reacting to patch suggestions that took as much
time to write as an actual patch is not sustainable.

Note that I know that git is a very powerful tool
but I only use it to create patches that I send as
attachments, so I know (better than other FFmpeg
developers) how easy it is to prepare a patch if
you don't want to deal with the specifics of git.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".