diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-04-28 13:39:44 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-04-28 13:39:44 +0400 |
commit | e5c70b9952f042468b22b1be5e365864af73a2bd (patch) | |
tree | e0d57bb9ab917e388fc1c9d8f5c58ce2f7003e99 /src | |
parent | aa39873281217e6ed92899bc3f2ade5146e5ae38 (diff) |
updated ffmpeg
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1818 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src')
8 files changed, 43 insertions, 14 deletions
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/ac3dec.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/ac3dec.c index 8c2387e07..6028824e4 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/ac3dec.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/ac3dec.c @@ -1418,7 +1418,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size, out_samples += 256 * s->out_channels; } *data_size = s->num_blocks * 256 * avctx->channels * sizeof (int16_t); - return s->frame_size; + return FFMIN(buf_size, s->frame_size); } /** diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/imgconvert.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/imgconvert.c index 55891b45f..77bc77a5c 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/imgconvert.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/imgconvert.c @@ -20,7 +20,7 @@ */
/**
- * @file libavcodec/imgconvert.c
+ * @file
* misc image conversion routines
*/
@@ -704,6 +704,11 @@ const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt) return av_pix_fmt_descriptors[pix_fmt].name;
}
+int ff_is_hwaccel_pix_fmt(enum PixelFormat pix_fmt)
+{
+ return av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_HWACCEL;
+}
+
int ff_set_systematic_pal(uint32_t pal[256], enum PixelFormat pix_fmt){
int i;
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/internal.h b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/internal.h index 774bdb95d..7be87fed3 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/internal.h +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/internal.h @@ -17,7 +17,7 @@ */
/**
- * @file libavcodec/internal.h
+ * @file
* common internal api header.
*/
@@ -28,6 +28,11 @@ #include "avcodec.h"
/**
+ * Determines whether pix_fmt is a hardware accelerated format.
+ */
+int ff_is_hwaccel_pix_fmt(enum PixelFormat pix_fmt);
+
+/**
* Return the index into tab at which {a,b} match elements {[0],[1]} of tab.
* If there is no such matching pair then size is returned.
*/
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/parser.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/parser.c index 860f26f54..09716e6f4 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/parser.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/parser.c @@ -91,7 +91,7 @@ void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove){ if ( s->cur_offset + off >= s->cur_frame_offset[i]
&& (s->frame_offset < s->cur_frame_offset[i] ||
(!s->frame_offset && !s->next_frame_offset)) // first field/frame
- //check is disabled becausue mpeg-ts doesnt send complete PES packets
+ //check is disabled because mpeg-ts doesnt send complete PES packets
&& /*s->next_frame_offset + off <*/ s->cur_frame_end[i]){
s->dts= s->cur_frame_dts[i];
s->pts= s->cur_frame_pts[i];
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/utils.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/utils.c index 04daf734f..8507fd480 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/utils.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/utils.c @@ -21,7 +21,7 @@ */
/**
- * @file libavcodec/utils.c
+ * @file
* utils.
*/
@@ -217,7 +217,7 @@ int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h){ return 0;
av_log(av_log_ctx, AV_LOG_ERROR, "picture size invalid (%ux%u)\n", w, h);
- return -1;
+ return AVERROR(EINVAL);
}
int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){
@@ -432,6 +432,8 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, }
enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat *fmt){
+ while (*fmt != PIX_FMT_NONE && ff_is_hwaccel_pix_fmt(*fmt))
+ ++fmt;
return fmt[0];
}
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/common.h b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/common.h index bd0d079ea..128c69907 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/common.h +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/common.h @@ -19,7 +19,7 @@ */
/**
- * @file libavutil/common.h
+ * @file
* common internal and external API header
*/
@@ -151,6 +151,17 @@ static inline av_const int16_t av_clip_int16(int a) }
/**
+ * Clips a signed 64-bit integer value into the -2147483648,2147483647 range.
+ * @param a value to clip
+ * @return clipped value
+ */
+static inline av_const int32_t av_clipl_int32(int64_t a)
+{
+ if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (a>>63) ^ 0x7FFFFFFF;
+ else return a;
+}
+
+/**
* Clips a float value into the amin-amax range.
* @param a value to clip
* @param amin minimum value of the clip range
@@ -302,9 +313,4 @@ static inline av_const int av_ceil_log2(int x) # include "internal.h"
#endif /* HAVE_AV_CONFIG_H */
-/* Suppress restrict if it was not defined in config.h. */
-#ifndef restrict
-# define restrict
-#endif
-
#endif /* AVUTIL_COMMON_H */
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/libm.h b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/libm.h index 0b85fa7a4..bfa69889d 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/libm.h +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/libm.h @@ -17,7 +17,7 @@ */ /** - * @file libavutil/libm.h + * @file * Replacements for frequently missing libm functions */ @@ -44,6 +44,10 @@ #define llrint(x) ((long long)rint(x)) #endif +#ifndef llrintf +#define llrintf(x) ((long long)rint(x)) +#endif + #ifndef log2 #define log2(x) (log(x) * 1.44269504088896340736) #endif diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/log.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/log.c index 7da2a01fa..9358894e8 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/log.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/log.c @@ -20,10 +20,12 @@ */
/**
- * @file libavutil/log.c
+ * @file
* logging functions
*/
+#include <unistd.h>
+#include <stdlib.h>
#include "avutil.h"
#include "log.h"
@@ -74,7 +76,12 @@ void av_log(void* avcl, int level, const char *fmt, ...) void av_vlog(void* avcl, int level, const char *fmt, va_list vl)
{
+#if USE_DPRINTF
+ allowDPRINTF=1;
+ DPRINTFA(fmt, vl);
+#else
av_log_callback(avcl, level, fmt, vl);
+#endif
}
int av_log_get_level(void)
|