Closed jeffpc closed 3 years ago
The funny story here is that I've been suffering aliasing with fractional baudrates for a while and I spent hours staring at this function trying to understand what I did wrong. I guess it was so obvious that I couldn't see it until I got this warning.
Anyways, it should be fixed now. Thanks!
On Tue, Aug 11, 2020 at 11:22:01 -0700, Gonzalo José Carracedo Carballal wrote:
The funny story here is that I've been suffering aliasing with fractional baudrates for a while and I spent hours staring at this function trying to understand what I did wrong. I guess it was so obvious that I couldn't see it until I got this warning.
Anyways, it should be fixed now. Thanks!
The change fixes that warning. :)
It turns out there is another (much less severe) warning that I didn't notice before:
/home/jeffpc/src/oss/dsp/sigutils/sigutils/tvproc.c:700:27: warning: absolute value function 'fabsf' given
an argument of type 'double' but has parameter of type 'float' which may cause truncation of value
[-Wabsolute-value]
err_vsync_offset = 2 * SU_ABS(.5 - vsync_pos / self->est_line_len);
^
(Same thing on lines 701, 767, and 768 as well)
Basically, SU_ABS is defined to be fabsf (which operates on floats) but tvproc.c uses it to work on doubles.
That is probably because the .5, which should be .5f. I'll fix it in a while.
El mar., 11 ago. 2020 21:12, jeffpc notifications@github.com escribió:
On Tue, Aug 11, 2020 at 11:22:01 -0700, Gonzalo José Carracedo Carballal wrote:
The funny story here is that I've been suffering aliasing with fractional baudrates for a while and I spent hours staring at this function trying to understand what I did wrong. I guess it was so obvious that I couldn't see it until I got this warning.
Anyways, it should be fixed now. Thanks!
The change fixes that warning. :)
It turns out there is another (much less severe) warning that I didn't notice before:
/home/jeffpc/src/oss/dsp/sigutils/sigutils/tvproc.c:700:27: warning: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Wabsolute-value] err_vsync_offset = 2 * SU_ABS(.5 - vsync_pos / self->est_line_len); ^
(Same thing on lines 701, 767, and 768 as well)
Basically, SU_ABS is defined to be fabsf (which operates on floats) but tvproc.c uses it to work on doubles.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/BatchDrake/sigutils/issues/21#issuecomment-672206054, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEVET7KFH5MQM7Q3QY7GMLSAGJ3DANCNFSM4P3KAUVA .
It should be fixed now. I also rewrote some comparisons that were a bit difficult to read.
Builds fine, and a 10 second test replay of a raw file didn't reveal any issue :)
Recent TV related changes introduced a warning:
I'm not sure what it should actually say. I'm guessing that
phase
is supposed to be initialized toself->phase
at some point in that function.