From fa11460bbd06540d43ffe53d047f25639a0a6b83 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Wed, 22 Sep 2004 20:29:13 +0000 Subject: - added cropping capability (thanks James Stembridge) - some vo drivers support cropping natively. (only xv and xvmc have been tested) - add software crop fallback to video_out.c - skip yuv2rgb processing at xshm for not yet cropped frames (these frames are never shown) - libmpeg2 and ffmpeg now may use crop support - bump vo api. (changes to xvmc/xxmc will follow) CVS patchset: 6991 CVS date: 2004/09/22 20:29:13 --- src/libmpeg2/header.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/libmpeg2/header.c') diff --git a/src/libmpeg2/header.c b/src/libmpeg2/header.c index c68ee5165..0f10588b0 100644 --- a/src/libmpeg2/header.c +++ b/src/libmpeg2/header.c @@ -116,8 +116,11 @@ int mpeg2_header_sequence (picture_t * picture, uint8_t * buffer) height = (buffer[0] << 16) | (buffer[1] << 8) | buffer[2]; - width = ((height >> 12) + 15) & ~15; - height = ((height & 0xfff) + 15) & ~15; + picture->display_width = width = (height >> 12); + picture->display_height = height = (height & 0xfff); + + width = (width + 15) & ~15; + height = (height + 15) & ~15; if ((width > 1920) || (height > 1152)) return 1; /* size restrictions for MP@HL */ -- cgit v1.2.3