#include <libavformat/avio.h>
}
-#include <jpeglib.h>
-#include <unistd.h>
-
#include "chroma_subsampler.h"
#include "context.h"
#include "flow.h"
#include "ycbcr_converter.h"
#include <epoxy/glx.h>
+#include <jpeglib.h>
+#include <unistd.h>
using namespace std;
for (unsigned y = 0; y < height; y += 8) {
for (unsigned yy = 0; yy < 8; ++yy) {
yptr[yy] = const_cast<JSAMPROW>(&y_data[(y + yy) * width]);
- cbptr[yy] = const_cast<JSAMPROW>(&cb_data[(y + yy) * width/2]);
- crptr[yy] = const_cast<JSAMPROW>(&cr_data[(y + yy) * width/2]);
+ cbptr[yy] = const_cast<JSAMPROW>(&cb_data[(y + yy) * width / 2]);
+ crptr[yy] = const_cast<JSAMPROW>(&cr_data[(y + yy) * width / 2]);
}
jpeg_write_raw_data(&cinfo, data, /*num_lines=*/8);
check_error();
glNamedBufferStorage(resource.pbo, width * height * 4, nullptr, GL_MAP_READ_BIT | GL_MAP_PERSISTENT_BIT);
check_error();
- resource.pbo_contents = glMapNamedBufferRange(resource.pbo, 0, width * height * 4, GL_MAP_READ_BIT | GL_MAP_PERSISTENT_BIT);
+ resource.pbo_contents = glMapNamedBufferRange(resource.pbo, 0, width * height * 4, GL_MAP_READ_BIT | GL_MAP_PERSISTENT_BIT);
interpolate_resources.push_back(resource);
}
qf.type = QueuedFrame::ORIGINAL;
qf.output_pts = output_pts;
qf.stream_idx = stream_idx;
- qf.input_first_pts = input_pts;
+ qf.input_first_pts = input_pts;
unique_lock<mutex> lock(queue_lock);
frame_queue.push_back(qf);
chroma_subsampler->subsample_chroma(qf.cbcr_tex, 1280, 720, resources.cb_tex, resources.cr_tex);
}
-
// We could have released qf.flow_tex here, but to make sure we don't cause a stall
// when trying to reuse it for the next frame, we can just as well hold on to it
// and release it only when the readback is done.
}
return buf_size;
}
-