-
Notifications
You must be signed in to change notification settings - Fork 48
Audio support - Replace Audio QA samples #616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
aa8c918
a353c5c
f76df76
9e79dba
41be482
6b013c5
55c1d70
8493196
f204c17
b97acd3
8524127
144d02a
c1a69c7
c3cc332
881fcda
53d9900
a7ab6c9
79d444c
1da1b76
be98209
a28ebf8
7603629
81b53c5
c8cc526
1cd4531
e764e13
61664b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -121,15 +121,15 @@ int main(int argc, char **argv) | |
| descriptorPtr3D->offsetInBytes = 0; | ||
| descriptorPtr3D->dataType = RpptDataType::F32; | ||
| descriptorPtr3D->dims[0] = batchSize; | ||
| descriptorPtr3D->dims[1] = maxSrcWidth; | ||
| descriptorPtr3D->dims[1] = (maxSrcWidth / 8) * 8 + 8; // Ensure a consistent dimension order between generic and typed descriptors to prevent errors. | ||
|
||
| descriptorPtr3D->strides[0] = descriptorPtr3D->dims[1]; | ||
| } | ||
|
|
||
| // set buffer sizes for src/dst | ||
| if(testCase == MEL_FILTER_BANK) | ||
| { | ||
| iBufferSize = (Rpp64u)MEL_FILTER_BANK_MAX_HEIGHT * (Rpp64u)srcDescPtr->w * (Rpp64u)srcDescPtr->c * (Rpp64u)srcDescPtr->n; | ||
| oBufferSize = (Rpp64u)MEL_FILTER_BANK_MAX_HEIGHT * (Rpp64u)dstDescPtr->w * (Rpp64u)dstDescPtr->c * (Rpp64u)dstDescPtr->n; | ||
| iBufferSize = (Rpp64u)AUDIO_MAX_HEIGHT * (Rpp64u)srcDescPtr->w * (Rpp64u)srcDescPtr->c * (Rpp64u)srcDescPtr->n; | ||
rrawther marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| oBufferSize = (Rpp64u)AUDIO_MAX_HEIGHT * (Rpp64u)dstDescPtr->w * (Rpp64u)dstDescPtr->c * (Rpp64u)dstDescPtr->n; | ||
| } | ||
| else | ||
| { | ||
|
|
@@ -138,12 +138,12 @@ int main(int argc, char **argv) | |
| } | ||
|
|
||
| // compute maximum possible buffer size of resample | ||
| Rpp64u resampleMaxBufferSize = dstDescPtr->n * dstDescPtr->strides.nStride * 1.15; | ||
| Rpp64u resampleMaxBufferSize = dstDescPtr->n * dstDescPtr->strides.nStride * RESAMPLE_BUFFER_SCALE_FACTOR; | ||
| if (testCase == RESAMPLE) | ||
| oBufferSize = resampleMaxBufferSize; | ||
|
|
||
| // compute maximum possible buffer size of spectrogram | ||
| Rpp64u spectrogramMaxBufferSize = 257 * 3754 * dstDescPtr->n; | ||
| Rpp64u spectrogramMaxBufferSize = AUDIO_MAX_HEIGHT * SPECTROGRAM_MAX_WIDTH * dstDescPtr->n; | ||
| if (testCase == SPECTROGRAM) | ||
| oBufferSize = spectrogramMaxBufferSize; | ||
|
|
||
|
|
@@ -323,8 +323,8 @@ int main(int argc, char **argv) | |
| maxDstWidth = 0; | ||
| for(int i = 0, j = 0; i < batchSize; i++, j += 2) | ||
| { | ||
| inRateTensor[i] = 16000; | ||
| outRateTensor[i] = 16000 * 1.15f; | ||
| inRateTensor[i] = 44100; | ||
| outRateTensor[i] = 44100 * 1.15f; | ||
rrawther marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Rpp32f scaleRatio = outRateTensor[i] / inRateTensor[i]; | ||
| srcDimsTensor[j] = srcLengthTensor[i]; | ||
| srcDimsTensor[j + 1] = channelsTensor[i]; | ||
|
|
@@ -364,7 +364,7 @@ int main(int argc, char **argv) | |
| Rpp32s numFilter = 80; | ||
| bool normalize = true; | ||
| // (height, width) for each tensor in a batch for given QA inputs. | ||
| Rpp32s srcDimsTensor[] = {257, 225, 257, 211, 257, 214}; | ||
| Rpp32s srcDimsTensor[] = {257, 3170, 257, 552, 257, 1131}; | ||
|
|
||
| init_mel_filter_bank(&inputf32, &outputf32, srcDescPtr, dstDescPtr, dstDims, offsetInBytes, numFilter, batchSize, srcDimsTensor, scriptPath, testType); | ||
|
|
||
|
|
@@ -384,7 +384,7 @@ int main(int argc, char **argv) | |
| if (missingFuncFlag == 1) | ||
| { | ||
| cout << "\nThe functionality " << func << " doesn't yet exist in RPP\n"; | ||
| return -1; | ||
| return RPP_ERROR_NOT_IMPLEMENTED; | ||
| } | ||
|
|
||
| wallTime = endWallTime - startWallTime; | ||
|
|
||
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.