[shotdetect] 05/11: Added 1004-fix_comments_and_names.patch.
Giulio Paci
giuliopaci-guest at alioth.debian.org
Sun Aug 11 23:29:47 UTC 2013
This is an automated email from the git hooks/post-receive script.
giuliopaci-guest pushed a commit to branch master
in repository shotdetect.
commit 976f5884a38d5d9f1965baec90121595399da660
Author: Giulio Paci <giuliopaci at gmail.com>
Date: Sat Aug 10 16:12:08 2013 +0200
Added 1004-fix_comments_and_names.patch.
---
debian/patches/1004-fix_comments_and_names.patch | 438 ++++++++++++++++++++++
1 file changed, 438 insertions(+)
diff --git a/debian/patches/1004-fix_comments_and_names.patch b/debian/patches/1004-fix_comments_and_names.patch
new file mode 100644
index 0000000..4618940
--- /dev/null
+++ b/debian/patches/1004-fix_comments_and_names.patch
@@ -0,0 +1,438 @@
+Description: Fix comments, typos and contact references.
+Author: Peter B. <pb at das-werkstatt.com>
+Forwarded: no
+Last-Update: 2013-08-10
+--- a/include/config.h
++++ b/include/config.h
+@@ -5,7 +5,7 @@
+ #define PACKAGE "shotdetect"
+
+ /* Define to the address where bug reports for this package should be sent. */
+-#define PACKAGE_BUGREPORT "johan.mathe at tremplin-utc.fr"
++#define PACKAGE_BUGREPORT "johmathe at google.com"
+
+ /* Define to the full name of this package. */
+ #define PACKAGE_NAME "film.cpp"
+--- a/include/film.h
++++ b/include/film.h
+@@ -54,13 +54,13 @@
+ {
+
+ private:
+- /* Variables d'état */
++ /* Variables for state keeping */
+ bool first_img_set;
+- bool last_img_set ;
++ bool last_img_set;
+ bool audio_set;
+ bool video_set;
+ bool thumb_set;
+- bool shot_set ;
++ bool shot_set;
+
+ unsigned int ech;
+ signed short int minright;
+@@ -142,9 +142,9 @@
+ list < shot > shots;
+ /* Prev Score in compare_frame */
+ int prev_score;
+- /* id du plan en cours de traitement */
++ /* Plan ID */
+ int id_plan;
+- /* Seuil de traitement */
++ /* Threshold value */
+ int threshold;
+ /* Absolute path of the media */
+ string global_path;
+@@ -154,13 +154,13 @@
+ xml *x;
+ int process ();
+
+- /* Constructeur */
++ /* Constructor */
+ film ();
+ void process_audio ();
+ void shotlog(string message);
+ void create_main_dir(void);
+
+- /* Accesseurs */
++ /* Accessors */
+ inline void set_first_img(bool val) {this->first_img_set = val; };
+ inline void set_last_img(bool val) {this->last_img_set = val; };
+ inline void set_audio(bool val) {this->audio_set = val; };
+--- a/include/graph.h
++++ b/include/graph.h
+@@ -40,7 +40,7 @@
+
+ private:
+
+-/* Donn�es de fonctionnement internes */
++ /* Internal graph data */
+ gdImagePtr im_colors;
+ gdImagePtr im_qte_mvmt;
+ gdImagePtr im_hsv;
+@@ -63,7 +63,7 @@
+ int grid_size;
+
+
+- int threseold;
++ int threshold;
+
+ int color;
+ int bgcolor;
+@@ -74,16 +74,16 @@
+ int xaxis_offset;
+ bool grid;
+ int ptr;
+- /* Descripteurs de fichiers pour les graphes */
++ /* Graph filenames */
+ FILE *fdqte_mvmt;
+ FILE *fdgraph_colors;
+ FILE *fdgraph_hsv;
+- /* Descriptuers de ficheirs pour le XML */
++ /* XML filenames */
+ FILE *fd_xml;
+ FILE *fdcsv;
+ film *f;
+ vector < dataframe > data;
+-/* Couleurs */
++ /* Colors */
+ int line_color;
+ int background_color;
+ int title_color;
+@@ -94,7 +94,7 @@
+ int red_color;
+ int green_color;
+ int blue_color;
+- int threseold_color;
++ int threshold_color;
+ void draw_canvas (gdImagePtr im, string title);
+ float MAX(float a, float b, float c);
+ float MIN(float a, float b, float c);
+@@ -113,8 +113,8 @@
+ void write_xml(string filename);
+ void set_title (string);
+ ~graph ();
+- graph (int x, int y, string filename,int threseold, film *farg);
+- graph (int threseold, film *farg);
++ graph (int x, int y, string filename,int threshold, film *farg);
++ graph (int threshold, film *farg);
+ inline void push_data (int val)
+ {
+ dataframe frame;
+--- a/include/shot.h
++++ b/include/shot.h
+@@ -15,15 +15,15 @@
+ public:
+ int myid;
+
+- /* Duration in frame */
++ /* Duration in frames */
+ unsigned int fduration;
+ /* Starting point (frame) */
+ unsigned int fbegin;
+ /* Duration in ms */
+ double msduration;
+- /* Beggining en ms */
++ /* Beginning in ms */
+ double msbegin;
+- /* img */
++ /* images */
+ image *img_begin;
+ image *img_end;
+ shot ();
+--- a/src/film.cpp
++++ b/src/film.cpp
+@@ -84,7 +84,7 @@
+ int nbpx = (height * width);
+
+ /*
+- * On se ramene à la moyenne
++ * Reset values back to average
+ */
+ score /= nbpx;
+ c1tot /= nbpx;
+@@ -93,7 +93,7 @@
+
+
+ /*
+- * Derivee numerique
++ * Subtract score numbers to measure amount of image change
+ */
+ diff = abs (score - prev_score);
+ prev_score = score;
+@@ -328,7 +328,7 @@
+ checknumber = (samplerate * samplearg) / 1000;
+
+ /*
+- * Boucle de traitement principale du flux
++ * Main processing loop
+ */
+ this->frame_number = 0;
+ while (av_read_frame (pFormatCtx, &packet) >= 0)
+@@ -386,7 +386,7 @@
+ else
+ {
+ /*
+- * Cas ou c'est la premiere image, on cree la premiere image dans tous les cas
++ * To avoid that there is no first image, we always create the first image:
+ */
+ image *begin_i = new image (this, width, height, s.myid, BEGIN);
+ begin_i->create_img_dir ();
+@@ -409,7 +409,7 @@
+
+ if (videoStream != -1)
+ {
+- /* Mise en place de la dernière image */
++ /* Save the last frame image */
+ int lastFrame = this->frame_number;
+ shots.back ().fduration = lastFrame - shots.back ().fbegin;
+ shots.back ().msduration = int (((shots.back ().fduration) * 1000) / fps);
+@@ -419,7 +419,7 @@
+ shots.back ().img_end = end_i;
+
+ /*
+- * Graphe de la qté de mvmt
++ * Graph: Quantity of movement
+ */
+ g->init_gd ();
+ g->draw_all_canvas ();
+@@ -447,7 +447,7 @@
+ */
+ if (audioStream != -1)
+ {
+- /* Fermetrure du fichier xml */
++ /* Close the XML file */
+ if (audio_set) close_xml ();
+ avcodec_close (pCodecCtxAudio);
+ }
+@@ -519,7 +519,7 @@
+ {
+ sample_right = *((signed short int *) (audio_buf + i));
+ /*
+- * Si un seul canal, le sample droit = sample gauche
++ * If there's only 1 channel, set sample_right=sample_left
+ */
+ if (pCodecCtxAudio->channels >= 1)
+ sample_left = *((signed short int *) (audio_buf + i + 2));
+@@ -527,7 +527,7 @@
+ sample_left = sample_right;
+
+ /*
+- * extraction des minimas et maximas
++ * Extract minima and maxima
+ */
+ if (minright > sample_right)
+ minright = sample_right;
+--- a/src/graph.cpp
++++ b/src/graph.cpp
+@@ -56,7 +56,7 @@
+ this->yoffset = 10;
+ this->size_graduation = 3;
+ this->grid_size = 10;
+- this->threseold = th;
++ this->threshold = th;
+ this->global_path = path;
+ string csvpath = f->get_opath() + "/motion.csv" ;
+ printf("%s\n",csvpath.c_str());
+@@ -103,7 +103,7 @@
+ line_color = gdImageColorAllocate (im_qte_mvmt, 0, 0, 0);
+ title_color = gdImageColorAllocate (im_qte_mvmt, 255, 255, 0);
+ grid_color = gdImageColorAllocate (im_qte_mvmt, 0, 0, 0);
+- threseold_color = gdImageColorAllocate (im_qte_mvmt, 255, 0, 0);
++ threshold_color = gdImageColorAllocate (im_qte_mvmt, 255, 0, 0);
+
+ // Declare color indexes for the color graph
+
+@@ -131,7 +131,7 @@
+ {
+
+ int back_true_color;
+- string str = "Couleurs";
++ string str = "RGB color values";
+ draw_canvas (im_colors, str);
+ str = "Motion quantity";
+ draw_canvas (im_qte_mvmt, str);
+@@ -144,17 +144,17 @@
+ string title = "Color in function of time";
+ gdImageString (im_hsv, gdFontGetLarge (), im_hsv->sx / 2 - (title.size () * gdFontGetLarge ()->w / 2), 10, (unsigned char *) title.c_str (), grid_true_color);
+
+- // Yaxis
++ // Y-axis
+ gdImageLine (im_hsv, xoffset, yoffset, xoffset, ysize - yoffset, grid_true_color);
+
+- // graduation
++ // Grid
+ for (int i = yoffset; i < ysize - yoffset; i++) {
+ if (!(i % grid_size)) {
+ gdImageLine (im_hsv, xoffset - 2, i, xoffset + 2, i, grid_true_color);
+ }
+ }
+
+- // Xaxis
++ // X-axis
+ gdImageLine (im_hsv, xoffset, xaxis_offset, xsize - xoffset, xaxis_offset, grid_color);
+
+ for (int i = xoffset; i < xsize - xoffset; i++) {
+@@ -168,17 +168,17 @@
+ {
+ gdImageString (im, gdFontGetLarge (), im->sx / 2 - (title.size () * gdFontGetLarge ()->w / 2), 10, (unsigned char *) title.c_str (), grid_color);
+
+- // Yaxis
++ // Y-axis
+ gdImageLine (im, xoffset, yoffset, xoffset, ysize - yoffset, grid_color);
+
+- // graduation
++ // Grid
+ for (int i = yoffset; i < ysize - yoffset; i++) {
+ if (!(i % grid_size)) {
+ gdImageLine (im, xoffset - 2, i, xoffset + 2, i, grid_color);
+ }
+ }
+
+- // Xaxis
++ // X-axis
+ gdImageLine (im, xoffset, xaxis_offset, xsize - xoffset, xaxis_offset, grid_color);
+
+ for (int i = xoffset; i < xsize - xoffset; i++) {
+@@ -198,8 +198,8 @@
+ fprintf(fdcsv,"%d,",data[i].global);
+ }
+
+- // Display thresold
+- gdImageLine (im_qte_mvmt, xoffset, xaxis_offset - threseold, xsize - xoffset, xaxis_offset - threseold, threseold_color);
++ // Display threshold
++ gdImageLine (im_qte_mvmt, xoffset, xaxis_offset - threshold, xsize - xoffset, xaxis_offset - threshold, threshold_color);
+ }
+
+
+@@ -280,7 +280,7 @@
+ }
+
+ if (r == max)
+- *h = (g - b) / delta; // between yellow & magenta
++ *h = (g - b) / delta; // between yellow & magenta
+ else if (g == max)
+ *h = 2 + (b - r) / delta; // between cyan & yellow
+ else
+--- a/src/image.cpp
++++ b/src/image.cpp
+@@ -121,7 +121,7 @@
+ if (f->get_thumb())
+ {
+
+- /* Nom de l'image */
++ /* Name the images */
+ str.str ("");
+ if (this->type == BEGIN)
+ str << "/thumbs/" << id << "_in.jpg";
+@@ -131,7 +131,7 @@
+ str.str ("");
+ str << f->global_path << "/" << thumb;
+
+- /* Mise en place du fichier */
++ /* Store the image file */
+ if ((minijpgout = fopen (str.str ().c_str (), "wb")) == NULL)
+ {
+ cerr << str.str () << endl;
+@@ -145,7 +145,7 @@
+
+ if (f->get_shot())
+ {
+- /* Nom de l'image */
++ /* Name the images */
+ str.str ("");
+ if (this->type == BEGIN)
+ str << "/shots/" << id << "_in.jpg";
+@@ -155,7 +155,7 @@
+ str.str ("");
+ str << f->global_path << "/" << img;
+
+- /* Mise en place du fichier */
++ /* Store the image file */
+ if ((jpgout = fopen (str.str ().c_str (), "wb")) == NULL)
+ {
+ cerr << "shot log ::" << str.str () << endl;
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -24,7 +24,7 @@
+ show_help (char **argv)
+ {
+ printf ("usage: %s \n"
+- "Shotdetect (IRI - johmathe - $Id: main.cpp 164 2007-10-13 23:53:21Z johmathe $)\n"
++ "Shotdetect 1.0.86.1, Copyright (c) 2007-2013 Johan Mathe (Centre Pompidou - IRI)\n\n"
+ "-h : show this help\n"
+ "-i file : input file path\n"
+ "-o path : output path\n"
+@@ -34,7 +34,8 @@
+ "-f : generate first img for each shot\n"
+ "-l : generate last img for each shot\n"
+ "-m : generate the thumb img\n"
+- "-r : generate the real img\n", argv[0]);
++ "-r : generate the real img\n"
++ "\n", argv[0]);
+ }
+
+
+@@ -68,7 +69,7 @@
+ exit (EXIT_SUCCESS);
+ break;
+
+- /* choix des thumbs */
++ /* Options for images */
+ case 'f':
+ f.set_first_img(true);
+ break;
+@@ -77,27 +78,27 @@
+ f.set_last_img(true);
+ break;
+
+- /* generer l'image en resolution native */
++ /* Store images in their native resolution */
+ case 'r':
+ f.set_shot(true);
+ break;
+
+- /* generer l'image en miniature */
++ /* Create smaller resized images (thumbnails) */
+ case 'm':
+ f.set_thumb(true);
+ break;
+
+- /* generer le xml pour les donnees video */
++ /* Create XML file for video */
+ case 'v':
+ f.set_video(true);
+ break;
+
+- /* generer le xml pour les donnees audio */
++ /* Create XML file for audio */
+ case 'w':
+ f.set_audio(true) ;
+ break;
+
+- /* Seuil */
++ /* Threshold */
+ case 's':
+ f.set_threshold(atoi (optarg));
+ break;
+@@ -116,7 +117,7 @@
+
+ }
+
+- /* Traitement des erreurs */
++ /* Treatment of errors: */
+ if (f.get_ipath().empty())
+ {
+ cerr << "Please specify an input file" << endl;
+--- a/src/xml.cpp
++++ b/src/xml.cpp
+@@ -136,7 +136,7 @@
+ xmlTextWriterStartElement (writer, BAD_CAST "body");
+ xmlTextWriterStartElement (writer, BAD_CAST "shots");
+
+- /* Mise en place des elements shots */
++ /* Write shot elements into XML */
+ for (il = f->shots.begin (); il != f->shots.end (); il++)
+ {
+ strflx.str ("");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-multimedia/shotdetect.git
More information about the pkg-multimedia-commits
mailing list