[gimp] file-jpeg: Rename misnamed macros
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] file-jpeg: Rename misnamed macros
- Date: Fri, 10 Jun 2011 18:14:23 +0000 (UTC)
commit 0a20d9bdbdf3e65e684e72ee6731e0f6ce5ed2c0
Author: Mukund Sivaraman <muks banu com>
Date: Fri Jun 10 23:40:23 2011 +0530
file-jpeg: Rename misnamed macros
plug-ins/file-jpeg/jpeg-save.c | 30 +++++++++++++++---------------
plug-ins/file-jpeg/jpeg-settings.c | 8 ++++----
plug-ins/file-jpeg/jpeg.c | 6 +++---
plug-ins/file-jpeg/jpeg.h | 8 ++++----
4 files changed, 26 insertions(+), 26 deletions(-)
---
diff --git a/plug-ins/file-jpeg/jpeg-save.c b/plug-ins/file-jpeg/jpeg-save.c
index ef8ad4a..5c18e83 100644
--- a/plug-ins/file-jpeg/jpeg-save.c
+++ b/plug-ins/file-jpeg/jpeg-save.c
@@ -58,7 +58,7 @@
#define DEFAULT_OPTIMIZE TRUE
#define DEFAULT_PROGRESSIVE TRUE
#define DEFAULT_BASELINE TRUE
-#define DEFAULT_SUBSMP JPEG_SUPSAMPLING_1x1_1x1_1x1
+#define DEFAULT_SUBSMP JPEG_SUBSAMPLING_1x1_1x1_1x1
#define DEFAULT_RESTART 0
#define DEFAULT_RESTART_MCU_ROWS 16
#define DEFAULT_DCT 0
@@ -400,11 +400,11 @@ save_image (const gchar *filename,
cinfo.optimize_coding = jsvals.optimize;
subsampling = (gimp_drawable_is_rgb (drawable_ID) ?
- jsvals.subsmp : JPEG_SUPSAMPLING_1x1_1x1_1x1);
+ jsvals.subsmp : JPEG_SUBSAMPLING_1x1_1x1_1x1);
/* smoothing is not supported with nonstandard sampling ratios */
- if (subsampling != JPEG_SUPSAMPLING_2x1_1x1_1x1 &&
- subsampling != JPEG_SUPSAMPLING_1x2_1x1_1x1)
+ if (subsampling != JPEG_SUBSAMPLING_2x1_1x1_1x1 &&
+ subsampling != JPEG_SUBSAMPLING_1x2_1x1_1x1)
{
cinfo.smoothing_factor = (gint) (jsvals.smoothing * 100);
}
@@ -416,7 +416,7 @@ save_image (const gchar *filename,
switch (subsampling)
{
- case JPEG_SUPSAMPLING_2x2_1x1_1x1:
+ case JPEG_SUBSAMPLING_2x2_1x1_1x1:
default:
cinfo.comp_info[0].h_samp_factor = 2;
cinfo.comp_info[0].v_samp_factor = 2;
@@ -426,7 +426,7 @@ save_image (const gchar *filename,
cinfo.comp_info[2].v_samp_factor = 1;
break;
- case JPEG_SUPSAMPLING_2x1_1x1_1x1:
+ case JPEG_SUBSAMPLING_2x1_1x1_1x1:
cinfo.comp_info[0].h_samp_factor = 2;
cinfo.comp_info[0].v_samp_factor = 1;
cinfo.comp_info[1].h_samp_factor = 1;
@@ -435,7 +435,7 @@ save_image (const gchar *filename,
cinfo.comp_info[2].v_samp_factor = 1;
break;
- case JPEG_SUPSAMPLING_1x1_1x1_1x1:
+ case JPEG_SUBSAMPLING_1x1_1x1_1x1:
cinfo.comp_info[0].h_samp_factor = 1;
cinfo.comp_info[0].v_samp_factor = 1;
cinfo.comp_info[1].h_samp_factor = 1;
@@ -444,7 +444,7 @@ save_image (const gchar *filename,
cinfo.comp_info[2].v_samp_factor = 1;
break;
- case JPEG_SUPSAMPLING_1x2_1x1_1x1:
+ case JPEG_SUBSAMPLING_1x2_1x1_1x1:
cinfo.comp_info[0].h_samp_factor = 1;
cinfo.comp_info[0].v_samp_factor = 2;
cinfo.comp_info[1].h_samp_factor = 1;
@@ -1087,13 +1087,13 @@ save_dialog (void)
pg.subsmp =
combo = gimp_int_combo_box_new (_("4:4:4 (best quality)"),
- JPEG_SUPSAMPLING_1x1_1x1_1x1,
+ JPEG_SUBSAMPLING_1x1_1x1_1x1,
_("4:2:2 horizontal (chroma halved)"),
- JPEG_SUPSAMPLING_2x1_1x1_1x1,
+ JPEG_SUBSAMPLING_2x1_1x1_1x1,
_("4:2:2 vertical (chroma halved)"),
- JPEG_SUPSAMPLING_1x2_1x1_1x1,
+ JPEG_SUBSAMPLING_1x2_1x1_1x1,
_("4:2:0 (chroma quartered)"),
- JPEG_SUPSAMPLING_2x2_1x1_1x1,
+ JPEG_SUBSAMPLING_2x2_1x1_1x1,
NULL);
gtk_table_attach (GTK_TABLE (table), combo, 3, 6, 2, 3,
GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
@@ -1115,7 +1115,7 @@ save_dialog (void)
else
{
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo),
- JPEG_SUPSAMPLING_1x1_1x1_1x1);
+ JPEG_SUBSAMPLING_1x1_1x1_1x1);
gtk_widget_set_sensitive (combo, FALSE);
}
@@ -1402,8 +1402,8 @@ subsampling_changed (GtkWidget *combo,
/* smoothing is not supported with nonstandard sampling ratios */
gimp_scale_entry_set_sensitive (entry,
- jsvals.subsmp != JPEG_SUPSAMPLING_2x1_1x1_1x1 &&
- jsvals.subsmp != JPEG_SUPSAMPLING_1x2_1x1_1x1);
+ jsvals.subsmp != JPEG_SUBSAMPLING_2x1_1x1_1x1 &&
+ jsvals.subsmp != JPEG_SUBSAMPLING_1x2_1x1_1x1);
make_preview ();
}
diff --git a/plug-ins/file-jpeg/jpeg-settings.c b/plug-ins/file-jpeg/jpeg-settings.c
index 2b87ed0..f96fd1f 100644
--- a/plug-ins/file-jpeg/jpeg-settings.c
+++ b/plug-ins/file-jpeg/jpeg-settings.c
@@ -224,13 +224,13 @@ jpeg_restore_original_settings (gint32 image_ID,
if (h[1] == 1 && v[1] == 1 && h[2] == 1 && v[2] == 1)
{
if (h[0] == 1 && v[0] == 1)
- *subsmp = JPEG_SUPSAMPLING_1x1_1x1_1x1;
+ *subsmp = JPEG_SUBSAMPLING_1x1_1x1_1x1;
else if (h[0] == 2 && v[0] == 1)
- *subsmp = JPEG_SUPSAMPLING_2x1_1x1_1x1;
+ *subsmp = JPEG_SUBSAMPLING_2x1_1x1_1x1;
else if (h[0] == 1 && v[0] == 2)
- *subsmp = JPEG_SUPSAMPLING_1x2_1x1_1x1;
+ *subsmp = JPEG_SUBSAMPLING_1x2_1x1_1x1;
else if (h[0] == 2 && v[0] == 2)
- *subsmp = JPEG_SUPSAMPLING_2x2_1x1_1x1;
+ *subsmp = JPEG_SUBSAMPLING_2x2_1x1_1x1;
}
}
diff --git a/plug-ins/file-jpeg/jpeg.c b/plug-ins/file-jpeg/jpeg.c
index e173217..1840aaf 100644
--- a/plug-ins/file-jpeg/jpeg.c
+++ b/plug-ins/file-jpeg/jpeg.c
@@ -212,7 +212,7 @@ run (const gchar *name,
has_metadata = FALSE;
orig_quality = 0;
- orig_subsmp = JPEG_SUPSAMPLING_2x2_1x1_1x1;
+ orig_subsmp = JPEG_SUBSAMPLING_2x2_1x1_1x1;
num_quant_tables = 0;
if (strcmp (name, LOAD_PROC) == 0)
@@ -440,9 +440,9 @@ run (const gchar *name,
jsvals.use_orig_quality = TRUE;
}
- if (orig_subsmp == JPEG_SUPSAMPLING_1x1_1x1_1x1 ||
+ if (orig_subsmp == JPEG_SUBSAMPLING_1x1_1x1_1x1 ||
((gint) orig_subsmp > 0 &&
- jsvals.subsmp == JPEG_SUPSAMPLING_1x1_1x1_1x1))
+ jsvals.subsmp == JPEG_SUBSAMPLING_1x1_1x1_1x1))
{
jsvals.subsmp = orig_subsmp;
}
diff --git a/plug-ins/file-jpeg/jpeg.h b/plug-ins/file-jpeg/jpeg.h
index c9f2ff5..3919e94 100644
--- a/plug-ins/file-jpeg/jpeg.h
+++ b/plug-ins/file-jpeg/jpeg.h
@@ -42,10 +42,10 @@ typedef struct my_error_mgr
typedef enum
{
- JPEG_SUPSAMPLING_2x2_1x1_1x1 = 0, /* smallest file */
- JPEG_SUPSAMPLING_2x1_1x1_1x1 = 1, /* 4:2:2 */
- JPEG_SUPSAMPLING_1x1_1x1_1x1 = 2,
- JPEG_SUPSAMPLING_1x2_1x1_1x1 = 3
+ JPEG_SUBSAMPLING_2x2_1x1_1x1 = 0, /* smallest file */
+ JPEG_SUBSAMPLING_2x1_1x1_1x1 = 1, /* 4:2:2 */
+ JPEG_SUBSAMPLING_1x1_1x1_1x1 = 2,
+ JPEG_SUBSAMPLING_1x2_1x1_1x1 = 3
} JpegSubsampling;
extern gint32 volatile preview_image_ID;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]