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 9182263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:31:09+00:00 2026-06-17T18:31:09+00:00

I am having some issues that I am hoping you will be able to

  • 0

I am having some issues that I am hoping you will be able to clarify. I have self taught myself a video encoding process similar to Mpeg2. The process is as follows:

  1. Split an RGBA image into 4 separate channel data memory blocks. so an array of all R values, a separate array of G values etc.

  2. take the array and grab a block of 8×8 pixel data, to transform it using the Discrete Cosine Transform (DCT).

  3. Quantize this 8×8 block using a pre-calculated quantization matrix.

  4. Zigzag encode the output of the quantization step. So I should get a trail of consecutive numbers.

  5. Run Length Encode (RLE) the output from the zigzag algorithm.

  6. Huffman Code the data after the RLE stage. Using substitution of values from a pre-computed huffman table.

  7. Go back to step 2 and repeat until all the channels data has been encoded

  8. Go back to step 2 and repeat for each channel

First question is do I need to convert the RGBA values to YUV+A (YCbCr+A) values for the process to work or can it continue using RGBA? I ask as the RGBA->YUVA conversion is a heavy workload that I would like to avoid if possible.

Next question. I am wondering should the RLE store runs for just 0’s or can that be extended to all the values in the array? See examples below:

 440000000111 == [2,4][7,0][3,1]   // RLE for all values
 or
 440000000111 == 44[7,0]111        // RLE for 0's only

The final question is what would a single symbol be in regard to the huffman stage? would a symbol to be replaced be a value like 2 or 4, or would a symbol be the Run-level pair [2,4] for example.

Thanks for taking the time to read and help me out here. I have read many papers and watched many youtube videos, which have aided my understanding of the individual algorithms but not how they all link to together to form the encoding process in code.

  • 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-17T18:31:10+00:00Added an answer on June 17, 2026 at 6:31 pm

    (this seems more like JPEG than MPEG-2 – video formats are more about compressing differences between frames, rather than just image compression)

    If you work in RGB rather than YUV, you’re probably not going to get the same compression ratio and/or quality, but you can do that if you want. Colour-space conversion is hardly a heavy workload compared to the rest of the algorithm.

    Typically in this sort of application you RLE the zeros, because that’s the element that you get a lot of repetitions of (and hopefully also a good number at the end of each block which can be replaced with a single marker value), whereas other coefficients are not so repetitive but if you expect repetitions of other values, I guess YMMV.

    And yes, you can encode the RLE pairs as single symbols in the huffman encoding.

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

Sidebar

Related Questions

I'm having some issues with some jQuery code, and I'm hoping and thinking that
I'm having with some margin or padding issues with IE8 that I'm hoping someone
I am having some issues with my email setup and hoping that someone in
I'm having some issues to deserialize a Json array that follows this format: [
I am having some issues with a code that is occasionally and sporadically throwing
Recently I was having some issues with a singelton class that was lazy initializing
I'm working on a Windows Service that's having some issues with Thread.Sleep() so I
I am having some problems figuring out this issue. I have a server that
New to Bootstrap and having some issues with accordion. Hoping someone would help me
I'm having some strange issues with Matches, hoping someone could shed some light. According

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.