|
Blender V4.3
|
#include <cmath>#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 "BLI_sys_types.h"Go to the source code of this file.
Classes | |
| struct | ScaleDownX |
| struct | ScaleDownY |
| struct | ScaleUpX |
| struct | ScaleUpY |
Typedefs | |
| using | ScaleFunction |
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) |
| using ScaleFunction |
Definition at line 650 of file scaling.cc.
|
static |
Definition at line 342 of file scaling.cc.
References ImBuf::byte_buffer, ImBuf::channels, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, MEM_freeN(), and MEM_mallocN.
Referenced by scale_with_function().
Definition at line 88 of file scaling.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::flags, ImBuf::float_buffer, IMB_allocImBuf(), IMB_dupImBuf(), imb_half_x_no_alloc(), ImBuf::planes, ImBuf::x, and ImBuf::y.
Referenced by IMB_onehalf().
Definition at line 29 of file scaling.cc.
References b, ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, ImBuf::x, x, ImBuf::y, and y.
Referenced by IMB_half_x(), and imb_onehalf_no_alloc().
Definition at line 180 of file scaling.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::flags, ImBuf::float_buffer, IMB_allocImBuf(), IMB_dupImBuf(), imb_half_y_no_alloc(), ImBuf::planes, ImBuf::x, and ImBuf::y.
Referenced by IMB_onehalf().
Definition at line 113 of file scaling.cc.
References b, ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, ImBuf::x, x, ImBuf::y, and y.
Referenced by IMB_half_y(), and imb_onehalf_no_alloc().
Definition at line 314 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_no_alloc(), ImBuf::planes, ImBuf::x, and ImBuf::y.
Referenced by IMB_makemipmap().
Result in ibuf2, scaling should be done correctly.
Definition at line 236 of file scaling.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, imb_addrectImBuf(), imb_half_x_no_alloc(), imb_half_y_no_alloc(), premul_ushort_to_straight_uchar(), straight_uchar_to_premul_ushort(), ImBuf::x, x, ImBuf::y, and y.
Referenced by IMB_onehalf(), 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 779 of file scaling.cc.
References Bilinear, BLI_assert_msg, BLI_assert_unreachable, Box, 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_copy_rect(), icon_verify_datatoc(), image_scale_exec(), imb_gpu_get_data(), 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_squeeze_rect(), imb_stereo3d_squeeze_rectf(), imb_stereo3d_unsqueeze_ImBuf(), Freestyle::Canvas::loadMap(), movieclip_build_proxy_ibuf(), 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(), seq_proxy_build_frame(), thumb_create_ex(), ui_draw_but_IMAGE(), ui_tooltip_from_clip(), update_do_scale(), and wm_block_splash_image().
Definition at line 679 of file scaling.cc.
References scale_down_x_func(), scale_down_y_func(), scale_up_x_func(), scale_up_y_func(), scale_with_function(), ImBuf::x, and ImBuf::y.
Referenced by IMB_scale().
|
static |
Definition at line 591 of file scaling.cc.
References ImBuf::byte_buffer, ImBuf::channels, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, ImBuf::x, and ImBuf::y.
Referenced by scale_down_x_func(), scale_down_y_func(), scale_up_x_func(), and scale_up_y_func().
|
inlinestatic |
Definition at line 370 of file scaling.cc.
References ptr.
|
inlinestatic |
Definition at line 374 of file scaling.cc.
References ptr.
|
inlinestatic |
Definition at line 378 of file scaling.cc.
References ptr.
|
inlinestatic |
Definition at line 382 of file scaling.cc.
References ptr.
|
inlinestatic |
Definition at line 366 of file scaling.cc.
References ptr.
Referenced by ScaleDownX::op(), ScaleDownY::op(), ScaleUpX::op(), and ScaleUpY::op().
Definition at line 218 of file scaling.cc.
References unit_ushort_to_uchar.
Referenced by imb_onehalf_no_alloc().
|
static |
Definition at line 750 of file scaling.cc.
References ImBuf::channels, ImBufFloatBuffer::data, float, ImBuf::float_buffer, blender::math::interpolate_bilinear_fl(), v, ImBuf::x, x, and ImBuf::y.
Referenced by IMB_scale().
|
static |
Definition at line 622 of file scaling.cc.
References instantiate_pixel_op().
Referenced by imb_scale_box().
|
static |
Definition at line 629 of file scaling.cc.
References instantiate_pixel_op().
Referenced by imb_scale_box().
|
static |
Definition at line 696 of file scaling.cc.
References blender::IndexRange::first(), and UNUSED_VARS.
Referenced by scale_nearest_func().
|
static |
Definition at line 717 of file scaling.cc.
References ImBuf::byte_buffer, ImBuf::channels, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, scale_nearest(), ImBuf::x, and ImBuf::y.
Referenced by IMB_scale().
|
static |
Definition at line 636 of file scaling.cc.
References instantiate_pixel_op().
Referenced by imb_scale_box().
|
static |
Definition at line 643 of file scaling.cc.
References instantiate_pixel_op().
Referenced by imb_scale_box().
|
static |
Definition at line 653 of file scaling.cc.
References alloc_scale_dst_buffers(), IB_TAKE_OWNERSHIP, IMB_assign_byte_buffer(), IMB_assign_float_buffer(), imb_freerectfloatImBuf(), imb_freerectImBuf(), ImBuf::x, and ImBuf::y.
Referenced by IMB_scale(), and imb_scale_box().
|
inlinestatic |
Definition at line 390 of file scaling.cc.
References ptr.
|
inlinestatic |
Definition at line 394 of file scaling.cc.
References ptr.
|
inlinestatic |
Definition at line 398 of file scaling.cc.
References ptr.
|
inlinestatic |
Definition at line 402 of file scaling.cc.
References ptr.
|
inlinestatic |
Definition at line 386 of file scaling.cc.
References ptr, and blender::math::round().
Referenced by ScaleDownX::op(), ScaleDownY::op(), ScaleUpX::op(), and ScaleUpY::op().
Definition at line 208 of file scaling.cc.
Referenced by imb_onehalf_no_alloc().