diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index d50a988753..6238b1f3b2 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -4349,7 +4349,9 @@ Transforms the video stream into a sequence of uncompressed YUV 4:2:0 images and stores it in a file (default: ./stream.yuv). The format is the same as the one employed by mjpegtools, so this is useful if you want to process the video with the mjpegtools suite. -It supports the YV12, RGB (24 bpp) and BGR (24 bpp) format. +It supports the YV12 format. +If your source file has a different format and is interlaced, make sure +to use -vf scale=::1 to ensure the conversion uses interlaced mode. You can combine it with the \-fixed\-vo option to concatenate files with the same dimensions and fps value. .PD 0 diff --git a/help/help_mp-en.h b/help/help_mp-en.h index b570c371ed..ab4a4daf49 100644 --- a/help/help_mp-en.h +++ b/help/help_mp-en.h @@ -1110,9 +1110,7 @@ static const char help_text[]= // vo_yuv4mpeg.c #define MSGTR_VO_YUV4MPEG_InterlacedHeightDivisibleBy4 "Interlaced mode requires image height to be divisible by 4." #define MSGTR_VO_YUV4MPEG_InterlacedLineBufAllocFail "Unable to allocate line buffer for interlaced mode." -#define MSGTR_VO_YUV4MPEG_InterlacedInputNotRGB "Input not RGB, can't separate chrominance by fields!" #define MSGTR_VO_YUV4MPEG_WidthDivisibleBy2 "Image width must be divisible by 2." -#define MSGTR_VO_YUV4MPEG_NoMemRGBFrameBuf "Not enough memory to allocate RGB framebuffer." #define MSGTR_VO_YUV4MPEG_OutFileOpenError "Can't get memory or file handle to write \"%s\"!" #define MSGTR_VO_YUV4MPEG_OutFileWriteError "Error writing image to output!" #define MSGTR_VO_YUV4MPEG_UnknownSubDev "Unknown subdevice: %s" diff --git a/libvo/vo_yuv4mpeg.c b/libvo/vo_yuv4mpeg.c index 01bfa8164b..3bddcafaaa 100644 --- a/libvo/vo_yuv4mpeg.c +++ b/libvo/vo_yuv4mpeg.c @@ -55,11 +55,6 @@ #include "sub.h" #include "fastmemcpy.h" -#include "libswscale/swscale.h" -#ifdef CONFIG_LIBSWSCALE_A -#include "libswscale/rgb2rgb.h" -#endif -#include "libmpcodecs/vf_scale.h" #include "libavutil/rational.h" static const vo_info_t info = @@ -81,9 +76,6 @@ static uint8_t *image_y = NULL; static uint8_t *image_u = NULL; static uint8_t *image_v = NULL; -static uint8_t *rgb_buffer = NULL; -static uint8_t *rgb_line_buffer = NULL; - static char *yuv_filename = NULL; static int using_format = 0; @@ -128,18 +120,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, MSGTR_VO_YUV4MPEG_InterlacedHeightDivisibleBy4); return -1; } - - rgb_line_buffer = malloc(image_width * 3); - if (!rgb_line_buffer) - { - mp_msg(MSGT_VO,MSGL_FATAL, - MSGTR_VO_YUV4MPEG_InterlacedLineBufAllocFail); - return -1; - } - - if (using_format == IMGFMT_YV12) - mp_msg(MSGT_VO,MSGL_WARN, - MSGTR_VO_YUV4MPEG_InterlacedInputNotRGB); } if (width % 2) @@ -149,20 +129,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, return -1; } -#ifdef CONFIG_LIBSWSCALE_A - if(using_format != IMGFMT_YV12) - { - sws_rgb2rgb_init(get_sws_cpuflags()); - rgb_buffer = malloc(image_width * image_height * 3); - if (!rgb_buffer) - { - mp_msg(MSGT_VO,MSGL_FATAL, - MSGTR_VO_YUV4MPEG_NoMemRGBFrameBuf); - return -1; - } - } -#endif - write_bytes = image_width * image_height * 3 / 2; image = malloc(write_bytes); @@ -187,44 +153,10 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, return 0; } -/* Only use when h divisable by 2! */ -static void swap_fields(uint8_t *ptr, const int h, const int stride) -{ - int i; - - for (i=0; i