Find Jobs
Hire Freelancers

C++ flying blind

$50 USD

Closed
Posted almost 11 years ago

$50 USD

Paid on delivery
Hello! I have a C++ code here that deals with Opus. This code is surely NOT correct. I am looking for somebody who can guess what the correct code should be. Please only place a bid if you have any idea of what the correct code should be. I think you also need to read a bit of the Opus documentation. To make it clear again: My code is most probally VERY VERY WRONG. I want to feed encoded bytes and have shorts returned. If you can do this crazy task, you can be sure to get a greating rating as well. Thank you very much. int FrameByteCount(int uFrameCount) { int iInputChannels=1; int iBitrate = 16; int iBytesPerSample = (iBitrate / 8) * iInputChannels; return uFrameCount * iBytesPerSample; } void COpusCodec::Decode(unsigned char* uEncoded, short* uDecoded, unsigned int uLen) { int segmentFrames = 960; int bytesPerSegment = FrameByteCount(segmentFrames); int byteCap = bytesPerSegment; //this is not C++ code, and I don't know if it is needed. int segmentCount = (int)[login to view URL]((decimal)[login to view URL]() / byteCap); // we can not decode everything in one rush. We need to split it into packets and decode each packet // but I am not sure if I do it correctly. Most probally not. for (int i = 0; i < segmentCount; i++) { unsigned char segment[1920]; int iCount=0; for (int j = 0; j < 1920; j++) { segment[j] = uEncoded[(i*byteCap) + j]; iCount++; } unsigned char decoded[1920];//most probally wrong int len; int frame_size=opus_decode(dec, segment, len, decoded, max_size, 0); //now we have to put this part of the decoded data into the final "decoded" shorts somehow } }
Project ID: 4519776

About the project

3 proposals
Remote project
Active 11 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
3 freelancers are bidding on average $53 USD for this job
User Avatar
I am professional developer and I can help you in this task. Looking forward to hear from you.
$55 USD in 3 days
0.0 (1 review)
0.0
0.0
User Avatar
Ready to start
$50 USD in 5 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi. It's simple.
$53 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
I am something of an audio/video codec freak. I can solve this for you.
$50 USD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of GERMANY
Darmstadt, Germany
5.0
642
Payment method verified
Member since Sep 22, 2009

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.