implement aligned memory to speed up video frame encoding

This commit is contained in:
2019-11-13 23:27:32 +01:00
parent b719e4c7fc
commit 56fc581b04
8 changed files with 108 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include "image.h"
#include "serializer.h"
#include "util.h"
class MP4Encoder : public Serializer::Type
{
@@ -25,7 +26,7 @@ class MP4Encoder : public Serializer::Type
float m_framerate = 0;
Header m_header;
std::vector<Frame> m_frames;
std::vector<uint8_t> m_yuv_buffer;
std::vector<uint8_t, AlignmentAllocator<uint8_t, 16>> m_yuv_buffer;
public:
~MP4Encoder();
bool init() noexcept;