diff options
Diffstat (limited to 'libpostproc')
-rw-r--r-- | libpostproc/Makefile | 2 | ||||
-rw-r--r-- | libpostproc/postprocess.c | 24 | ||||
-rw-r--r-- | libpostproc/postprocess.h | 18 | ||||
-rw-r--r-- | libpostproc/postprocess_altivec_template.c | 8 | ||||
-rw-r--r-- | libpostproc/postprocess_internal.h | 8 | ||||
-rw-r--r-- | libpostproc/postprocess_template.c | 8 |
6 files changed, 40 insertions, 28 deletions
diff --git a/libpostproc/Makefile b/libpostproc/Makefile index 11de3d3235..02257420e9 100644 --- a/libpostproc/Makefile +++ b/libpostproc/Makefile @@ -1,3 +1,5 @@ +include $(SUBDIR)../config.mak + NAME = postproc FFLIBS = avutil diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c index dd50daf21e..589c2cead6 100644 --- a/libpostproc/postprocess.c +++ b/libpostproc/postprocess.c @@ -3,20 +3,20 @@ * * AltiVec optimizations (C) 2004 Romain Dolbeau <romain@dolbeau.org> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or modify + * FFmpeg 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. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg 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. * * You should have received a copy of the GNU General Public License - * along with Libav; if not, write to the Free Software + * along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -95,13 +95,13 @@ unsigned postproc_version(void) const char *postproc_configuration(void) { - return LIBAV_CONFIGURATION; + return FFMPEG_CONFIGURATION; } const char *postproc_license(void) { #define LICENSE_PREFIX "libpostproc license: " - return LICENSE_PREFIX LIBAV_LICENSE + sizeof(LICENSE_PREFIX) - 1; + return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; } #if HAVE_ALTIVEC_H @@ -696,7 +696,11 @@ static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[] /* -pp Command line Help */ +#if LIBPOSTPROC_VERSION_INT < (52<<16) +const char *const pp_help= +#else const char pp_help[] = +#endif "Available postprocessing filters:\n" "Filters Options\n" "short long name short long option Description\n" @@ -763,7 +767,8 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality) ppMode->maxClippedThreshold= 0.01; ppMode->error=0; - av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE); + memset(temp, 0, GET_MODE_BUFFER_SIZE); + av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE - 1); av_log(NULL, AV_LOG_DEBUG, "pp: %s\n", name); @@ -814,12 +819,11 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality) int plen; int spaceLeft; - if(p==NULL) p= temp, *p=0; //last filter - else p--, *p=','; //not last filter + p--, *p=','; plen= strlen(p); spaceLeft= p - temp + plen; - if(spaceLeft + newlen >= GET_MODE_BUFFER_SIZE){ + if(spaceLeft + newlen >= GET_MODE_BUFFER_SIZE - 1){ ppMode->error++; break; } diff --git a/libpostproc/postprocess.h b/libpostproc/postprocess.h index fe8c9b96ce..0713c47956 100644 --- a/libpostproc/postprocess.h +++ b/libpostproc/postprocess.h @@ -1,20 +1,20 @@ /* * Copyright (C) 2001-2003 Michael Niedermayer (michaelni@gmx.at) * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or modify + * FFmpeg 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. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg 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. * * You should have received a copy of the GNU General Public License - * along with Libav; if not, write to the Free Software + * along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -29,8 +29,8 @@ #include "libavutil/avutil.h" -#define LIBPOSTPROC_VERSION_MAJOR 52 -#define LIBPOSTPROC_VERSION_MINOR 0 +#define LIBPOSTPROC_VERSION_MAJOR 51 +#define LIBPOSTPROC_VERSION_MINOR 2 #define LIBPOSTPROC_VERSION_MICRO 0 #define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \ @@ -67,7 +67,13 @@ const char *postproc_license(void); typedef void pp_context; typedef void pp_mode; +#if LIBPOSTPROC_VERSION_INT < (52<<16) +typedef pp_context pp_context_t; +typedef pp_mode pp_mode_t; +extern const char *const pp_help; ///< a simple help text +#else extern const char pp_help[]; ///< a simple help text +#endif void pp_postprocess(const uint8_t * src[3], const int srcStride[3], uint8_t * dst[3], const int dstStride[3], diff --git a/libpostproc/postprocess_altivec_template.c b/libpostproc/postprocess_altivec_template.c index 56d7b1660a..c53ebc0b4a 100644 --- a/libpostproc/postprocess_altivec_template.c +++ b/libpostproc/postprocess_altivec_template.c @@ -3,20 +3,20 @@ * * based on code by Copyright (C) 2001-2003 Michael Niedermayer (michaelni@gmx.at) * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or modify + * FFmpeg 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. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg 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. * * You should have received a copy of the GNU General Public License - * along with Libav; if not, write to the Free Software + * along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/libpostproc/postprocess_internal.h b/libpostproc/postprocess_internal.h index 010e629390..3bc51c49a4 100644 --- a/libpostproc/postprocess_internal.h +++ b/libpostproc/postprocess_internal.h @@ -1,20 +1,20 @@ /* * Copyright (C) 2001-2002 Michael Niedermayer (michaelni@gmx.at) * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or modify + * FFmpeg 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. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg 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. * * You should have received a copy of the GNU General Public License - * along with Libav; if not, write to the Free Software + * along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/libpostproc/postprocess_template.c b/libpostproc/postprocess_template.c index 3b6d0f88f9..918d005fa7 100644 --- a/libpostproc/postprocess_template.c +++ b/libpostproc/postprocess_template.c @@ -1,20 +1,20 @@ /* * Copyright (C) 2001-2002 Michael Niedermayer (michaelni@gmx.at) * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or modify + * FFmpeg 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. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg 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. * * You should have received a copy of the GNU General Public License - * along with Libav; if not, write to the Free Software + * along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ |