if( bits > max_bits ) max_bits = bits;
}
int imodel = pix_fmt_to_color_model(ifmt);
- if( imodel < 0 ) {
- int cmodel = frame->get_color_model();
- BC_CModels::is_yuv(cmodel) ?
+ int imodel_is_yuv = BC_CModels::is_yuv(imodel);
+ int cmodel = frame->get_color_model();
+ int cmodel_is_yuv = BC_CModels::is_yuv(cmodel);
+ if( imodel < 0 || imodel_is_yuv != cmodel_is_yuv ) {
+ imodel = cmodel_is_yuv ?
(BC_CModels::has_alpha(cmodel) ?
BC_AYUV16161616 :
(max_bits > 8 ? BC_AYUV16161616 : BC_YUV444P)) :
if( !convert_vframe_picture(frame, op) ) return 1;
// use indirect transfer
int cmodel = frame->get_color_model();
- int bits = BC_CModels::calculate_pixelsize(cmodel) * 8;
- bits /= BC_CModels::components(cmodel);
+ int max_bits = BC_CModels::calculate_pixelsize(cmodel) * 8;
+ max_bits /= BC_CModels::components(cmodel);
AVPixelFormat ofmt = (AVPixelFormat)op->format;
int imodel = pix_fmt_to_color_model(ofmt);
- if( imodel < 0 ) {
- imodel =
- BC_CModels::is_yuv(cmodel) ?
- (BC_CModels::has_alpha(cmodel) ?
+ int imodel_is_yuv = BC_CModels::is_yuv(imodel);
+ int cmodel_is_yuv = BC_CModels::is_yuv(cmodel);
+ if( imodel < 0 || imodel_is_yuv != cmodel_is_yuv ) {
+ imodel = cmodel_is_yuv ?
+ (BC_CModels::has_alpha(cmodel) ?
BC_AYUV16161616 :
- (bits > 8 ? BC_AYUV16161616 : BC_YUV444P)) :
+ (max_bits > 8 ? BC_AYUV16161616 : BC_YUV444P)) :
(BC_CModels::has_alpha(cmodel) ?
- (bits > 8 ? BC_RGBA16161616 : BC_RGBA8888) :
- (bits > 8 ? BC_RGB161616 : BC_RGB888)) ;
+ (max_bits > 8 ? BC_RGBA16161616 : BC_RGBA8888) :
+ (max_bits > 8 ? BC_RGB161616 : BC_RGB888)) ;
}
VFrame vframe(frame->get_w(), frame->get_h(), imodel);
vframe.transfer_from(frame);
int x, y, w, h;
BC_ListBoxItem *item = data[master_column].values[j];
- if(display_format == LISTBOX_ICONS)
- {
+ if( display_format == LISTBOX_ICONS ||
+ display_format == LISTBOX_ICON_LIST ) {
get_icon_mask(item, x, y, w, h);
if(y + h + yposition > highest) highest = y + h + yposition;
{
get_text_mask(item, x, y, w, h);
*result += h;
-
-
// Descend into sublist
if(item->get_sublist() &&
item->get_expand())
}
}
- if((display_format == LISTBOX_TEXT ||
- display_format == LISTBOX_ICON_LIST) &&
- top_level)
+ if( display_format == LISTBOX_TEXT && top_level )
{
highest = LISTBOX_MARGIN + *result;
}