Skip to content
Permalink
Browse files

mmalcodec: Add interlace state to mmal video buffer

  • Loading branch information...
popcornmix committed Jun 27, 2016
1 parent e678bd2 commit 2ea8de97d56117952a6277470d36f7a2f378c1d2
@@ -69,6 +69,7 @@ CMMALVideoBuffer::CMMALVideoBuffer(CMMALVideo *omv)
m_aligned_height = 0;
m_aspect_ratio = 0.0f;
m_refs = 0;
m_interlace_mode = MMAL_InterlaceProgressive;
}

CMMALVideoBuffer::~CMMALVideoBuffer()
@@ -281,6 +282,7 @@ void CMMALVideo::dec_output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf
omvb->m_aligned_width = m_decoded_aligned_width;
omvb->m_aligned_height = m_decoded_aligned_height;
omvb->m_aspect_ratio = m_aspect_ratio;
omvb->m_interlace_mode = m_interlace_mode;
{
CSingleLock lock(m_output_mutex);
m_output_ready.push(omvb);
@@ -53,6 +53,7 @@ class CMMALBuffer : public IDVDResourceCounted<CMMALBuffer>
unsigned int m_aligned_width;
unsigned int m_aligned_height;
float m_aspect_ratio;
MMAL_INTERLACETYPE_T m_interlace_mode;
};

class CMMALVideo;
@@ -53,6 +53,7 @@ CMMALYUVBuffer::CMMALYUVBuffer(CDecoder *dec, unsigned int width, unsigned int h
m_aligned_height = aligned_height;
m_aspect_ratio = 0.0f;
mmal_buffer = nullptr;
m_interlace_mode = MMAL_InterlaceProgressive;
if (dec->m_fmt == AV_PIX_FMT_YUV420P)
size_pic = (m_aligned_width * m_aligned_height * 3) >> 1;
else if (dec->m_fmt == AV_PIX_FMT_BGR0)

0 comments on commit 2ea8de9

Please sign in to comment.
You can’t perform that action at this time.