diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-07-24 12:57:29 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-07-24 12:57:29 +0000 |
commit | f6518586f4ff96282aa83faa5f1e54b26c657705 (patch) | |
tree | 13e32900db3df007b8f022bd360727ed3a2c16e0 /src | |
parent | aa41997f54697faf52e539ec27c78db60ed8561e (diff) | |
download | xine-lib-f6518586f4ff96282aa83faa5f1e54b26c657705.tar.gz xine-lib-f6518586f4ff96282aa83faa5f1e54b26c657705.tar.bz2 |
big xshm cleanup (free memory properly, set up yuv2rgb only when necessary, clean up field picture handling), gearing up for rc2
CVS patchset: 334
CVS date: 2001/07/24 12:57:29
Diffstat (limited to 'src')
-rw-r--r-- | src/libmpeg2/decode.c | 21 | ||||
-rw-r--r-- | src/libw32dll/w32codec.c | 5 | ||||
-rw-r--r-- | src/video_out/video_out_aa.c | 6 | ||||
-rw-r--r-- | src/video_out/video_out_syncfb.c | 4 | ||||
-rw-r--r-- | src/video_out/video_out_xshm.c | 256 | ||||
-rw-r--r-- | src/video_out/video_out_xv.c | 4 | ||||
-rw-r--r-- | src/xine-engine/video_out.c | 7 | ||||
-rw-r--r-- | src/xine-engine/video_out.h | 15 |
8 files changed, 184 insertions, 134 deletions
diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c index 0cbcff334..c08dc3ed2 100644 --- a/src/libmpeg2/decode.c +++ b/src/libmpeg2/decode.c @@ -196,7 +196,8 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, picture->coded_picture_height, picture->aspect_ratio_information, IMGFMT_YV12, - picture->frame_duration); + picture->frame_duration, + VO_PREDICTION_FLAG | VO_BOTH_FIELDS); picture->forward_reference_frame->PTS = 0; picture->forward_reference_frame->bFrameBad = 1; picture->backward_reference_frame = @@ -205,7 +206,8 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, picture->coded_picture_height, picture->aspect_ratio_information, IMGFMT_YV12, - picture->frame_duration); + picture->frame_duration, + VO_PREDICTION_FLAG | VO_BOTH_FIELDS); picture->backward_reference_frame->PTS = 0; picture->backward_reference_frame->bFrameBad = 1; @@ -245,7 +247,8 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, picture->coded_picture_height, picture->aspect_ratio_information, IMGFMT_YV12, - picture->frame_duration); + picture->frame_duration, + picture->picture_structure); else { picture->current_frame = mpeg2dec->output->get_frame (mpeg2dec->output, @@ -253,7 +256,8 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, picture->coded_picture_height, picture->aspect_ratio_information, IMGFMT_YV12, - picture->frame_duration); + picture->frame_duration, + (VO_PREDICTION_FLAG | picture->picture_structure)); picture->forward_reference_frame->free (picture->forward_reference_frame); picture->forward_reference_frame = @@ -263,9 +267,6 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, picture->current_frame->bFrameBad = 0; picture->current_frame->PTS = mpeg2dec->pts; mpeg2dec->pts = 0; - picture->current_frame->field(picture->current_frame, - picture->picture_structure); - } } @@ -413,7 +414,8 @@ void mpeg2_find_sequence_header (mpeg2dec_t * mpeg2dec, picture->coded_picture_height, picture->aspect_ratio_information, IMGFMT_YV12, - picture->frame_duration); + picture->frame_duration, + VO_PREDICTION_FLAG | VO_BOTH_FIELDS); picture->forward_reference_frame->PTS = 0; picture->forward_reference_frame->bFrameBad = 1; picture->backward_reference_frame = @@ -422,7 +424,8 @@ void mpeg2_find_sequence_header (mpeg2dec_t * mpeg2dec, picture->coded_picture_height, picture->aspect_ratio_information, IMGFMT_YV12, - picture->frame_duration); + picture->frame_duration, + VO_PREDICTION_FLAG | VO_BOTH_FIELDS); picture->backward_reference_frame->PTS = 0; picture->backward_reference_frame->bFrameBad = 1; diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index 5e7b75856..6486f2aa9 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: w32codec.c,v 1.11 2001/07/17 19:37:21 guenter Exp $ + * $Id: w32codec.c,v 1.12 2001/07/24 12:57:29 guenter Exp $ * * routines for using w32 codecs * @@ -311,7 +311,8 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { this->bih.biHeight, 42, this->outfmt /*IMGFMT_YUY2*/, - this->video_step); + this->video_step, + VO_BOTH_FIELDS); ret = ICDecompress(this->hic, ICDECOMPRESS_NOTKEYFRAME, &this->bih, this->buf, diff --git a/src/video_out/video_out_aa.c b/src/video_out/video_out_aa.c index 7950f3f97..a96d089d7 100644 --- a/src/video_out/video_out_aa.c +++ b/src/video_out/video_out_aa.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_aa.c,v 1.10 2001/07/17 15:20:44 guenter Exp $ + * $Id: video_out_aa.c,v 1.11 2001/07/24 12:57:30 guenter Exp $ * * video_out_aa.c, ascii-art output plugin for xine * @@ -107,7 +107,7 @@ static void aa_dispose_frame (vo_frame_t *vo_img) { } static void aa_frame_field (vo_frame_t *vo_img, int which_field) { - /* FIXME: field picture based streams will go wrong with aa */ + /* nothing to be done here */ } @@ -126,7 +126,7 @@ static vo_frame_t *aa_alloc_frame(vo_driver_t *this) { static void aa_update_frame_format (vo_driver_t *this, vo_frame_t *img, uint32_t width, uint32_t height, - int ratio_code, int format) { + int ratio_code, int format, int flags) { int image_size; diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c index f3a4d52c8..396afc7ec 100644 --- a/src/video_out/video_out_syncfb.c +++ b/src/video_out/video_out_syncfb.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_syncfb.c,v 1.8 2001/07/04 17:10:24 uid32519 Exp $ + * $Id: video_out_syncfb.c,v 1.9 2001/07/24 12:57:30 guenter Exp $ * * video_out_syncfb.c, Matrox G400 video extension interface for xine * @@ -454,7 +454,7 @@ printf("behind setup window mga\n"); static void mga_update_frame_format (vo_driver_t *this_gen, vo_frame_t *frame_gen, uint32_t width, uint32_t height, int ratio_code, - int format) { + int format, int flags) { mga_frame_t *frame = (mga_frame_t *) frame_gen; diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index 033c3fba2..1864c2549 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xshm.c,v 1.22 2001/07/20 15:59:29 guenter Exp $ + * $Id: video_out_xshm.c,v 1.23 2001/07/24 12:57:30 guenter Exp $ * * video_out_xshm.c, X11 shared memory extension interface for xine * @@ -66,7 +66,6 @@ typedef struct xshm_frame_s { int width, height; int rgb_width, rgb_height; - int ratio_code; XImage *image; uint8_t *rgb_dst; @@ -74,6 +73,8 @@ typedef struct xshm_frame_s { XShmSegmentInfo shminfo; int format; + + uint8_t *chunk[3]; /* mem alloc by xmalloc_aligned */ } xshm_frame_t; typedef struct xshm_driver_s { @@ -103,19 +104,24 @@ typedef struct xshm_driver_s { int delivered_width; /* everything is set up for these frame dimensions */ int delivered_height; /* the dimension as they come from the decoder */ int delivered_ratio_code; + int delivered_flags; double ratio_factor; /* output frame must fullfill: height = width * ratio_factor */ int output_width; /* frames will appear in this size (pixels) on screen */ int output_height; int output_xoffset; int output_yoffset; int stripe_height; + int yuv_width; /* width/height yuv2rgb is configured for */ + int yuv_height; + int yuv_stride; int user_ratio; - int dest_width; /* size of image gui has most recently adopted to */ + int dest_width; /* size of image gui has most recently adopted to */ int dest_height; int gui_width; /* size of gui window */ int gui_height; + int gui_size_changed; int dest_x; int dest_y; @@ -164,6 +170,20 @@ static void x11_DeInstallXErrorHandler (xshm_driver_t *this) XFlush (this->display); } +static void *my_malloc_aligned (size_t alignment, size_t size, uint8_t **chunk) { + + void *pMem; + + pMem = xmalloc (size+alignment); + + *chunk = pMem; + + while ((int) pMem % alignment) + pMem++; + + return pMem; +} + /* * allocate an XImage, try XShm first but fall back to * plain X11 if XShm should fail @@ -295,6 +315,8 @@ static void dispose_ximage (xshm_driver_t *this, } else { + free (myimage->data); + XDestroyImage (myimage); } @@ -359,32 +381,15 @@ static void xshm_frame_field (vo_frame_t *vo_img, int which_field) { xshm_driver_t *this = (xshm_driver_t *) vo_img->instance->driver; switch (which_field) { - case 1: + case VO_TOP_FIELD: frame->rgb_dst = frame->image->data; frame->stripe_inc = 2*this->stripe_height * frame->image->bytes_per_line; - yuv2rgb_setup (this->yuv2rgb, - this->delivered_width, - 16, - this->delivered_width*2, - this->delivered_width, - this->output_width, - this->stripe_height, - frame->image->bytes_per_line*2); - break; - case 2: + case VO_BOTTOM_FIELD: frame->rgb_dst = frame->image->data + frame->image->bytes_per_line ; frame->stripe_inc = 2*this->stripe_height * frame->image->bytes_per_line; - yuv2rgb_setup (this->yuv2rgb, - this->delivered_width, - 16, - this->delivered_width*2, - this->delivered_width, - this->output_width, - this->stripe_height, - frame->image->bytes_per_line*2); break; - case 3: + case VO_BOTH_FIELDS: frame->rgb_dst = frame->image->data; break; } @@ -432,7 +437,7 @@ static vo_frame_t *xshm_alloc_frame (vo_driver_t *this_gen) { static void xshm_calc_output_size (xshm_driver_t *this) { double image_ratio, desired_ratio; - double corr_factor; + double corr_factor, x_factor, y_factor; int ideal_width, ideal_height; int dest_width, dest_height; @@ -492,7 +497,6 @@ static void xshm_calc_output_size (xshm_driver_t *this) { desired_ratio = 4.0 / 3.0; } - /* this->ratio_factor = display_ratio * desired_ratio / image_ratio ; */ this->ratio_factor = this->display_ratio * desired_ratio; /* @@ -521,58 +525,61 @@ static void xshm_calc_output_size (xshm_driver_t *this) { this->calc_dest_size (ideal_width, ideal_height, &dest_width, &dest_height); - /* * make the frames fit into the given destination area */ - if ( ((double) dest_width / this->ratio_factor) < dest_height ) { - - this->output_width = dest_width ; - this->output_height = (double) dest_width / this->ratio_factor ; - this->output_xoffset = 0; - this->output_yoffset = (dest_height - this->output_height) / 2; - + x_factor = (double) dest_width / (double) ideal_width; + y_factor = (double) dest_height / (double) ideal_height; + + if ( x_factor < y_factor ) { + this->output_width = (double) ideal_width * x_factor ; + this->output_height = (double) ideal_height * x_factor ; } else { - - this->output_width = (double) dest_height * this->ratio_factor ; - this->output_height = dest_height; - - this->output_xoffset = (dest_width - this->output_width) / 2; - this->output_yoffset = 0; - + this->output_width = (double) ideal_width * y_factor ; + this->output_height = (double) ideal_height * y_factor ; } + + this->output_xoffset = (dest_width - this->output_width) / 2; + this->output_yoffset = (dest_height - this->output_height) / 2; } static void xshm_update_frame_format (vo_driver_t *this_gen, vo_frame_t *frame_gen, uint32_t width, uint32_t height, - int ratio_code, int format) { + int ratio_code, int format, int flags) { xshm_driver_t *this = (xshm_driver_t *) this_gen; xshm_frame_t *frame = (xshm_frame_t *) frame_gen; + int setup_yuv = 0; + + flags &= VO_BOTH_FIELDS; + + if ((width != this->delivered_width) + || (height != this->delivered_height) + || (ratio_code != this->delivered_ratio_code) + || (flags != this->delivered_flags) + || this->gui_size_changed) { + + this->delivered_width = width; + this->delivered_height = height; + this->delivered_ratio_code = ratio_code; + this->delivered_flags = flags; + this->gui_size_changed = 0; + + xshm_calc_output_size (this); + + setup_yuv = 1; + } if ((frame->rgb_width != this->output_width) || (frame->rgb_height != this->output_height) || (frame->width != width) || (frame->height != height) - || (frame->ratio_code != ratio_code) - || (frame->format != format) - || (frame->width != this->delivered_width) - || (frame->height != this->delivered_height)) { + || (frame->format != format)) { int image_size; - if ((frame->width != this->delivered_width) - || (frame->height != this->delivered_height) - || (frame->ratio_code != ratio_code)) { - this->delivered_width = width; - this->delivered_height = height; - this->delivered_ratio_code = ratio_code; - - xshm_calc_output_size (this); - } - this->stripe_height = 16 * this->output_height / this->delivered_height; /* @@ -590,8 +597,18 @@ static void xshm_update_frame_format (vo_driver_t *this_gen, dispose_ximage (this, &frame->shminfo, frame->image); - /* FIXME: free yuv (base) memory !!!!! */ - + if (frame->chunk[0]){ + free (frame->chunk[0]); + frame->chunk[0] = NULL; + } + if (frame->chunk[1]) { + free (frame->chunk[1]); + frame->chunk[1] = NULL; + } + if (frame->chunk[2]) { + free (frame->chunk[2]); + frame->chunk[2] = NULL; + } frame->image = NULL; } @@ -603,12 +620,12 @@ static void xshm_update_frame_format (vo_driver_t *this_gen, if (format == IMGFMT_YV12) { image_size = width * height; - frame->vo_frame.base[0] = xmalloc_aligned(16,image_size); - frame->vo_frame.base[1] = xmalloc_aligned(16,image_size/4); - frame->vo_frame.base[2] = xmalloc_aligned(16,image_size/4); + frame->vo_frame.base[0] = my_malloc_aligned(16,image_size, &frame->chunk[0]); + frame->vo_frame.base[1] = my_malloc_aligned(16,image_size/4, &frame->chunk[1]); + frame->vo_frame.base[2] = my_malloc_aligned(16,image_size/4, &frame->chunk[2]); } else { image_size = width * height; - frame->vo_frame.base[0] = xmalloc_aligned(16,image_size*2); + frame->vo_frame.base[0] = my_malloc_aligned(16,image_size*2, &frame->chunk[0]); } frame->format = format; @@ -617,34 +634,71 @@ static void xshm_update_frame_format (vo_driver_t *this_gen, frame->rgb_width = this->output_width; frame->rgb_height = this->output_height; - - frame->ratio_code = ratio_code; - - yuv2rgb_setup (this->yuv2rgb, - this->delivered_width, - 16, - this->delivered_width, - this->delivered_width/2, - this->output_width, - this->stripe_height, - frame->image->bytes_per_line); - } if (frame->image) { frame->rgb_dst = frame->image->data; - frame->stripe_inc = this->stripe_height * frame->image->bytes_per_line; + switch (flags) { + case VO_TOP_FIELD: + frame->rgb_dst = frame->image->data; + frame->stripe_inc = 2 * this->stripe_height * frame->image->bytes_per_line; + break; + case VO_BOTTOM_FIELD: + frame->rgb_dst = frame->image->data + frame->image->bytes_per_line ; + frame->stripe_inc = 2 * this->stripe_height * frame->image->bytes_per_line; + break; + case VO_BOTH_FIELDS: + frame->rgb_dst = frame->image->data; + frame->stripe_inc = this->stripe_height * frame->image->bytes_per_line; + break; + } + + if ( (flags == VO_BOTH_FIELDS) + && (this->yuv_stride != frame->image->bytes_per_line) ) { + setup_yuv = 1; + } else if (this->yuv_stride != (frame->image->bytes_per_line*2)) { + setup_yuv = 1; + } + + if (setup_yuv + || (this->yuv_height != this->stripe_height) + || (this->yuv_width != this->output_width)) { + switch (flags) { + case VO_TOP_FIELD: + case VO_BOTTOM_FIELD: + yuv2rgb_setup (this->yuv2rgb, + this->delivered_width, + 16, + this->delivered_width*2, + this->delivered_width, + this->output_width, + this->stripe_height, + frame->image->bytes_per_line*2); + this->yuv_stride = frame->image->bytes_per_line*2; + break; + case VO_BOTH_FIELDS: + yuv2rgb_setup (this->yuv2rgb, + this->delivered_width, + 16, + this->delivered_width, + this->delivered_width/2, + this->output_width, + this->stripe_height, + frame->image->bytes_per_line); + this->yuv_stride = frame->image->bytes_per_line; + break; + } + this->yuv_height = this->stripe_height; + this->yuv_width = this->output_width; + } } } -/* - * - */ static void xshm_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay) { xshm_driver_t *this = (xshm_driver_t *) this_gen; xshm_frame_t *frame = (xshm_frame_t *) frame_gen; -// Alpha Blend here + /* Alpha Blend here */ if (overlay->data) { switch(this->bpp) { case 16: @@ -677,6 +731,10 @@ static void xshm_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { if ( (frame->width != this->dest_width) || (frame->height != this->dest_height) ) { + + printf ("requesting dest size of %d x %d \n", + frame->rgb_width, frame->rgb_height); + this->request_dest_size (frame->rgb_width, frame->rgb_height, &this->dest_x, &this->dest_y, @@ -685,8 +743,15 @@ static void xshm_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { this->dest_width = frame->width; this->dest_height = frame->height; - this->output_xoffset = (frame->rgb_width - this->gui_width) / 2; - this->output_yoffset = (frame->rgb_height - this->gui_height) / 2; + this->output_xoffset = (this->gui_width - frame->rgb_width) / 2; + this->output_yoffset = (this->gui_height - frame->rgb_height) / 2; + + printf ("gui size : %d x %d, frame size : %d x %d => offset %d, %d\n", + this->gui_width, this->gui_height, + frame->rgb_width, frame->rgb_height, + this->output_xoffset, + this->output_yoffset); + } XLockDisplay (this->display); @@ -766,40 +831,11 @@ static int xshm_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *data) { xshm_driver_t *this = (xshm_driver_t *) this_gen; - x11_rectangle_t *area; - int gui_width, gui_height; switch (data_type) { case GUI_DATA_EX_DEST_POS_SIZE_CHANGED: - area = (x11_rectangle_t *) data; - - gui_width = area->w; - gui_height = area->h; - - if ( (gui_width != this->gui_width) || (gui_height != this->gui_height) ) { - - /* - * make the frames fit into the given destination area - */ - - /*FIXME: not stable yet */ - if ( ((double) gui_width / this->ratio_factor) < gui_height ) { - - this->output_width = gui_width ; - this->output_height = (double) gui_width / this->ratio_factor ; - } else { - - this->output_width = (double) gui_height * this->ratio_factor ; - this->output_height = gui_height; - } - - this->gui_width = gui_width; - this->gui_height = gui_height; - - printf ("video_out_xshm: new output size: %d x %d\n", - gui_width, gui_height); - } + this->gui_size_changed = 1; break; case GUI_DATA_EX_COMPLETION_EVENT: { diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index f3b89d9e6..3a652b2a4 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xv.c,v 1.54 2001/07/17 19:40:27 guenter Exp $ + * $Id: video_out_xv.c,v 1.55 2001/07/24 12:57:30 guenter Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -360,7 +360,7 @@ static void dispose_ximage (xv_driver_t *this, static void xv_update_frame_format (vo_driver_t *this_gen, vo_frame_t *frame_gen, uint32_t width, uint32_t height, - int ratio_code, int format) { + int ratio_code, int format, int flags) { xv_driver_t *this = (xv_driver_t *) this_gen; xv_frame_t *frame = (xv_frame_t *) frame_gen; diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 0f59e0d6c..838423c42 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.c,v 1.35 2001/07/22 11:29:56 guenter Exp $ + * $Id: video_out.c,v 1.36 2001/07/24 12:57:30 guenter Exp $ * */ @@ -383,7 +383,8 @@ static void vo_open (vo_instance_t *this) { static vo_frame_t *vo_get_frame (vo_instance_t *this, uint32_t width, uint32_t height, - int ratio, int format, uint32_t duration) { + int ratio, int format, uint32_t duration, + int flags) { vo_frame_t *img; @@ -408,7 +409,7 @@ static vo_frame_t *vo_get_frame (vo_instance_t *this, /* let driver ensure this image has the right format */ - this->driver->update_frame_format (this->driver, img, width, height, ratio, format); + this->driver->update_frame_format (this->driver, img, width, height, ratio, format, flags); pthread_mutex_unlock (&img->mutex); diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index b1f00f6c6..a17b30f67 100644 --- a/src/xine-engine/video_out.h +++ b/src/xine-engine/video_out.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.h,v 1.13 2001/07/18 21:38:17 f1rmb Exp $ + * $Id: video_out.h,v 1.14 2001/07/24 12:57:30 guenter Exp $ * * * xine version of video_out.h @@ -111,10 +111,12 @@ struct vo_instance_s { * ratio == aspect ration information * format == FOURCC descriptor of image format * duration == frame duration in 1/90000 sec + * flags == field/prediction flags */ vo_frame_t* (*get_frame) (vo_instance_t *this, uint32_t width, uint32_t height, int ratio_code, - int format, uint32_t duration); + int format, uint32_t duration, + int flags); /* overlay stuff */ vo_overlay_t* (*get_overlay) (vo_instance_t *this); @@ -172,6 +174,13 @@ struct vo_instance_s { #define ASPECT_FULL 2 /* 4:3 */ #define ASPECT_DVB 3 /* 1:2 */ +/* get_frame flags */ + +#define VO_TOP_FIELD 1 +#define VO_BOTTOM_FIELD 2 +#define VO_BOTH_FIELDS (VO_TOP_FIELD | VO_BOTTOM_FIELD) +#define VO_PREDICTION_FLAG 4 + /* video driver capabilities */ /* driver copies image (i.e. converts it to @@ -216,7 +225,7 @@ struct vo_driver_s { */ void (*update_frame_format) (vo_driver_t *this, vo_frame_t *img, uint32_t width, uint32_t height, - int ratio_code, int format); + int ratio_code, int format, int flags); /* display a given frame */ void (*display_frame) (vo_driver_t *this, vo_frame_t *vo_img); |