]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/eval.c
Fix lossless jpeg encoder to comply to spec and store full redundant
[ffmpeg] / libavcodec / eval.c
index b75263b80473b2e43a0ec741c76be87e9d688bce..ada353670cc2e898c3adaef147b45a320f82b0ee 100644 (file)
@@ -29,7 +29,6 @@
  */
 
 #include "avcodec.h"
-#include "mpegvideo.h"
 #include "eval.h"
 
 #include <stdio.h>
@@ -60,7 +59,7 @@ typedef struct Parser{
     double var[VARS];
 } Parser;
 
-static int8_t si_prefixes['z' - 'E' + 1]={
+static const int8_t si_prefixes['z' - 'E' + 1]={
     ['y'-'E']= -24,
     ['z'-'E']= -21,
     ['a'-'E']= -18,
@@ -218,7 +217,7 @@ static AVEvalExpr * parse_primary(Parser *p) {
 
     p->s= strchr(p->s, '(');
     if(p->s==NULL){
-        *p->error = "missing (";
+        *p->error = "undefined constant or missing (";
         p->s= next;
         ff_eval_free(d);
         return NULL;
@@ -376,7 +375,7 @@ static int verify_expr(AVEvalExpr * e) {
     }
 }
 
-AVEvalExpr * ff_parse(char *s, const char **const_name,
+AVEvalExpr * ff_parse(const char *s, const char **const_name,
                double (**func1)(void *, double), const char **func1_name,
                double (**func2)(void *, double, double), char **func2_name,
                const char **error){
@@ -413,7 +412,7 @@ double ff_parse_eval(AVEvalExpr * e, double *const_value, void *opaque) {
     return eval_expr(&p, e);
 }
 
-double ff_eval2(char *s, double *const_value, const char **const_name,
+double ff_eval2(const char *s, double *const_value, const char **const_name,
                double (**func1)(void *, double), const char **func1_name,
                double (**func2)(void *, double, double), char **func2_name,
                void *opaque, const char **error){