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
262 link_dpad(link).min_perms, link_dpad(link).rej_perms);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);265 link->cur_buf = avfilter_default_get_video_buffer(link, dst->min_perms, link->w, link->h);
266 link->srcpic = picref;266 link->src_buf = picref;
267 avfilter_copy_buffer_ref_props(link->cur_pic, link->srcpic);267 avfilter_copy_buffer_ref_props(link->cur_buf, link->src_buf);
268 }268 }
269 else269 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
275void avfilter_end_frame(AVFilterLink *link)275void avfilter_end_frame(AVFilterLink *link)
@@ -283,9 +283,9 @@ void avfilter_end_frame(AVFilterLink *link) · 7 unmodified lines
283 283
284 /* unreference the source picture if we're feeding the destination filter284 /* unreference the source picture if we're feeding the destination filter
285 * a copied version dues to permission issues */285 * a copied version dues to permission issues */
286 if(link->srcpic) {286 if(link->src_buf) {
287 avfilter_unref_buffer(link->srcpic);287 avfilter_unref_buffer(link->src_buf);
288 link->srcpic = NULL;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 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);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 /* copy the slice if needed for permission reasons */301 /* copy the slice if needed for permission reasons */
302 if(link->srcpic) {302 if(link->src_buf) {
303 vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h;303 vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h;
304 304
305 for(i = 0; i < 4; i ++) {305 for(i = 0; i < 4; i ++) {
306 if(link->srcpic->data[i]) {306 if(link->src_buf->data[i]) {
307 src[i] = link->srcpic-> data[i] +307 src[i] = link->src_buf-> data[i] +
308 (y >> (i==0 ? 0 : vsub)) * link->srcpic-> linesize[i];308 (y >> (i==0 ? 0 : vsub)) * link->src_buf-> linesize[i];
309 dst[i] = link->cur_pic->data[i] +309 dst[i] = link->cur_buf->data[i] +
310 (y >> (i==0 ? 0 : vsub)) * link->cur_pic->linesize[i];310 (y >> (i==0 ? 0 : vsub)) * link->cur_buf->linesize[i];
311 } else311 } else
312 src[i] = dst[i] = NULL;312 src[i] = dst[i] = NULL;
313 }313 }
314 314
315 for(i = 0; i < 4; i ++) {315 for(i = 0; i < 4; i ++) {
316 int planew =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 if(!src[i]) continue;319 if(!src[i]) continue;
320 320
321 for(j = 0; j < h >> (i==0 ? 0 : vsub); j ++) {321 for(j = 0; j < h >> (i==0 ? 0 : vsub); j ++) {
322 memcpy(dst[i], src[i], planew);322 memcpy(dst[i], src[i], planew);
323 src[i] += link->srcpic ->linesize[i];323 src[i] += link->src_buf ->linesize[i];
324 dst[i] += link->cur_pic->linesize[i];324 dst[i] += link->cur_buf->linesize[i];
325 }325 }
326 }326 }
327 }327 }

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