History

Rename fields:

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

S.N. Hemanth Meenakshisundaram committed 16 years ago

Commit 5d4890d1 parent 7fce4819 files · +47 −47Browse files

Showing the changes to libavfilter/avfilter.c (1 of 9 files). Show all

Unified · Split

libavfilter/avfilter.c+17−17
@@ -262,14 +262,14 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) · 261 unmodified lines
262262 link_dpad(link).min_perms, link_dpad(link).rej_perms);
263263 */
264264
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);
268268 }
269269 else
270− link->cur_pic = picref;
270+ link->cur_buf = picref;
271271
272− start_frame(link, link->cur_pic);
272+ start_frame(link, link->cur_buf);
273273 }
274274
275275 void avfilter_end_frame(AVFilterLink *link)
@@ -283,9 +283,9 @@ void avfilter_end_frame(AVFilterLink *link) · 7 unmodified lines
283283
284284 /* unreference the source picture if we're feeding the destination filter
285285 * 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;
289289 }
290290
291291 }
@@ -299,29 +299,29 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 7 unmodified lines
299299 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);
300300
301301 /* copy the slice if needed for permission reasons */
302− if(link->srcpic) {
302+ if(link->src_buf) {
303303 vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h;
304304
305305 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];
311311 } else
312312 src[i] = dst[i] = NULL;
313313 }
314314
315315 for(i = 0; i < 4; i ++) {
316316 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);
318318
319319 if(!src[i]) continue;
320320
321321 for(j = 0; j < h >> (i==0 ? 0 : vsub); j ++) {
322322 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];
325325 }
326326 }
327327 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t