bitmap - Extract RGB values from a AVFrame (FFMPEG) in C++ -


I am currently trying to read in a video frame using FFMPEG. Format PIX_FMT_RGB24; For each frame, RGB values ​​are collected in all frames-> data [0] (where the frame type is AVFrame).

How do I remove individual R, G and B values ​​for each frame? This video is for processing, I would think it would work in the same way as to remove RGB values ​​from bitmap too. Thanks!

My guess:

  int p = x * 3 + y * Frame & gt; Linesize [0]; R = frame & gt; Data [0] [p]; G = frame & gt; Data [0] [p + 1]; B = frame & gt; Data [0] [p + 2];  

I can have R, G and B behind and there are lots of rooms for speed.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -