coloreffects: added support for a visual magnifier color filter to be used in gnome...
authorDavid Biomech360 <ddes310@yahoo.com>
Mon, 19 Dec 2011 16:24:31 +0000 (11:24 -0500)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Fri, 6 Jan 2012 11:24:45 +0000 (11:24 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=666542

gst/coloreffects/gstcoloreffects.c
gst/coloreffects/gstcoloreffects.h

index 0941df1..35af8a2 100644 (file)
@@ -86,6 +86,7 @@ gst_color_effects_preset_get_type (void)
     {GST_COLOR_EFFECTS_PRESET_XRAY, "Invert and slightly shade to blue",
         "xray"},
     {GST_COLOR_EFFECTS_PRESET_XPRO, "Cross processing toning", "xpro"},
+    {GST_COLOR_EFFECTS_PRESET_YELLOWBLUE, "Yellow foreground Blue background color filter", "yellowblue"},
     {0, NULL, NULL},
   };
 
@@ -253,6 +254,38 @@ static const guint8 xpro_table[768] =
     "\376\365\377\377\365\377\377\366\377\377\366\377\377\366\377\377\367\377"
     "\377\367\377\377\367\377\377\370";
 
+/*Used for a video magnifer emulator in gnome-video-effects*/
+static const guint8 yellowblue_table[768] =
+  "\0\0\377\1\1\376\2\2\375\3\3\374\4\4\373\5\5\372\6\6\371\7\7\370\10\10\367"
+  "\11\11\367\12\12\365\13\13\364\14\14\363\15\14\362\16\16\361\17\17\360\20"
+  "\20\357\20\21\356\22\22\355\23\23\354\24\24\354\24\25\352\26\26\351\27\27"
+  "\350\27\30\347\31\31\346\32\32\345\33\32\344\34\34\343\34\34\342\36\36\341"
+  "\37\36\340\40\40\337!!\336!!\335##\334$#\334%%\332&%\331'&\330((\327()\326"
+  "*)\325++\324,,\323--\322..\321//\320/0\31711\31722\31522\31444\31445\313"
+  "55\31276\31188\30799\3069:\305;;\305<<\304==\302>>\301>>\300@@\300@A\276"
+  "AB\275BC\274CD\273DE\272EE\272FF\270HH\270HI\266IJ\265KK\264KL\263MM\262"
+  "NN\262NN\261OO\257QP\256RQ\256RR\254TT\253UU\253VU\251VW\250XX\247XY\246"
+  "YZ\245[[\245[[\243]]\243^^\242^_\240_`\237`a\236aa\235bb\235dc\233de\233"
+  "ff\232gf\231hg\230hi\227ji\226kj\225lk\223lm\223nm\222nn\221op\217qq\216"
+  "rr\215ss\214st\213uu\213uu\211wv\210ww\207xx\207yz\205z{\205{{\204||\203"
+  "}}\202\177~\201\177\200\177\200\201\177\202\202~\203\202|\204\203|\204\204"
+  "{\205\206z\207\206x\207\207w\211\210w\211\211v\212\212u\213\214s\214\214"
+  "r\215\215r\216\217q\217\217p\221\220o\221\222n\223\222l\224\223k\224\224"
+  "k\225\225j\226\226i\227\227h\230\231f\231\231f\233\232e\233\233c\234\234"
+  "c\235\235b\236\236a\237\237`\241\240_\242\241^\242\242]\243\244\\\244\244"
+  "[\245\245Y\246\246Y\250\247X\250\250W\251\251V\252\252T\253\253T\254\255"
+  "S\256\255R\257\256Q\257\260P\260\261O\261\261N\262\262M\263\263L\264\265"
+  "K\265\265J\266\266I\267\270H\270\270G\271\271F\272\272E\273\273C\274\274"
+  "B\275\275B\276\276A\277\277@\300\300?\301\301>\302\302=\303\303<\304\304"
+  ";\305\305:\306\3069\307\3078\310\3107\311\3116\312\3125\313\3134\314\314"
+  "3\315\3152\316\3161\317\3170\320\320/\321\321.\322\322-\323\323,\323\324"
+  "+\325\325*\326\326)\327\327(\330\330'\331\331&\332\331%\333\332$\334\334"
+  "#\334\335\"\336\336!\337\337\40\340\340\37\341\341\36\342\342\35\343\343"
+  "\34\344\344\33\345\345\32\345\346\31\347\347\30\350\350\27\351\351\26\352"
+  "\352\25\353\353\24\354\354\23\354\355\22\356\356\21\357\357\20\360\360\17"
+  "\361\361\16\362\362\15\363\362\14\364\364\13\365\365\12\365\366\11\367\367"
+  "\11\370\370\7\371\371\6\372\371\5\373\373\4\374\374\4\375\375\3\375\376\1";
+
 static const int cog_ycbcr_to_rgb_matrix_8bit_sdtv[] = {
   298, 0, 409, -57068,
   298, -100, -208, 34707,
@@ -543,6 +576,10 @@ gst_color_effects_set_property (GObject * object, guint prop_id,
           filter->table = xpro_table;
           filter->map_luma = FALSE;
           break;
+       case GST_COLOR_EFFECTS_PRESET_YELLOWBLUE:
+         filter->table = yellowblue_table;
+         filter->map_luma = FALSE;
+         break;
         default:
           g_assert_not_reached ();
 
index 04e52a9..e2ae65f 100644 (file)
@@ -45,6 +45,7 @@ typedef struct _GstColorEffectsClass GstColorEffectsClass;
  * @GST_CLUT_PRESET_SEPIA: Sepia toning filter
  * @GST_CLUT_PRESET_XRAY: Invert colors and slightly shade to cyan
  * @GST_CLUT_PRESET_XPRO: Cross Processing filter
+ * @GST_CLUT_PRESET_YELLOWBLUE: Visual magnifier high-contrast color filter. Since: 0.10.24
  *
  * The lookup table to use to convert input colors
  */
@@ -54,7 +55,8 @@ typedef enum
   GST_COLOR_EFFECTS_PRESET_HEAT,
   GST_COLOR_EFFECTS_PRESET_SEPIA,
   GST_COLOR_EFFECTS_PRESET_XRAY,
-  GST_COLOR_EFFECTS_PRESET_XPRO
+  GST_COLOR_EFFECTS_PRESET_XPRO,
+  GST_COLOR_EFFECTS_PRESET_YELLOWBLUE,
 } GstColorEffectsPreset;
 
 /**