BC_SubMenu *submenu;
add_item(info = new AssetPopupInfo(mwindow, this));
add_item(format = new AWindowListFormat(mwindow, gui));
- add_item(new AssetPopupSort(mwindow, this));
+ add_item(menu_item = new BC_MenuItem(_("Sort...")));
+ menu_item->add_submenu(submenu = new BC_SubMenu());
+ submenu->add_submenuitem(new AssetPopupSortNames(mwindow, this));
+ submenu->add_submenuitem(new AssetPopupSortTimes(mwindow, this));
add_item(index = new AssetPopupBuildIndex(mwindow, this));
add_item(view = new AssetPopupView(mwindow, this));
add_item(view_window = new AssetPopupViewWindow(mwindow, this));
}
-AssetPopupSort::AssetPopupSort(MWindow *mwindow, AssetPopup *popup)
- : BC_MenuItem(_("Sort items"))
+AssetPopupSortNames::AssetPopupSortNames(MWindow *mwindow, AssetPopup *popup)
+ : BC_MenuItem(_("Sort names"))
+{
+ this->mwindow = mwindow;
+ this->popup = popup;
+}
+
+AssetPopupSortNames::~AssetPopupSortNames()
+{
+}
+
+int AssetPopupSortNames::handle_event()
+{
+ mwindow->awindow->gui->sort_assets(0);
+ return 1;
+}
+
+AssetPopupSortTimes::AssetPopupSortTimes(MWindow *mwindow, AssetPopup *popup)
+ : BC_MenuItem(_("Sort times"))
{
this->mwindow = mwindow;
this->popup = popup;
}
-AssetPopupSort::~AssetPopupSort()
+AssetPopupSortTimes::~AssetPopupSortTimes()
{
}
-int AssetPopupSort::handle_event()
+int AssetPopupSortTimes::handle_event()
{
- mwindow->awindow->gui->sort_assets();
+ mwindow->awindow->gui->sort_assets(1);
return 1;
}
AssetPopup *popup;
};
-class AssetPopupSort : public BC_MenuItem
+class AssetPopupSortNames : public BC_MenuItem
{
public:
- AssetPopupSort(MWindow *mwindow, AssetPopup *popup);
- ~AssetPopupSort();
+ AssetPopupSortNames(MWindow *mwindow, AssetPopup *popup);
+ ~AssetPopupSortNames();
+
+ int handle_event();
+
+ MWindow *mwindow;
+ AssetPopup *popup;
+};
+
+class AssetPopupSortTimes : public BC_MenuItem
+{
+public:
+ AssetPopupSortTimes(MWindow *mwindow, AssetPopup *popup);
+ ~AssetPopupSortTimes();
int handle_event();
icon_vframe = 0;
vicon = 0;
in_use = 1;
+ mtime = 0;
id = 0;
persistent = 0;
}
icon = gui->audio_icon;
icon_vframe = gui->audio_vframe;
}
-
+ struct stat st;
+ mtime = !stat(asset->path, &st) ? st.st_mtime : 0;
}
else
if( indexable && !indexable->is_asset ) {
}
}
-void AWindowGUI::sort_assets()
+void AWindowGUI::sort_assets(int use_mtime)
{
switch( mwindow->edl->session->awindow_folder ) {
case AW_AEFFECT_FOLDER:
sort_picons(&labellist);
break;
default:
- sort_picons(&assets);
+ sort_picons(&assets, use_mtime);
}
// reset xyposition
asset_list->update_format(asset_list->get_format(), 0);
else
if( picon->label && picon->label->textstr )
dst[1].append(item2 = new BC_ListBoxItem(picon->label->textstr));
+ else if( picon->mtime ) {
+ char date_time[BCSTRLEN];
+ struct tm stm; localtime_r(&picon->mtime, &stm);
+ sprintf(date_time,"%04d.%02d.%02d %02d:%02d:%02d",
+ stm.tm_year+1900, stm.tm_mon+1, stm.tm_mday,
+ stm.tm_hour, stm.tm_min, stm.tm_sec);
+ dst[1].append(item2 = new BC_ListBoxItem(date_time));
+ }
else
dst[1].append(item2 = new BC_ListBoxItem(""));
item1->set_autoplace_text(1); item1->set_autoplace_icon(1);
}
}
-void AWindowGUI::sort_picons(ArrayList<BC_ListBoxItem*> *src)
+void AWindowGUI::sort_picons(ArrayList<BC_ListBoxItem*> *src, int use_mtime)
{
- int done = 0;
- while(!done)
- {
+ int done = 0, changed = 0;
+ while( !done ) {
done = 1;
- for( int i = 0; i < src->total - 1; i++ ) {
- BC_ListBoxItem *item1 = src->values[i];
- BC_ListBoxItem *item2 = src->values[i + 1];
- item1->set_autoplace_icon(1);
- item2->set_autoplace_icon(1);
- item1->set_autoplace_text(1);
- item2->set_autoplace_text(1);
- if( strcmp(item1->get_text(), item2->get_text()) > 0 ) {
+ for( int i=0; i<src->total-1; ++i ) {
+ AssetPicon *item1 = (AssetPicon *)src->values[i];
+ AssetPicon *item2 = (AssetPicon *)src->values[i + 1];
+ if( use_mtime ? item1->mtime > item2->mtime :
+ strcmp(item1->get_text(), item2->get_text()) > 0 ) {
src->values[i + 1] = item1;
src->values[i] = item2;
- done = 0;
+ done = 0; changed = 1;
}
}
}
+ if( changed ) {
+ for( int i=0; i<src->total; ++i ) {
+ AssetPicon *item = (AssetPicon *)src->values[i];
+ item->set_autoplace_icon(1);
+ item->set_autoplace_text(1);
+ }
+ }
}
int AWindowListSort::handle_event()
{
- gui->sort_assets();
+ gui->sort_assets(0);
return 1;
}
EDL *edl;
int in_use;
-
+ time_t mtime;
int persistent;
PluginServer *plugin;
int keypress_event();
void async_update_assets(); // Sends update asset event
void update_effects();
- void sort_assets();
+ void sort_assets(int use_mtime);
void sort_folders();
void reposition_objects();
static int folder_number(const char *name);
void create_label_folder();
void copy_picons(ArrayList<BC_ListBoxItem*> *dst,
ArrayList<BC_ListBoxItem*> *src, int folder);
- void sort_picons(ArrayList<BC_ListBoxItem*> *src);
+ void sort_picons(ArrayList<BC_ListBoxItem*> *src, int use_mtime=0);
// Return the selected asset in asset_list
Indexable* selected_asset();
PluginServer* selected_plugin();
int ClipPopupSort::handle_event()
{
- mwindow->awindow->gui->sort_assets();
+ mwindow->awindow->gui->sort_assets(0);
return 1;
}
// use static presets YUV in bccolors.h
#define BC_GL_MATRIX(shader, mat) \
glUniformMatrix3fv(glGetUniformLocation(shader, #mat), 1, 0, YUV::mat)
+#define BC_GL_VECTOR(shader, vec) \
+ glUniform3fv(glGetUniformLocation(shader, #vec), 1, YUV::vec)
-#define BC_GL_YMINF(shader,mat) \
- glUniform1f(glGetUniformLocation(shader, "yminf"), YUV::mat[9])
+#define BC_GL_YMINF(shader) \
+ glUniform1f(glGetUniformLocation(shader, "yminf"), YUV::yuv.get_yminf())
#define BC_GL_RGB_TO_YUV(shader) do { \
BC_GL_MATRIX(shader, rgb_to_yuv_matrix); \
- BC_GL_YMINF(shader, rgb_to_yuv_matrix); \
+ BC_GL_YMINF(shader); \
+} while(0)
+
+#define BC_GL_RGB_TO_Y(shader) do { \
+ BC_GL_VECTOR(shader, rgb_to_y_vector); \
+ BC_GL_YMINF(shader); \
} while(0)
#define BC_GL_YUV_TO_RGB(shader) do { \
BC_GL_MATRIX(shader, yuv_to_rgb_matrix); \
- BC_GL_YMINF(shader, yuv_to_rgb_matrix); \
+ BC_GL_YMINF(shader); \
} while(0)
#define BC_GL_COLORS(shader) do { \
BC_GL_MATRIX(shader, yuv_to_rgb_matrix); \
BC_GL_MATRIX(shader, rgb_to_yuv_matrix); \
- BC_GL_YMINF(shader, rgb_to_yuv_matrix); \
+ BC_GL_YMINF(shader); \
} while(0)
#define bc_gl_yuv_to_rgb "uniform mat3 yuv_to_rgb_matrix;\n"
#define bc_gl_rgb_to_yuv "uniform mat3 rgb_to_yuv_matrix;\n"
+#define bc_gl_rgb_to_y "uniform vec3 rgb_to_y_vector;\n"
#define bc_gl_yminf "uniform float yminf;\n"
#define bc_gl_colors bc_gl_yuv_to_rgb bc_gl_rgb_to_yuv bc_gl_yminf
}
//printf("VAttachmentPoint::render 3\n");
// Need to copy PBuffer if OpenGL, regardless of use_opengl
- if( buffer_vector[buffer_number]->get_opengl_state() == VFrame::RAM ) {
+ int opengl_state = buffer_vector[buffer_number]->get_opengl_state();
+ if( opengl_state == VFrame::RAM ) {
output->copy_from(buffer_vector[buffer_number]);
output->set_opengl_state(VFrame::RAM);
}
- else if(renderengine && renderengine->video) {
+ else if( opengl_state != VFrame::UNKNOWN &&
+ renderengine && renderengine->video) {
// Need to copy PBuffer to texture
// printf("VAttachmentPoint::render temp=%p output=%p\n",
// buffer_vector[buffer_number],
YUV YUV::yuv;
-float YUV::rgb_to_yuv_matrix[10];
-float YUV::yuv_to_rgb_matrix[10];
+float YUV::yuv_to_rgb_matrix[9];
+float YUV::rgb_to_yuv_matrix[9];
+float YUV::rgb_to_y_vector[3];
YUV::YUV()
{
rgb_to_yuv_matrix[6] = b_to_y;
rgb_to_yuv_matrix[7] = b_to_u;
rgb_to_yuv_matrix[8] = b_to_v;
- rgb_to_yuv_matrix[9] = yminf;
+
+ rgb_to_y_vector[0] = r_to_y;
+ rgb_to_y_vector[1] = g_to_y;
+ rgb_to_y_vector[2] = b_to_y;
float yscale = 1.f / yrangef;
yuv_to_rgb_matrix[0] = yscale;
yuv_to_rgb_matrix[6] = v_to_r;
yuv_to_rgb_matrix[7] = v_to_g;
yuv_to_rgb_matrix[8] = 0;
- yuv_to_rgb_matrix[9] = yminf;
}
void YUV::init_tables(int len,
inline int is_mpeg() { return mpeg; }
static YUV yuv;
- static float rgb_to_yuv_matrix[10];
- static float yuv_to_rgb_matrix[10];
+ static float yuv_to_rgb_matrix[9];
+ static float rgb_to_yuv_matrix[9];
+ static float rgb_to_y_vector[3];
+ inline float get_yminf() { return yminf; }
#define YUV_rgb_to_yuv_8(r,g,b, y,u,v) \
y = iclip((rtoy8[r] + gtoy8[g] + btoy8[b] + yzero) >> 16, ymin8, ymax8); \
// Date entry
if(!is_dir || 1)
{
- static const char *month_text[13] = { "Nul",
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
- };
- sprintf(string,
- "%s %d, %d",
- month_text[file_item->month],
- file_item->day,
- file_item->year);
+ struct tm mod_time;
+ localtime_r(&file_item->mtime, &mod_time);
+ sprintf(string, "%04d.%02d.%02d %02d:%02d:%02d",
+ mod_time.tm_year+1900, mod_time.tm_mon+1, mod_time.tm_mday,
+ mod_time.tm_hour, mod_time.tm_min, mod_time.tm_sec);
new_item = new BC_ListBoxItem(string, get_resources()->file_color);
}
else
unsigned char* BC_Theme::get_image_data(const char *name, int log_errs)
{
// Image is the same as the last one
- if( last_image_data && !strcasecmp(last_image_data->name, name) )
+ if( last_image_data && !strcmp(last_image_data->name, name) )
return last_image_data->data;
// look forwards thru data sets for name
while( r-l > 1 ) {
m = (l + r) / 2;
BC_ImageData *image_data = images[m];
- if( !(v=strcasecmp(name, image_data->name)) ) {
+ if( !(v=strcmp(name, image_data->name)) ) {
image_data->used = 1;
last_image_data = image_data;
return image_data->data;
}
FileItem::FileItem(char *path, char *name, int is_dir,
- int64_t size, int month, int day, int year,
- int64_t calendar_time, int item_no)
+ int64_t size, time_t mtime, int item_no)
{
this->path = new char[strlen(path)];
this->name = new char[strlen(name)];
if(this->name) strcpy(this->name, name);
this->is_dir = is_dir;
this->size = size;
- this->month = month;
- this->day = day;
- this->year = year;
- this->calendar_time = calendar_time;
+ this->mtime = mtime;
this->item_no = item_no;
}
name = 0;
is_dir = 0;
size = 0;
- month = 0;
- day = 0;
- year = 0;
- calendar_time = 0;
+ mtime = 0;
item_no = -1;
return 0;
}
{
FileItem *item1 = *(FileItem**)ptr1;
FileItem *item2 = *(FileItem**)ptr2;
- return item1->calendar_time == item2->calendar_time ?
+ return item1->mtime == item2->mtime ?
item1->item_no - item2->item_no :
- item1->calendar_time > item2->calendar_time;
+ item1->mtime > item2->mtime;
}
int FileSystem::date_descending(const void *ptr1, const void *ptr2)
{
FileItem *item1 = *(FileItem**)ptr1;
FileItem *item2 = *(FileItem**)ptr2;
- return item2->calendar_time == item1->calendar_time ?
+ return item2->mtime == item1->mtime ?
item2->item_no - item1->item_no :
- item2->calendar_time > item1->calendar_time;
+ item2->mtime > item1->mtime;
}
int FileSystem::ext_ascending(const void *ptr1, const void *ptr2)
if(!stat(full_path, &ostat))
{
new_file->size = ostat.st_size;
- struct tm *mod_time = localtime(&(ostat.st_mtime));
- new_file->month = mod_time->tm_mon + 1;
- new_file->day = mod_time->tm_mday;
- new_file->year = mod_time->tm_year + 1900;
- new_file->calendar_time = ostat.st_mtime;
+ new_file->mtime = ostat.st_mtime;
if(S_ISDIR(ostat.st_mode))
{
public:
FileItem();
FileItem(char *path, char *name, int is_dir,
- int64_t size, int month, int day, int year,
- int64_t calendar_time, int item_no=-1);
+ int64_t size, time_t mtime, int item_no=-1);
~FileItem();
int set_path(char *path);
char *name;
int is_dir;
int64_t size;
- int month;
- int day;
- int year;
- int64_t calendar_time;
+ time_t mtime;
int item_no;
};
"}\n";
static const char *get_rgbvalue_frag =
- "uniform mat3 rgb_to_yuv_matrix;\n"
+ "uniform vec3 rgb_to_y_vector;\n"
"uniform float yminf;\n"
"float get_value(vec4 color)\n"
"{\n"
- " return dot(color.rgb, rgb_to_yuv_matrix[0]) + yminf;\n"
+ " return dot(color.rgb, rgb_to_y_vector) + yminf;\n"
"}\n";
static const char *value_frag =
glUniform3f(glGetUniformLocation(shader, "key"),
(float)y_key / 0xff, (float)u_key / 0xff, (float)v_key / 0xff);
if(config.use_value)
- BC_GL_RGB_TO_YUV(shader);
+ BC_GL_RGB_TO_Y(shader);
}
SET_TRACE
static const char *rgb_value =
" float difference = abs("
- " dot(foreground.rgb, rgb_to_yuv_matrix[0]) - "
- " dot(background.rgb, rgb_to_yuv_matrix[0]));\n";
+ " dot(foreground.rgb, rgb_to_y_vector) - "
+ " dot(background.rgb, rgb_to_y_vector));\n";
static const char *diffkey_tail =
" vec4 result;\n"
" gl_FragColor = result;\n"
"}\n";
- top_frame->enable_opengl();
- top_frame->init_screen();
-
top_frame->to_texture();
bottom_frame->to_texture();
top_frame->enable_opengl();
top_frame->init_screen();
- int need_color_matrix = 0;
+ const char *shader_stack[16];
+ memset(shader_stack,0, sizeof(shader_stack));
+ int current_shader = 0;
+
+ int need_rgb_to_y = 0;
const char *shader_frag = !config.do_value ? colorcube :
BC_CModels::is_yuv(top_frame->get_color_model()) ?
- yuv_value : (need_color_matrix = 1, rgb_value);
-
- unsigned int shader = VFrame::make_shader(0,
- diffkey_head, shader_frag, diffkey_tail, 0);
+ yuv_value : (need_rgb_to_y = 1, rgb_value);
+ if( need_rgb_to_y )
+ shader_stack[current_shader++] = bc_gl_rgb_to_y;
+ shader_stack[current_shader++] = diffkey_head;
+ shader_stack[current_shader++] = shader_frag;
+ shader_stack[current_shader++] = diffkey_tail;
+
+ shader_stack[current_shader] = 0;
+ unsigned int shader = VFrame::make_shader(shader_stack);
DIFFKEY_VARS(this)
bottom_frame->bind_texture(1);
glUniform1f(glGetUniformLocation(shader, "threshold"), threshold);
glUniform1f(glGetUniformLocation(shader, "pad"), pad);
glUniform1f(glGetUniformLocation(shader, "threshold_pad"), threshold_pad);
- if( need_color_matrix )
- BC_GL_MATRIX(shader, rgb_to_yuv_matrix);
+ if( need_rgb_to_y )
+ BC_GL_MATRIX(shader, rgb_to_y_vector);
}
if(BC_CModels::components(get_output()->get_color_model()) == 3)
glUseProgram(0);
top_frame->set_opengl_state(VFrame::SCREEN);
glDisable(GL_BLEND);
-
-// does not work, fails in playback3d
// Fastest way to discard output
-// bottom_frame->set_opengl_state(VFrame::TEXTURE);
+ bottom_frame->set_opengl_state(VFrame::UNKNOWN);
// kludge ahead
top_frame->screen_to_ram();
new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
- new_toggle("histogram.png",
+ new_toggle("histogram_toggle.png",
editpanel_up,
editpanel_hi,
editpanel_checked,
new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
+ new_toggle("histogram_toggle.png",
+ editpanel_up,
+ editpanel_hi,
+ editpanel_checked,
+ editpanel_dn,
+ editpanel_checkedhi,
+ "histogram_toggle");
+ new_toggle("histogram_rgb.png",
+ editpanel_up,
+ editpanel_hi,
+ editpanel_checked,
+ editpanel_dn,
+ editpanel_checkedhi,
+ "histogram_rgb_toggle");
+ new_toggle("waveform.png",
+ editpanel_up,
+ editpanel_hi,
+ editpanel_checked,
+ editpanel_dn,
+ editpanel_checkedhi,
+ "waveform_toggle");
+ new_toggle("waveform_rgb.png",
+ editpanel_up,
+ editpanel_hi,
+ editpanel_checked,
+ editpanel_dn,
+ editpanel_checkedhi,
+ "waveform_rgb_toggle");
+ new_toggle("scope.png",
+ editpanel_up,
+ editpanel_hi,
+ editpanel_checked,
+ editpanel_dn,
+ editpanel_checkedhi,
+ "scope_toggle");
+
+ new_button("picture.png", editpanel_up, editpanel_hi, editpanel_dn, "picture");
+ new_button("histogram_img.png", editpanel_up, editpanel_hi, editpanel_dn, "histogram_img");
//bottom_justify = new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
//center_justify = new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
- new_toggle("histogram.png",
+ new_toggle("histogram_toggle.png",
editpanel_up,
editpanel_hi,
editpanel_checked,
new_button("picture.png", editpanel_up, editpanel_hi, editpanel_dn, "picture");
new_button("histogram_img.png", editpanel_up, editpanel_hi, editpanel_dn, "histogram_img");
-
new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
new_button("commercial.png", editpanel_up, editpanel_hi, editpanel_dn, "commercial");
new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
+ new_toggle("histogram_toggle.png",
+ editpanel_up,
+ editpanel_hi,
+ editpanel_checked,
+ editpanel_dn,
+ editpanel_checkedhi,
+ "histogram_toggle");
+ new_toggle("histogram_rgb.png",
+ editpanel_up,
+ editpanel_hi,
+ editpanel_checked,
+ editpanel_dn,
+ editpanel_checkedhi,
+ "histogram_rgb_toggle");
+ new_toggle("waveform.png",
+ editpanel_up,
+ editpanel_hi,
+ editpanel_checked,
+ editpanel_dn,
+ editpanel_checkedhi,
+ "waveform_toggle");
+ new_toggle("waveform_rgb.png",
+ editpanel_up,
+ editpanel_hi,
+ editpanel_checked,
+ editpanel_dn,
+ editpanel_checkedhi,
+ "waveform_rgb_toggle");
+ new_toggle("scope.png",
+ editpanel_up,
+ editpanel_hi,
+ editpanel_checked,
+ editpanel_dn,
+ editpanel_checkedhi,
+ "scope_toggle");
+
+ new_button("picture.png", editpanel_up, editpanel_hi, editpanel_dn, "picture");
+ new_button("histogram_img.png", editpanel_up, editpanel_hi, editpanel_dn, "histogram_img");
new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
new_button("commercial.png", editpanel_up, editpanel_hi, editpanel_dn, "commercial");
new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
- new_toggle("histogram.png",
+ new_toggle("histogram_toggle.png",
editpanel_up,
editpanel_hi,
editpanel_checked,
new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
- new_toggle("histogram.png",
+ new_toggle("histogram_toggle.png",
editpanel_up,
editpanel_hi,
editpanel_checked,
new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
- new_toggle("histogram.png",
+ new_toggle("histogram_toggle.png",
editpanel_up,
editpanel_hi,
editpanel_checked,
new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
- new_toggle("histogram.png",
+ new_toggle("histogram_toggle.png",
editpanel_up,
editpanel_hi,
editpanel_checked,
new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
- new_toggle("histogram.png",
+ new_toggle("histogram_toggle.png",
editpanel_up,
editpanel_hi,
editpanel_checked,
"uniform vec4 low_color;\n"
"uniform vec4 mid_color;\n"
"uniform vec4 high_color;\n"
- "uniform mat3 rgb_to_yuv_matrix;\n"
+ "uniform vec3 rgb_to_y_vector;\n"
"uniform float yminf;\n"
"void main()\n"
"{\n"
" vec4 pixel = texture2D(tex, gl_TexCoord[0].st);\n"
- " float v = dot(pixel.rgb, rgb_to_yuv_matrix[0]) + yminf;\n"
+ " float v = dot(pixel.rgb, rgb_to_y_vector) + yminf;\n"
" if(v < min)\n"
" pixel = low_color;\n"
" else if(v < max)\n"
(float)config.high_color.g / 0xff,
(float)config.high_color.b / 0xff,
has_alpha ? (float)config.high_color.a / 0xff : 1.0);
- BC_GL_RGB_TO_YUV(shader);
+ BC_GL_RGB_TO_Y(shader);
}
}