Mercurial > mplayer.hg
comparison libmpcodecs/vf_geq.c @ 33183:d676ffcbc45f
vf_geq: Fix FFmpeg API usage; eliminates some deprecation warnings.
libmpcodecs/vf_geq.c:118: warning: 'av_eval_expr' is deprecated (declared at ffmpeg/libavutil/eval.h:118)
libmpcodecs/vf_geq.c:178: warning: 'av_parse_expr' is deprecated (declared at ffmpeg/libavutil/eval.h:109)
patch by Alexis Ballier, alexis.ballier gmail com
author | diego |
---|---|
date | Tue, 19 Apr 2011 07:32:36 +0000 |
parents | b86ea534cfc7 |
children | d206960484fe |
comparison
equal
deleted
inserted
replaced
33182:92f963c8c610 | 33183:d676ffcbc45f |
---|---|
113 if (!vf->priv->e[plane]) continue; | 113 if (!vf->priv->e[plane]) continue; |
114 for(y=0; y<h; y++){ | 114 for(y=0; y<h; y++){ |
115 const_values[3]=y; | 115 const_values[3]=y; |
116 for(x=0; x<w; x++){ | 116 for(x=0; x<w; x++){ |
117 const_values[2]=x; | 117 const_values[2]=x; |
118 dst[x + y * dst_stride] = av_eval_expr(vf->priv->e[plane], | 118 dst[x + y * dst_stride] = av_expr_eval(vf->priv->e[plane], |
119 const_values, vf); | 119 const_values, vf); |
120 } | 120 } |
121 } | 121 } |
122 } | 122 } |
123 | 123 |
173 cb, | 173 cb, |
174 cr, | 174 cr, |
175 plane==0 ? lum : (plane==1 ? cb : cr), | 175 plane==0 ? lum : (plane==1 ? cb : cr), |
176 NULL | 176 NULL |
177 }; | 177 }; |
178 res = av_parse_expr(&vf->priv->e[plane], eq[plane], const_names, NULL, NULL, func2_names, func2, 0, NULL); | 178 res = av_expr_parse(&vf->priv->e[plane], eq[plane], const_names, NULL, NULL, func2_names, func2, 0, NULL); |
179 | 179 |
180 if (res < 0) { | 180 if (res < 0) { |
181 mp_msg(MSGT_VFILTER, MSGL_ERR, "geq: error loading equation `%s'\n", eq[plane]); | 181 mp_msg(MSGT_VFILTER, MSGL_ERR, "geq: error loading equation `%s'\n", eq[plane]); |
182 return 0; | 182 return 0; |
183 } | 183 } |