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

  • SEARCH
  • Home
  • 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 7631881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:28:18+00:00 2026-05-31T06:28:18+00:00

How can I replicate the functionality of CVPixelBufferGetBaseAddressOfPlane in other languages as java, c#

  • 0

How can I replicate the functionality of CVPixelBufferGetBaseAddressOfPlane in other languages as java, c# or c++?

  • 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-05-31T06:28:19+00:00Added an answer on May 31, 2026 at 6:28 am

    The YUV420SP format consists of two planes. The first plane contains the luminance information (Y values) and the second one contains the chrominance values (U and V values). Futhermore, there is a Y value for each pixel but just a U and a V value for each 2 by 2 pixel block. Finally, the U and V values are interleaved in the second plane.

    So your byte array is most likely organized like this (each byte contains either a Y, U or V value):

    YYYYY ... YYYYUVUV ... UVUV
    

    Let’s assume the image is 400 by 300 pixels. Then you have 120,000 Y values followed by 30,000 U/V pairs.

    Since you’re using Java and Java doesn’t have pointers that can point into the middle of an array, you will need to use array indices instead of addresses. So a more or less equivalent implementation of CVPixelBufferGetBaseAddressOfPlane could look like this:

    int GetBaseIndexOfPlane(int plane, int imageWidth, int imageHeight)
    {
        if (plane == 0)
            return 0;
        else
            return imageWidth * imageHeight;
    }
    

    Most likely, your image data doesn’t contain any information about the size of the image. So you’ll have to get that information from somewhere else and provide it to the method. On the other hand, you don’t need to provide the byte array to the method. It’s not required to compute the offset of any of the planes.

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

Sidebar

Related Questions

I need to replicate the functionality of mod_alias which I can't use directly because
In Perl, I can replicate strings with the 'x' operator: $str = x x
In PHP, how can I replicate the expand/contract feature for Tinyurls as on search.twitter.com?
I know a view is composed of tables. Can I replicate a view anyway?
Wondering if anyone can suggest a good file replication tool that will replicate across
I am writing for Android, and I can't figure out how to replicate the
I'm tasked to replicate functionality from an existing application. This application relies on .NET
Has anyone successfully done this? Trying to replicate functionality similar to what is found
I am trying to replicate the functionality that users see when they go into
I'm looking to figure out how to replicate the functionality of GoDaddy's PreviewDNS when

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.