From e6d1a700e06ba8a985c29ba212b359c9e33bcc55 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Mon, 4 Dec 2006 22:25:13 +0000 Subject: trying an updated ffmpeg version (51.25.0) CVS patchset: 8405 CVS date: 2006/12/04 22:25:13 --- src/libffmpeg/libavcodec/bytestream.h | 89 +++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 src/libffmpeg/libavcodec/bytestream.h (limited to 'src/libffmpeg/libavcodec/bytestream.h') diff --git a/src/libffmpeg/libavcodec/bytestream.h b/src/libffmpeg/libavcodec/bytestream.h new file mode 100644 index 000000000..25c457fe4 --- /dev/null +++ b/src/libffmpeg/libavcodec/bytestream.h @@ -0,0 +1,89 @@ +/* + * Bytestream functions + * copyright (c) 2006 Baptiste Coudurier + * + * This file is part of FFmpeg. + * + * FFmpeg 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. + * + * 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef FFMPEG_BYTESTREAM_H +#define FFMPEG_BYTESTREAM_H + +static always_inline unsigned int bytestream_get_le32(uint8_t **b) +{ + (*b) += 4; + return LE_32(*b - 4); +} + +static always_inline unsigned int bytestream_get_le16(uint8_t **b) +{ + (*b) += 2; + return LE_16(*b - 2); +} + +static always_inline unsigned int bytestream_get_byte(uint8_t **b) +{ + (*b)++; + return (*b)[-1]; +} + +static always_inline unsigned int bytestream_get_buffer(uint8_t **b, uint8_t *dst, unsigned int size) +{ + memcpy(dst, *b, size); + (*b) += size; + return size; +} + +static always_inline void bytestream_put_be32(uint8_t **b, const unsigned int value) +{ + *(*b)++ = value >> 24; + *(*b)++ = value >> 16; + *(*b)++ = value >> 8; + *(*b)++ = value; +}; + +static always_inline void bytestream_put_be16(uint8_t **b, const unsigned int value) +{ + *(*b)++ = value >> 8; + *(*b)++ = value; +} + +static always_inline void bytestream_put_le32(uint8_t **b, const unsigned int value) +{ + *(*b)++ = value; + *(*b)++ = value >> 8; + *(*b)++ = value >> 16; + *(*b)++ = value >> 24; +} + +static always_inline void bytestream_put_le16(uint8_t **b, const unsigned int value) +{ + *(*b)++ = value; + *(*b)++ = value >> 8; +} + +static always_inline void bytestream_put_byte(uint8_t **b, const unsigned int value) +{ + *(*b)++ = value; +} + +static always_inline void bytestream_put_buffer(uint8_t **b, const uint8_t *src, unsigned int size) +{ + memcpy(*b, src, size); + (*b) += size; +} + +#endif /* FFMPEG_BYTESTREAM_H */ -- cgit v1.2.3 From 6e8ff6e5c232de4b8235626af31ab85345120a93 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sat, 13 Jan 2007 21:19:52 +0000 Subject: * ffmpeg update to 51.28.0 * Workaround ffmpeg buggy codecs that don't release their DR1 frames. * Fix several segfaults and freezing problem with H264 streams that use a lot of reference frames (eg. 15) * Initial support to enable/disable ffmpeg codecs. Codecs may be disabled in groups by --disable-ffmpeg-uncommon-codecs/--disable-ffmpeg-popular-codecs Think of "uncommon" codecs what people would never want to play with their PDAs (they will save memory by removing them). Note: currently both uncommon/popular codecs are _build_ but disabled. that is, build system still need some improvements to really save memory. warning: non-autoconf guru playing with the build system, likely breakage. CVS patchset: 8499 CVS date: 2007/01/13 21:19:52 --- src/libffmpeg/libavcodec/bytestream.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/libffmpeg/libavcodec/bytestream.h') diff --git a/src/libffmpeg/libavcodec/bytestream.h b/src/libffmpeg/libavcodec/bytestream.h index 25c457fe4..a742fa1c1 100644 --- a/src/libffmpeg/libavcodec/bytestream.h +++ b/src/libffmpeg/libavcodec/bytestream.h @@ -22,32 +22,32 @@ #ifndef FFMPEG_BYTESTREAM_H #define FFMPEG_BYTESTREAM_H -static always_inline unsigned int bytestream_get_le32(uint8_t **b) +static av_always_inline unsigned int bytestream_get_le32(uint8_t **b) { (*b) += 4; return LE_32(*b - 4); } -static always_inline unsigned int bytestream_get_le16(uint8_t **b) +static av_always_inline unsigned int bytestream_get_le16(uint8_t **b) { (*b) += 2; return LE_16(*b - 2); } -static always_inline unsigned int bytestream_get_byte(uint8_t **b) +static av_always_inline unsigned int bytestream_get_byte(uint8_t **b) { (*b)++; return (*b)[-1]; } -static always_inline unsigned int bytestream_get_buffer(uint8_t **b, uint8_t *dst, unsigned int size) +static av_always_inline unsigned int bytestream_get_buffer(uint8_t **b, uint8_t *dst, unsigned int size) { memcpy(dst, *b, size); (*b) += size; return size; } -static always_inline void bytestream_put_be32(uint8_t **b, const unsigned int value) +static av_always_inline void bytestream_put_be32(uint8_t **b, const unsigned int value) { *(*b)++ = value >> 24; *(*b)++ = value >> 16; @@ -55,13 +55,13 @@ static always_inline void bytestream_put_be32(uint8_t **b, const unsigned int va *(*b)++ = value; }; -static always_inline void bytestream_put_be16(uint8_t **b, const unsigned int value) +static av_always_inline void bytestream_put_be16(uint8_t **b, const unsigned int value) { *(*b)++ = value >> 8; *(*b)++ = value; } -static always_inline void bytestream_put_le32(uint8_t **b, const unsigned int value) +static av_always_inline void bytestream_put_le32(uint8_t **b, const unsigned int value) { *(*b)++ = value; *(*b)++ = value >> 8; @@ -69,18 +69,18 @@ static always_inline void bytestream_put_le32(uint8_t **b, const unsigned int va *(*b)++ = value >> 24; } -static always_inline void bytestream_put_le16(uint8_t **b, const unsigned int value) +static av_always_inline void bytestream_put_le16(uint8_t **b, const unsigned int value) { *(*b)++ = value; *(*b)++ = value >> 8; } -static always_inline void bytestream_put_byte(uint8_t **b, const unsigned int value) +static av_always_inline void bytestream_put_byte(uint8_t **b, const unsigned int value) { *(*b)++ = value; } -static always_inline void bytestream_put_buffer(uint8_t **b, const uint8_t *src, unsigned int size) +static av_always_inline void bytestream_put_buffer(uint8_t **b, const uint8_t *src, unsigned int size) { memcpy(*b, src, size); (*b) += size; -- cgit v1.2.3 From 7c3728d769962d288b73cc945c3143ae68726984 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sun, 28 Jan 2007 18:38:32 +0000 Subject: another ffmpeg sync to include h264 security fixes CVS patchset: 8573 CVS date: 2007/01/28 18:38:32 --- src/libffmpeg/libavcodec/bytestream.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libffmpeg/libavcodec/bytestream.h') diff --git a/src/libffmpeg/libavcodec/bytestream.h b/src/libffmpeg/libavcodec/bytestream.h index a742fa1c1..ae5438b49 100644 --- a/src/libffmpeg/libavcodec/bytestream.h +++ b/src/libffmpeg/libavcodec/bytestream.h @@ -25,13 +25,13 @@ static av_always_inline unsigned int bytestream_get_le32(uint8_t **b) { (*b) += 4; - return LE_32(*b - 4); + return AV_RL32(*b - 4); } static av_always_inline unsigned int bytestream_get_le16(uint8_t **b) { (*b) += 2; - return LE_16(*b - 2); + return AV_RL16(*b - 2); } static av_always_inline unsigned int bytestream_get_byte(uint8_t **b) -- cgit v1.2.3