- dcraw_lock.lock("dcraw_run");
- memset(dcraw_info, 0, sizeof(dcraw_info));
- memset(dcraw_matrix, 0, sizeof(dcraw_matrix));
- dcraw_data = !frame ? 0 : (float**) frame->get_rows();
- dcraw_alpha = !frame ? 0 :
- frame->get_color_model() == BC_RGBA_FLOAT ? 1 : 0;
- int result = dcraw_main(argc, argv);
- if( !result && file )
- file->format_to_asset(dcraw_info);
- if( !result && frame ) {
+ DCRaw dcraw;
+ if( frame ) {
+ dcraw.data = (float**) frame->get_rows();
+ dcraw.alpha = frame->get_color_model() == BC_RGBA_FLOAT ? 1 : 0;
+ }
+ int result = dcraw.main(argc, argv);
+ if( file )
+ file->format_to_asset(dcraw.info);
+ if( frame ) {