Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8170071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:03:25+00:00 2026-06-06T21:03:25+00:00

The first part is to open the file and load it to yuv1 buffer.

  • 0

The first part is to open the file and load it to yuv1 buffer.
The next stage is reading the YUV420p data correctly
i use this formula from wiki

  size.total = size.width * size.height;
      y = yuv[position.y * size.width + position.x];
      u = yuv[(position.y / 2) * (size.width / 2) + (position.x / 2) + size.total];
      v = yuv[(position.y / 2) * (size.width / 2) + (position.x / 2) + size.total + (size.total / 4)];

next stage is to take the values from y u v and convert to rgb using the formula below

B = 1.164(Y – 16) + 2.018(U – 128)

G = 1.164(Y – 16) – 0.813(V – 128) – 0.391(U – 128)

R = 1.164(Y – 16) + 1.596(V – 128)

After getting RGB we load them back to buffer correctly and close the file.

But i am getting this error error C2064: term does not evaluate to a function taking 302 arguments
in the three formula lines.

Can someone help me out

Error code

        r1 = 1.164(y1 - 16) + 1.596(v1 - 128) +     0;
        g1 = 1.164(y1 - 16) - 0.813(v1 - 128) - 0.391(u1 - 128);
        b1 = 1.164(y1 - 16)+          0         + 2.018(u1 - 128);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:03:26+00:00Added an answer on June 6, 2026 at 9:03 pm

    Did you just paste the mathematical formula into your C code? That won’t work.

    You’ll need to fix the upper/lower case writing of your variables. And you’ll need an explicit multiplication sign:

    b = 1.164 * (y - 16) + 2.018 * (u - 128);
    g = 1.164 * (y - 16) - 0.813 * (v - 128) - 0.391 * (u - 128);
    r = 1.164 * (y - 16) + 1.596 * (v - 128);
    

    And depending on the type of the b, g and r variables, you’ll need to cast or round the floating point result to an integer value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The first part of this question is actually a request for confirmation based on
The first part of this question is now its own, here: Analyzing Text for
Is there a way to read a file's data but continue reading the data
I have the following part of a CSV File with 7 columns (see first
The first part of the query before not in runs and gives me a
Here is the first part of my controller code: public class ControlMController : Controller
I've read that by standard first part of e-mail is case sensitive, however I've
20120315021529.000[-8:PST] to get the first part I was able by using below C# code.
I'm moving my first stpes in iOS development. I have followed the first part
Ok, I got the first part of my question answered, so here's the second

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.