Implemented Int32_To_UInt8_Dither#841
Conversation
Implemented a method to convert data from int32_To_UnInt8_Dither. Port audio did not offer 32bitTriangularDither so I used the available 16bitTriangularDither. Would like to know how to test this code and how to check if it is implemented correctly. The build for port audio works with these changes.
|
Thanks for this. I'm not sure that you have the dither scaling factor correct, could you provide a rationale please? Looking at the docs for But please could you check this for yourself. The following tests are present, not sure whether they are sufficient: |
Fixed dither scaling factor
|
Hi, thanks for the corrections. I made the code changes you have suggested. What dynamic range code should I expect after running test/patest_converters for the i32 to ui8 conversions, what logic should I use to generalize this indicator across various conversion tests. |
philburk
left a comment
There was a problem hiding this comment.
The new math looks good.
But the CI found some trailing whitespace:
error: src/common/pa_converters.c(1016) trailing whitespace:
b' unsigned char dest = (unsigned char)destinationBuffer; '
error: src/common/pa_converters.c(1021) trailing whitespace:
b' '
error: src/common/pa_converters.c(1028) trailing whitespace:
b' dest += destinationStride; '
Same as other ui8 conversions I guess. Could you paste the output of this test here please and we'll scratch our heads about it: https://github.com/PortAudio/portaudio/blob/master/test/patest_converters.c |
Hi, Any Ideas how I could fix it? |
|
@ngoiyaeric it depends on how |
hi, this does not remedy the issue, the same error is still thrown. |
|
@ngoiyaeric in any case GCC is struggling to locate |
|
@ngoiyaeric have you managed to test your implementation? Also this commit (273c991) has to be removed from PR. |
|
We'd like to see this tested and finalised but given the lack of input, we're not going to hold up the next milestone release for this. We can revisit if someone steps up to fix it. |
| @@ -0,0 +1,23 @@ | |||
| # This workflow was added by CodeSee. Learn more at https://codesee.io/ | |||
There was a problem hiding this comment.
This file should be removed from this PR.
It is unrelated to the purpose of the PR.
| unsigned char *dest = (unsigned char*)destinationBuffer; */ | ||
| PaInt32 *src = (PaInt32*)sourceBuffer; | ||
| unsigned char *dest = (unsigned char*)destinationBuffer; | ||
| (void)ditherGenerator; /* unused parameter */ |
There was a problem hiding this comment.
Remove this line. Used on line: 1022.
|
Closing as incomplete / abandoned. We can't merge this as-is and there's been no response from the contributor for over one year. |
Implemented a method to convert data from int32_To_UnInt8_Dither. Port audio did not offer 32bitTriangularDither so I used the available 16bitTriangularDither. Would like to know how to test this code and how to check if it is implemented correctly. The build for port audio works with these changes.
[work towards issue #35]