X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fcore%2Ffilter_rescale.c;h=bdeea77aced7284bc4c388a37a313dc0d6dc7657;hb=bf3264b9e340ba5c11cbf59835a8af3db94e0cc2;hp=19b087f1ad86e018dbf97b5445b021fe6a19b004;hpb=c974f8e87e0bd3de851fb638660f502092b1425e;p=melted diff --git a/src/modules/core/filter_rescale.c b/src/modules/core/filter_rescale.c index 19b087f..bdeea77 100644 --- a/src/modules/core/filter_rescale.c +++ b/src/modules/core/filter_rescale.c @@ -3,19 +3,19 @@ * Copyright (C) 2003-2004 Ushodaya Enterprises Limited * Author: Dan Dennedy * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "filter_rescale.h" @@ -62,21 +62,21 @@ static int filter_scale( mlt_frame this, uint8_t **image, mlt_image_format iform uint8_t *alpha = mlt_pool_alloc( iwidth * ( iheight + 1 ) ); // Convert the image and extract alpha - mlt_convert_rgb24a_to_yuv422( *image, iwidth, iheight, iwidth * 2, output, alpha ); + mlt_convert_rgb24a_to_yuv422( *image, iwidth, iheight, iwidth * 4, output, alpha ); mlt_properties_set_data( properties, "alpha", alpha, iwidth * ( iheight + 1 ), ( mlt_destructor )mlt_pool_release, NULL ); } else { // No alpha to extract - mlt_convert_rgb24_to_yuv422( *image, iwidth, iheight, iwidth * 2, output ); + mlt_convert_rgb24_to_yuv422( *image, iwidth, iheight, iwidth * 3, output ); } + mlt_properties_set_data( properties, "image", output, iwidth * ( iheight + 1 ) * 2, ( mlt_destructor )mlt_pool_release, NULL ); + // Scale the frame - mlt_frame_rescale_yuv422( this, owidth, oheight ); - - // Return the output - *image = mlt_properties_get_data( properties, "image", NULL ); + output = mlt_frame_rescale_yuv422( this, owidth, oheight ); + } else {