|
Blender V4.5
|
#include "BLI_math_vector.hh"#include "BLI_task.hh"#include "BLI_utildefines.h"#include "MEM_guardedalloc.h"#include "IMB_filter.hh"#include "IMB_imbuf.hh"#include "IMB_imbuf_types.hh"#include "IMB_interp.hh"#include "IMB_metadata.hh"#include "BLI_sys_types.h"Go to the source code of this file.
Classes | |
| struct | ScaleDownX |
| struct | ScaleDownY |
| struct | ScaleUpX |
| struct | ScaleUpY |
Typedefs | |
| using | ScaleFunction |
| using | float2 |
| using | float3 |
| using | float4 |
| using | uchar4 |
Functions | |
| static void | imb_half_x_no_alloc (ImBuf *ibuf2, ImBuf *ibuf1) |
| ImBuf * | IMB_half_x (ImBuf *ibuf1) |
| static void | imb_half_y_no_alloc (ImBuf *ibuf2, ImBuf *ibuf1) |
| ImBuf * | IMB_half_y (ImBuf *ibuf1) |
| MINLINE void | straight_uchar_to_premul_ushort (ushort result[4], const uchar color[4]) |
| MINLINE void | premul_ushort_to_straight_uchar (uchar *result, const ushort color[4]) |
| void | imb_onehalf_no_alloc (ImBuf *ibuf2, ImBuf *ibuf1) |
| ImBuf * | IMB_onehalf (ImBuf *ibuf1) |
| static void | alloc_scale_dst_buffers (const ImBuf *ibuf, uint newx, uint newy, uchar4 **r_dst_byte, float **r_dst_float) |
| static float4 | load_pixel (const uchar4 *ptr) |
| static float4 | load_pixel (const float *ptr) |
| static float4 | load_pixel (const float2 *ptr) |
| static float4 | load_pixel (const float3 *ptr) |
| static float4 | load_pixel (const float4 *ptr) |
| static void | store_pixel (float4 pix, uchar4 *ptr) |
| static void | store_pixel (float4 pix, float *ptr) |
| static void | store_pixel (float4 pix, float2 *ptr) |
| static void | store_pixel (float4 pix, float3 *ptr) |
| static void | store_pixel (float4 pix, float4 *ptr) |
| template<typename T> | |
| static void | instantiate_pixel_op (T &, const ImBuf *ibuf, int newx, int newy, uchar4 *dst_byte, float *dst_float, bool threaded) |
| static void | scale_down_x_func (const ImBuf *ibuf, int newx, int newy, uchar4 *dst_byte, float *dst_float, bool threaded) |
| static void | scale_down_y_func (const ImBuf *ibuf, int newx, int newy, uchar4 *dst_byte, float *dst_float, bool threaded) |
| static void | scale_up_x_func (const ImBuf *ibuf, int newx, int newy, uchar4 *dst_byte, float *dst_float, bool threaded) |
| static void | scale_up_y_func (const ImBuf *ibuf, int newx, int newy, uchar4 *dst_byte, float *dst_float, bool threaded) |
| static void | scale_with_function (ImBuf *ibuf, int newx, int newy, ScaleFunction func, bool threaded) |
| static void | imb_scale_box (ImBuf *ibuf, uint newx, uint newy, bool threaded) |
| template<typename T> | |
| static void | scale_nearest (const T *src, T *dst, int ibufx, int ibufy, int newx, int newy, blender::IndexRange y_range) |
| static void | scale_nearest_func (const ImBuf *ibuf, int newx, int newy, uchar4 *dst_byte, float *dst_float, bool threaded) |
| static void | scale_bilinear_func (const ImBuf *ibuf, int newx, int newy, uchar4 *dst_byte, float *dst_float, bool threaded) |
| bool | IMB_scale (ImBuf *ibuf, uint newx, uint newy, IMBScaleFilter filter, bool threaded) |
| ImBuf * | IMB_scale_into_new (const ImBuf *ibuf, uint newx, uint newy, IMBScaleFilter filter, bool threaded) |
| using blender::float2 |
Definition at line 618 of file BLI_math_vector_types.hh.
| using blender::float3 |
Definition at line 619 of file BLI_math_vector_types.hh.
| using blender::float4 |
Definition at line 620 of file BLI_math_vector_types.hh.
| using ScaleFunction |
Definition at line 648 of file scaling.cc.
| using blender::uchar4 |
Definition at line 599 of file BLI_math_vector_types.hh.
|
static |
Definition at line 341 of file scaling.cc.
References alloc_scale_dst_buffers(), ImBuf::byte_buffer, ImBuf::channels, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, MEM_freeN(), and MEM_malloc_arrayN().
Referenced by alloc_scale_dst_buffers(), IMB_scale_into_new(), and scale_with_function().
Definition at line 87 of file scaling.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::flags, ImBuf::float_buffer, IMB_allocImBuf(), IMB_dupImBuf(), IMB_half_x(), imb_half_x_no_alloc(), ImBuf::planes, ImBuf::x, and ImBuf::y.
Referenced by IMB_half_x(), and IMB_onehalf().
Definition at line 28 of file scaling.cc.
References b, ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, imb_half_x_no_alloc(), ImBuf::x, x, ImBuf::y, and y.
Referenced by IMB_half_x(), imb_half_x_no_alloc(), and imb_onehalf_no_alloc().
Definition at line 179 of file scaling.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::flags, ImBuf::float_buffer, IMB_allocImBuf(), IMB_dupImBuf(), IMB_half_y(), imb_half_y_no_alloc(), ImBuf::planes, ImBuf::x, and ImBuf::y.
Referenced by IMB_half_y(), and IMB_onehalf().
Definition at line 112 of file scaling.cc.
References b, ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, imb_half_y_no_alloc(), ImBuf::x, x, ImBuf::y, and y.
Referenced by IMB_half_y(), imb_half_y_no_alloc(), and imb_onehalf_no_alloc().
Definition at line 313 of file scaling.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::flags, ImBuf::float_buffer, IMB_allocImBuf(), IMB_half_x(), IMB_half_y(), IMB_onehalf(), imb_onehalf_no_alloc(), ImBuf::planes, ImBuf::x, and ImBuf::y.
Referenced by IMB_makemipmap(), and IMB_onehalf().
Result in ibuf2, scaling should be done correctly.
Definition at line 235 of file scaling.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, IMB_alloc_byte_pixels(), imb_half_x_no_alloc(), imb_half_y_no_alloc(), imb_onehalf_no_alloc(), premul_ushort_to_straight_uchar(), straight_uchar_to_premul_ushort(), ImBuf::x, x, ImBuf::y, and y.
Referenced by IMB_onehalf(), imb_onehalf_no_alloc(), and IMB_remakemipmap().
| bool IMB_scale | ( | ImBuf * | ibuf, |
| unsigned int | newx, | ||
| unsigned int | newy, | ||
| IMBScaleFilter | filter, | ||
| bool | threaded = true ) |
Scale/resize image to new dimensions. Return true if ibuf is modified.
Definition at line 777 of file scaling.cc.
References Bilinear, BLI_assert_msg, Box, filter, IMB_scale(), imb_scale_box(), Nearest, scale_bilinear_func(), scale_nearest_func(), scale_with_function(), ImBuf::x, and ImBuf::y.
Referenced by accessor_get_ibuf(), BKE_icon_geom_rasterize(), BKE_image_preview(), BKE_image_scale(), BKE_previewimg_ensure(), blend_file_thumb_from_camera(), blend_file_thumb_from_screenshot(), get_undistorted_ibuf(), icon_verify_datatoc(), image_scale_exec(), imb_gpu_get_data(), IMB_scale(), imb_scale_bilinear(), imb_scale_bilinear_st(), imb_scale_box(), imb_scale_box_st(), imb_scale_nearest(), imb_scale_nearest_st(), imb_stereo3d_squeeze_ImBuf(), imb_stereo3d_unsqueeze_ImBuf(), Freestyle::Canvas::loadMap(), py_imbuf_resize(), blender::imbuf::tests::scale_2x_smaller(), blender::imbuf::tests::scale_fractional_larger(), blender::imbuf::tests::scale_to_1x1(), blender::seq::scale_to_thumbnail_size(), thumb_create_ex(), ui_draw_but_IMAGE(), ui_tooltip_from_clip(), update_do_scale(), wm_block_splash_banner_image(), and wm_block_splash_image().
Definition at line 677 of file scaling.cc.
References imb_scale_box(), scale_down_x_func(), scale_down_y_func(), scale_up_x_func(), scale_up_y_func(), scale_with_function(), ImBuf::x, x, ImBuf::y, and y.
Referenced by IMB_scale(), and imb_scale_box().
| ImBuf * IMB_scale_into_new | ( | const ImBuf * | ibuf, |
| unsigned int | newx, | ||
| unsigned int | newy, | ||
| IMBScaleFilter | filter, | ||
| bool | threaded = true ) |
Scale/resize image to new dimensions, into a newly created result image. Metadata of input image (if any) is copied into the result image.
Definition at line 801 of file scaling.cc.
References alloc_scale_dst_buffers(), Bilinear, BLI_assert_msg, Box, ImBuf::byte_buffer, ImBuf::channels, ImBuf::colormanage_flag, ImBufByteBuffer::colorspace, ImBufFloatBuffer::colorspace, filter, ImBuf::float_buffer, IB_DO_NOT_TAKE_OWNERSHIP, IB_TAKE_OWNERSHIP, IB_uninitialized_pixels, IMB_allocImBuf(), IMB_assign_byte_buffer(), IMB_assign_float_buffer(), IMB_dupImBuf(), IMB_initImBuf(), IMB_metadata_copy(), IMB_scale_into_new(), MEM_freeN(), Nearest, ImBuf::planes, scale_bilinear_func(), scale_down_x_func(), scale_down_y_func(), scale_nearest_func(), scale_up_x_func(), scale_up_y_func(), ImBuf::x, x, ImBuf::y, and y.
Referenced by blender::ed::asset::generate_previewimg_from_buffer(), icon_copy_rect(), IMB_scale_into_new(), movieclip_build_proxy_ibuf(), and blender::seq::seq_proxy_build_frame().
|
static |
Definition at line 589 of file scaling.cc.
References ImBuf::byte_buffer, ImBuf::channels, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, instantiate_pixel_op(), T, ImBuf::x, and ImBuf::y.
Referenced by instantiate_pixel_op(), scale_down_x_func(), scale_down_y_func(), scale_up_x_func(), and scale_up_y_func().
|
inlinestatic |
Definition at line 368 of file scaling.cc.
References load_pixel().
Definition at line 372 of file scaling.cc.
References load_pixel().
Definition at line 376 of file scaling.cc.
References load_pixel().
Definition at line 380 of file scaling.cc.
References load_pixel().
Definition at line 364 of file scaling.cc.
References load_pixel().
Referenced by load_pixel(), load_pixel(), load_pixel(), load_pixel(), load_pixel(), ScaleDownX::op(), ScaleDownY::op(), ScaleUpX::op(), and ScaleUpY::op().
Definition at line 217 of file scaling.cc.
References MINLINE, premul_ushort_to_straight_uchar(), result, and unit_ushort_to_uchar().
Referenced by imb_onehalf_no_alloc(), and premul_ushort_to_straight_uchar().
|
static |
Definition at line 748 of file scaling.cc.
References ImBuf::channels, ImBufFloatBuffer::data, ImBuf::float_buffer, IndexRange::IndexRange(), blender::imbuf::interpolate_bilinear_byte(), blender::math::interpolate_bilinear_fl(), blender::threading::parallel_for(), scale_bilinear_func(), v, ImBuf::x, x, ImBuf::y, and y.
Referenced by IMB_scale(), IMB_scale_into_new(), and scale_bilinear_func().
|
static |
Definition at line 620 of file scaling.cc.
References instantiate_pixel_op(), and scale_down_x_func().
Referenced by imb_scale_box(), IMB_scale_into_new(), and scale_down_x_func().
|
static |
Definition at line 627 of file scaling.cc.
References instantiate_pixel_op(), and scale_down_y_func().
Referenced by imb_scale_box(), IMB_scale_into_new(), and scale_down_y_func().
|
static |
Definition at line 694 of file scaling.cc.
References blender::IndexRange::first(), scale_nearest(), T, UNUSED_VARS, x, and y.
Referenced by scale_nearest(), and scale_nearest_func().
|
static |
Definition at line 715 of file scaling.cc.
References ImBuf::byte_buffer, ImBuf::channels, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, IndexRange::IndexRange(), blender::threading::parallel_for(), scale_nearest(), scale_nearest_func(), ImBuf::x, and ImBuf::y.
Referenced by IMB_scale(), IMB_scale_into_new(), and scale_nearest_func().
|
static |
Definition at line 634 of file scaling.cc.
References instantiate_pixel_op(), and scale_up_x_func().
Referenced by imb_scale_box(), IMB_scale_into_new(), and scale_up_x_func().
|
static |
Definition at line 641 of file scaling.cc.
References instantiate_pixel_op(), and scale_up_y_func().
Referenced by imb_scale_box(), IMB_scale_into_new(), and scale_up_y_func().
|
static |
Definition at line 651 of file scaling.cc.
References alloc_scale_dst_buffers(), IB_TAKE_OWNERSHIP, IMB_assign_byte_buffer(), IMB_assign_float_buffer(), IMB_free_byte_pixels(), IMB_free_float_pixels(), scale_with_function(), ImBuf::x, and ImBuf::y.
Referenced by IMB_scale(), imb_scale_box(), and scale_with_function().
|
inlinestatic |
Definition at line 388 of file scaling.cc.
References store_pixel().
Definition at line 392 of file scaling.cc.
References store_pixel().
Definition at line 396 of file scaling.cc.
References store_pixel().
Definition at line 400 of file scaling.cc.
References store_pixel().
Definition at line 384 of file scaling.cc.
References blender::math::round(), and store_pixel().
Referenced by ScaleDownX::op(), ScaleDownY::op(), ScaleUpX::op(), ScaleUpY::op(), store_pixel(), store_pixel(), store_pixel(), store_pixel(), and store_pixel().
Definition at line 207 of file scaling.cc.
References MINLINE, result, and straight_uchar_to_premul_ushort().
Referenced by imb_onehalf_no_alloc(), and straight_uchar_to_premul_ushort().