From: Jason T. <ta...@ur...> - 2006-08-13 23:40:48
|
On Sun, 2006-08-13 at 17:23 -0400, Jason Tackaberry wrote: > The problem seems to be that in pause_loop() when > vo_remove_from_img_buf_queue() is called to get this->img_backup, > this->img_backup->ratio is the ratio returned by get_frame of the first > post plugin (scale). If I, for testing purposes, manually set > this->img_backup->ratio = 4/3.0 (the aspect of the last post plugin, > expand), the pause aspect flap problem goes away. The solution seems to be to rewrite the ratio of the original frame passed to the post plugin's draw method. So something like: scaled_frame = port->original_port->get_frame(port->original_port, this->dst_calc_w, this->dst_calc_h, this->dst_ratio, frame->format, frame->flags); frame->ratio = scaled_frame->ratio; _x_post_frame_copy_down(frame, scaled_frame); skip = scaled_frame->draw(scaled_frame, stream); _x_post_frame_copy_up(frame, scaled_frame); scaled_frame->free(scaled_frame); I've tried a number of scenarios, using source videos with square and non-square pixels, scaling to various resolutions, keeping and ignoring aspect, and I think everything is working now. The funny thing is I remember submitting a patch to the expand post plugin last year that fixes this pause aspect flap bug in that plugin. However this change produced another bug that I found some months later when wiring expand after tvtime. See: http://itdp.fh-biergarten.de/Xine-devel/2005-12/msg00024.html See also Miguel's reply: http://itdp.fh-biergarten.de/Xine-devel/2006-02/msg00025.html As it happens, Miguel's suggestion is just how I implemented the scale filter. It seems I keep getting bitten by this problem. If only I'd remembered Miguel's email earlier today. :) So the expand plugin still needs to be fixed in the same manner. I'll look at that now. Jason. |