AVFilterLink.srcpic -> AVFilterLink.src_buf AVFilterLink.cur_pic -> AVFilterLink.cur_buf AVFilterLink.outpic -> AVFilterLink.out_buf The new names are more generic and more consistent, since the struct they contain, which was named AVFilterPicRef, has been renamed to AVFilterBufferRef. Patch by S.N. Hemanth Meenakshisundaram %smeenaks%ucsd%edu%. Originally committed as revision 24732 to svn://svn.ffmpeg.org/ffmpeg/trunk
Showing the changes to libavfilter/avfilter.c (1 of 9 files). Show all
Unified · Split
| @@ -262,14 +262,14 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) · 261 unmodified lines | ||
| 262 | 262 | link_dpad(link).min_perms, link_dpad(link).rej_perms); |
| 263 | 263 | */ |
| 264 | 264 | |
| 265 | − link->cur_pic = avfilter_default_get_video_buffer(link, dst->min_perms, link->w, link->h); | |
| 266 | − link->srcpic = picref; | |
| 267 | − avfilter_copy_buffer_ref_props(link->cur_pic, link->srcpic); | |
| 265 | + link->cur_buf = avfilter_default_get_video_buffer(link, dst->min_perms, link->w, link->h); | |
| 266 | + link->src_buf = picref; | |
| 267 | + avfilter_copy_buffer_ref_props(link->cur_buf, link->src_buf); | |
| 268 | 268 | } |
| 269 | 269 | else |
| 270 | − link->cur_pic = picref; | |
| 270 | + link->cur_buf = picref; | |
| 271 | 271 | |
| 272 | − start_frame(link, link->cur_pic); | |
| 272 | + start_frame(link, link->cur_buf); | |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | void avfilter_end_frame(AVFilterLink *link) |
| @@ -283,9 +283,9 @@ void avfilter_end_frame(AVFilterLink *link) · 7 unmodified lines | ||
| 283 | 283 | |
| 284 | 284 | /* unreference the source picture if we're feeding the destination filter |
| 285 | 285 | * a copied version dues to permission issues */ |
| 286 | − if(link->srcpic) { | |
| 287 | − avfilter_unref_buffer(link->srcpic); | |
| 288 | − link->srcpic = NULL; | |
| 286 | + if(link->src_buf) { | |
| 287 | + avfilter_unref_buffer(link->src_buf); | |
| 288 | + link->src_buf = NULL; | |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | } |
| @@ -299,29 +299,29 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 7 unmodified lines | ||
| 299 | 299 | FF_DPRINTF_START(NULL, draw_slice); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " y:%d h:%d dir:%d\n", y, h, slice_dir); |
| 300 | 300 | |
| 301 | 301 | /* copy the slice if needed for permission reasons */ |
| 302 | − if(link->srcpic) { | |
| 302 | + if(link->src_buf) { | |
| 303 | 303 | vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h; |
| 304 | 304 | |
| 305 | 305 | for(i = 0; i < 4; i ++) { |
| 306 | − if(link->srcpic->data[i]) { | |
| 307 | − src[i] = link->srcpic-> data[i] + | |
| 308 | − (y >> (i==0 ? 0 : vsub)) * link->srcpic-> linesize[i]; | |
| 309 | − dst[i] = link->cur_pic->data[i] + | |
| 310 | − (y >> (i==0 ? 0 : vsub)) * link->cur_pic->linesize[i]; | |
| 306 | + if(link->src_buf->data[i]) { | |
| 307 | + src[i] = link->src_buf-> data[i] + | |
| 308 | + (y >> (i==0 ? 0 : vsub)) * link->src_buf-> linesize[i]; | |
| 309 | + dst[i] = link->cur_buf->data[i] + | |
| 310 | + (y >> (i==0 ? 0 : vsub)) * link->cur_buf->linesize[i]; | |
| 311 | 311 | } else |
| 312 | 312 | src[i] = dst[i] = NULL; |
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | for(i = 0; i < 4; i ++) { |
| 316 | 316 | int planew = |
| 317 | − ff_get_plane_bytewidth(link->format, link->cur_pic->w, i); | |
| 317 | + ff_get_plane_bytewidth(link->format, link->cur_buf->w, i); | |
| 318 | 318 | |
| 319 | 319 | if(!src[i]) continue; |
| 320 | 320 | |
| 321 | 321 | for(j = 0; j < h >> (i==0 ? 0 : vsub); j ++) { |
| 322 | 322 | memcpy(dst[i], src[i], planew); |
| 323 | − src[i] += link->srcpic ->linesize[i]; | |
| 324 | − dst[i] += link->cur_pic->linesize[i]; | |
| 323 | + src[i] += link->src_buf ->linesize[i]; | |
| 324 | + dst[i] += link->cur_buf->linesize[i]; | |
| 325 | 325 | } |
| 326 | 326 | } |
| 327 | 327 | } |