Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-22 04:06:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-22 04:06:54 +0400
commit6d6f1b0b4d32d3396be813cdba82830a9c95295a (patch)
tree78813cb6889c315286cd7de2443da02487021843
parent8992ed9cdd17b641801e14615800e0e3b5e7f464 (diff)
display quality for avijpeg, name BKE_imtype functions more sensibly
-rw-r--r--source/blender/blenkernel/BKE_image.h10
-rw-r--r--source/blender/blenkernel/intern/image.c11
-rw-r--r--source/blender/editors/space_image/image_buttons.c8
-rw-r--r--source/blender/editors/space_image/image_ops.c2
-rw-r--r--source/blender/makesdna/DNA_scene_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_scene.c8
-rw-r--r--source/blender/render/intern/source/pipeline.c2
7 files changed, 22 insertions, 21 deletions
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index dae0821b27a..7233f9570f9 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -59,11 +59,11 @@ char BKE_ftype_to_imtype(const int ftype);
int BKE_imtype_to_ftype(char imtype);
int BKE_imtype_is_movie(const char imtype);
-int BKE_imtype_is_alpha_ok(const char imtype);
-int BKE_imtype_is_zbuf_ok(const char imtype);
-int BKE_imtype_is_compression_ok(const char imtype);
-int BKE_imtype_is_quality_ok(const char imtype);
-char BKE_imtype_is_depth_ok(const char imtype);
+int BKE_imtype_supports_alpha(const char imtype);
+int BKE_imtype_supports_zbuf(const char imtype);
+int BKE_imtype_supports_compress(const char imtype);
+int BKE_imtype_supports_quality(const char imtype);
+char BKE_imtype_valid_depths(const char imtype);
struct anim *openanim(const char *name, int flags, int streamindex);
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 0d84385fad0..c98c973789d 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -900,7 +900,7 @@ int BKE_imtype_is_movie(const char imtype)
return 0;
}
-int BKE_imtype_is_alpha_ok(const char imtype)
+int BKE_imtype_supports_alpha(const char imtype)
{
switch(imtype) {
case R_TARGA:
@@ -918,7 +918,7 @@ int BKE_imtype_is_alpha_ok(const char imtype)
return 0;
}
-int BKE_imtype_is_zbuf_ok(const char imtype)
+int BKE_imtype_supports_zbuf(const char imtype)
{
switch(imtype) {
case R_IRIZ:
@@ -928,7 +928,7 @@ int BKE_imtype_is_zbuf_ok(const char imtype)
return 0;
}
-int BKE_imtype_is_compression_ok(const char imtype)
+int BKE_imtype_supports_compress(const char imtype)
{
switch(imtype) {
case R_PNG:
@@ -937,17 +937,18 @@ int BKE_imtype_is_compression_ok(const char imtype)
return 0;
}
-int BKE_imtype_is_quality_ok(const char imtype)
+int BKE_imtype_supports_quality(const char imtype)
{
switch(imtype) {
case R_JPEG90:
case R_JP2:
+ case R_AVIJPEG:
return 1;
}
return 0;
}
-char BKE_imtype_is_depth_ok(const char imtype)
+char BKE_imtype_valid_depths(const char imtype)
{
switch (imtype) {
case R_RADHDR:
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 54ee92a4413..892ab9daf25 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -821,7 +821,7 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr)
{
ImageFormatData *imf= imfptr->data;
ID *id= imfptr->id.data;
- const int depth_ok= BKE_imtype_is_depth_ok(imf->imtype);
+ const int depth_ok= BKE_imtype_valid_depths(imf->imtype);
/* some settings depend on this being a scene thats rendered */
const short is_render_out= (id && GS(id->name) == ID_SCE);
@@ -847,15 +847,15 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr)
uiItemR(row, imfptr, "color_depth", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
}
- if (BKE_imtype_is_quality_ok(imf->imtype)) {
+ if (BKE_imtype_supports_quality(imf->imtype)) {
uiItemR(col, imfptr, "quality", 0, NULL, ICON_NONE);
}
- if (BKE_imtype_is_compression_ok(imf->imtype)) {
+ if (BKE_imtype_supports_compress(imf->imtype)) {
uiItemR(col, imfptr, "compression", 0, NULL, ICON_NONE);
}
- if (BKE_imtype_is_zbuf_ok(imf->imtype)) {
+ if (BKE_imtype_supports_zbuf(imf->imtype)) {
uiItemR(col, imfptr, "use_zbuffer", 0, NULL, ICON_NONE);
}
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 811233cefa5..6d9fd661125 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -926,7 +926,7 @@ static void save_image_options_defaults(SaveImageOptions *simopts)
static char imtype_best_depth(ImBuf *ibuf, const char imtype)
{
- const char depth_ok= BKE_imtype_is_depth_ok(imtype);
+ const char depth_ok= BKE_imtype_valid_depths(imtype);
if (ibuf->rect_float) {
if (depth_ok & R_IMF_CHAN_DEPTH_32) return R_IMF_CHAN_DEPTH_32;
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 9df8fc5c5d8..15e7c82d60f 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -254,7 +254,7 @@ typedef struct ImageFormatData {
/* ImageFormatData.cineon_flag */
#define R_IMF_CINEON_FLAG_LOG (1<<0) /* was R_CINEON_LOG */
-/* return values from BKE_imtype_is_depth_ok, note this is depts per channel */
+/* return values from BKE_imtype_valid_depths, note this is depts per channel */
#define R_IMF_CHAN_DEPTH_1 (1<<0) /* 1bits (unused) */
#define R_IMF_CHAN_DEPTH_8 (1<<1) /* 8bits (default) */
#define R_IMF_CHAN_DEPTH_12 (1<<2) /* 12bits (uncommon, jp2 supports) */
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 8f6545a2f9f..4b3ef62e06e 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -615,13 +615,13 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
imf->imtype= value;
/* ensure depth and color settings match */
- if (!BKE_imtype_is_alpha_ok(imf->imtype)) {
+ if (!BKE_imtype_supports_alpha(imf->imtype)) {
imf->planes= R_IMF_PLANES_RGB;
}
/* ensure usable depth */
{
- const int depth_ok= BKE_imtype_is_depth_ok(imf->imtype);
+ const int depth_ok= BKE_imtype_valid_depths(imf->imtype);
if ((imf->depth & depth_ok) == 0) {
/* set first available depth */
char depth_ls[]= {R_IMF_CHAN_DEPTH_32,
@@ -672,7 +672,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext *C, P
{
ImageFormatData *imf= (ImageFormatData *)ptr->data;
- if ((imf == NULL) || BKE_imtype_is_alpha_ok(imf->imtype)) {
+ if ((imf == NULL) || BKE_imtype_supports_alpha(imf->imtype)) {
return image_color_mode_items;
}
else {
@@ -693,7 +693,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *C,
return image_color_depth_items;
}
else {
- const int depth_ok= BKE_imtype_is_depth_ok(imf->imtype);
+ const int depth_ok= BKE_imtype_valid_depths(imf->imtype);
const int is_float= ELEM3(imf->imtype, R_RADHDR, R_OPENEXR, R_MULTILAYER);
EnumPropertyItem *item_8bit= &image_color_depth_items[0];
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 92bab9a7fbf..befe48fd57f 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -3030,7 +3030,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
/* sequence editor can generate 8bpc render buffers */
if (ibuf->rect) {
ibuf->profile = IB_PROFILE_SRGB;
- if (BKE_imtype_is_depth_ok(scene->r.im_format.imtype) & (R_IMF_CHAN_DEPTH_12|R_IMF_CHAN_DEPTH_16|R_IMF_CHAN_DEPTH_24|R_IMF_CHAN_DEPTH_32))
+ if (BKE_imtype_valid_depths(scene->r.im_format.imtype) & (R_IMF_CHAN_DEPTH_12|R_IMF_CHAN_DEPTH_16|R_IMF_CHAN_DEPTH_24|R_IMF_CHAN_DEPTH_32))
IMB_float_from_rect(ibuf);
} else {
ibuf->profile = IB_PROFILE_LINEAR_RGB;