Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/image_format.cc
| Show First 20 Lines • Show All 195 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| switch (imtype) { | switch (imtype) { | ||||
| case R_IMF_IMTYPE_AVIRAW: | case R_IMF_IMTYPE_AVIRAW: | ||||
| case R_IMF_IMTYPE_AVIJPEG: | case R_IMF_IMTYPE_AVIJPEG: | ||||
| case R_IMF_IMTYPE_FFMPEG: | case R_IMF_IMTYPE_FFMPEG: | ||||
| case R_IMF_IMTYPE_H264: | case R_IMF_IMTYPE_H264: | ||||
| case R_IMF_IMTYPE_THEORA: | case R_IMF_IMTYPE_THEORA: | ||||
| case R_IMF_IMTYPE_XVID: | case R_IMF_IMTYPE_XVID: | ||||
| case R_IMF_IMTYPE_AV1: | |||||
| return true; | return true; | ||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| bool BKE_imtype_supports_zbuf(const char imtype) | bool BKE_imtype_supports_zbuf(const char imtype) | ||||
| { | { | ||||
| switch (imtype) { | switch (imtype) { | ||||
| ▲ Show 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | else if (imtype == R_IMF_IMTYPE_RADHDR) { | ||||
| } | } | ||||
| } | } | ||||
| #endif | #endif | ||||
| else if (ELEM(imtype, | else if (ELEM(imtype, | ||||
| R_IMF_IMTYPE_PNG, | R_IMF_IMTYPE_PNG, | ||||
| R_IMF_IMTYPE_FFMPEG, | R_IMF_IMTYPE_FFMPEG, | ||||
| R_IMF_IMTYPE_H264, | R_IMF_IMTYPE_H264, | ||||
| R_IMF_IMTYPE_THEORA, | R_IMF_IMTYPE_THEORA, | ||||
| R_IMF_IMTYPE_XVID)) { | R_IMF_IMTYPE_XVID, | ||||
| R_IMF_IMTYPE_AV1)) { | |||||
| if (!BLI_path_extension_check(string, extension_test = ".png")) { | if (!BLI_path_extension_check(string, extension_test = ".png")) { | ||||
| extension = extension_test; | extension = extension_test; | ||||
| } | } | ||||
| } | } | ||||
| #ifdef WITH_DDS | #ifdef WITH_DDS | ||||
| else if (imtype == R_IMF_IMTYPE_DDS) { | else if (imtype == R_IMF_IMTYPE_DDS) { | ||||
| if (!BLI_path_extension_check(string, extension_test = ".dds")) { | if (!BLI_path_extension_check(string, extension_test = ".dds")) { | ||||
| extension = extension_test; | extension = extension_test; | ||||
| ▲ Show 20 Lines • Show All 177 Lines • ▼ Show 20 Lines | else if (imtype == R_IMF_IMTYPE_RADHDR) { | ||||
| ibuf->ftype = IMB_FTYPE_RADHDR; | ibuf->ftype = IMB_FTYPE_RADHDR; | ||||
| } | } | ||||
| #endif | #endif | ||||
| else if (ELEM(imtype, | else if (ELEM(imtype, | ||||
| R_IMF_IMTYPE_PNG, | R_IMF_IMTYPE_PNG, | ||||
| R_IMF_IMTYPE_FFMPEG, | R_IMF_IMTYPE_FFMPEG, | ||||
| R_IMF_IMTYPE_H264, | R_IMF_IMTYPE_H264, | ||||
| R_IMF_IMTYPE_THEORA, | R_IMF_IMTYPE_THEORA, | ||||
| R_IMF_IMTYPE_XVID)) { | R_IMF_IMTYPE_XVID, | ||||
| R_IMF_IMTYPE_AV1)) { | |||||
| ibuf->ftype = IMB_FTYPE_PNG; | ibuf->ftype = IMB_FTYPE_PNG; | ||||
| if (imtype == R_IMF_IMTYPE_PNG) { | if (imtype == R_IMF_IMTYPE_PNG) { | ||||
| if (imf->depth == R_IMF_CHAN_DEPTH_16) { | if (imf->depth == R_IMF_CHAN_DEPTH_16) { | ||||
| ibuf->foptions.flag |= PNG_16BIT; | ibuf->foptions.flag |= PNG_16BIT; | ||||
| } | } | ||||
| ibuf->foptions.quality = compress; | ibuf->foptions.quality = compress; | ||||
| ▲ Show 20 Lines • Show All 334 Lines • Show Last 20 Lines | |||||