v1.03 prerelease - Full Linux port of crnlib/crunch, in progress - still more testing to do, and some cmd line options (such as -timestamp) don't work under linux yet, but the core stuff (compression/decompression/transcoding) should work fine and performance under Linux is comparable to Windows. The 3 examples haven't been ported yet.
This commit is contained in:
@@ -3,34 +3,34 @@
|
||||
#pragma once
|
||||
#include "crn_resampler.h"
|
||||
#include "crn_vec.h"
|
||||
#include "crn_task_pool.h"
|
||||
|
||||
namespace crnlib
|
||||
{
|
||||
class task_pool;
|
||||
class threaded_resampler
|
||||
{
|
||||
CRNLIB_NO_COPY_OR_ASSIGNMENT_OP(threaded_resampler);
|
||||
|
||||
|
||||
public:
|
||||
threaded_resampler(task_pool& tp);
|
||||
~threaded_resampler();
|
||||
|
||||
|
||||
enum pixel_format
|
||||
{
|
||||
cPF_Y_F32,
|
||||
cPF_RGBX_F32,
|
||||
cPF_RGBA_F32,
|
||||
|
||||
|
||||
cPF_Total
|
||||
};
|
||||
|
||||
|
||||
struct params
|
||||
{
|
||||
params()
|
||||
{
|
||||
clear();
|
||||
}
|
||||
|
||||
|
||||
void clear()
|
||||
{
|
||||
utils::zero_object(*this);
|
||||
@@ -42,44 +42,44 @@ namespace crnlib
|
||||
m_filter_x_scale = 1.0f;
|
||||
m_filter_y_scale = 1.0f;
|
||||
}
|
||||
|
||||
|
||||
pixel_format m_fmt;
|
||||
|
||||
|
||||
const void* m_pSrc_pixels;
|
||||
uint m_src_width;
|
||||
uint m_src_height;
|
||||
uint m_src_pitch;
|
||||
|
||||
|
||||
void* m_pDst_pixels;
|
||||
uint m_dst_width;
|
||||
uint m_dst_height;
|
||||
uint m_dst_pitch;
|
||||
|
||||
|
||||
Resampler::Boundary_Op m_boundary_op;
|
||||
|
||||
|
||||
float m_sample_low;
|
||||
float m_sample_high;
|
||||
|
||||
|
||||
const char* m_Pfilter_name;
|
||||
float m_filter_x_scale;
|
||||
float m_filter_y_scale;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
bool resample(const params& p);
|
||||
|
||||
|
||||
private:
|
||||
task_pool* m_pTask_pool;
|
||||
|
||||
|
||||
const params* m_pParams;
|
||||
|
||||
|
||||
Resampler::Contrib_List* m_pX_contribs;
|
||||
Resampler::Contrib_List* m_pY_contribs;
|
||||
uint m_bytes_per_pixel;
|
||||
|
||||
|
||||
crnlib::vector<vec4F> m_tmp_img;
|
||||
|
||||
|
||||
void free_contrib_lists();
|
||||
|
||||
|
||||
void resample_x_task(uint64 data, void* pData_ptr);
|
||||
void resample_y_task(uint64 data, void* pData_ptr);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user