Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2010-07-11 19:48:21 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2010-07-11 19:48:21 +0400
commit37d7b31251f90f4d9863d88b66e3d35d5e8129d4 (patch)
tree15dd76cc9489956e6bbc818b64a3491d94c74367 /src/filters/transform/MPCVideoDec
parent3ab0eed034a5faedb8beb7316829eb956788868f (diff)
updated ffmpeg
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2120 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform/MPCVideoDec')
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/ac3_parser.c2
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/avcodec.h7
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/cook.c16
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/flvdec.c4
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/golomb.h2
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h261dec.c4
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h263dec.c4
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mjpegdec.c4
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mpeg12.c12
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mpeg4videodec.c4
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/msmpeg4.c16
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/rv10.c8
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/sp5xdec.c4
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/utils.c7
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8.c4
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/wmv2dec.c4
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavutil/common.h63
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavutil/intmath.h37
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavutil/intreadwrite.h2
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavutil/lfg.c2
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavutil/lfg.h2
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavutil/pixdesc.c10
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavutil/pixdesc.h8
23 files changed, 162 insertions, 64 deletions
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/ac3_parser.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/ac3_parser.c
index 6331b64da..23629a645 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/ac3_parser.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/ac3_parser.c
@@ -181,7 +181,7 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info,
hdr_info->samples = hdr.num_blocks * 256;
if(hdr.bitstream_id>10)
hdr_info->codec_id = CODEC_ID_EAC3;
- else
+ else if (hdr_info->codec_id == CODEC_ID_NONE)
hdr_info->codec_id = CODEC_ID_AC3;
*need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT);
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/avcodec.h b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/avcodec.h
index 140ccfa8d..aeb684979 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/avcodec.h
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/avcodec.h
@@ -44,8 +44,8 @@
#include "libavutil/avutil.h"
#define LIBAVCODEC_VERSION_MAJOR 52
-#define LIBAVCODEC_VERSION_MINOR 79
-#define LIBAVCODEC_VERSION_MICRO 1
+#define LIBAVCODEC_VERSION_MINOR 80
+#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
@@ -2614,7 +2614,8 @@ typedef struct AVCodec {
const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
const enum SampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
const int64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
-
+ uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
+
/* ffmpeg-mt */
int (*init_thread_copy)(AVCodecContext *);
int (*update_thread_context)(AVCodecContext *dst, AVCodecContext *src);
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/cook.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/cook.c
index 33ca6071b..523cd4fb4 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/cook.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/cook.c
@@ -332,8 +332,8 @@ static av_cold int cook_decode_close(AVCodecContext *avctx)
/**
* Fill the gain array for the timedomain quantization.
*
- * @param gb pointer to the GetBitContext
- * @param gaininfo array of gain indexes
+ * @param gb pointer to the GetBitContext
+ * @param gaininfo[9] array of gain indexes
*/
static void decode_gain_info(GetBitContext *gb, int *gaininfo)
@@ -676,12 +676,12 @@ static void interpolate_float(COOKContext *q, float* buffer,
* Apply transform window, overlap buffers.
*
* @param q pointer to the COOKContext
- * @param buffer1 pointer to the mltcoefficients
+ * @param inbuffer pointer to the mltcoefficients
* @param gains_ptr current and previous gains
* @param previous_buffer pointer to the previous buffer to be used for overlapping
*/
-static void imlt_window_float (COOKContext *q, float *buffer1,
+static void imlt_window_float (COOKContext *q, float *inbuffer,
cook_gains *gains_ptr, float *previous_buffer)
{
const float fc = pow2tab[gains_ptr->previous[0] + 63];
@@ -694,7 +694,7 @@ static void imlt_window_float (COOKContext *q, float *buffer1,
/* Apply window and overlap */
for(i = 0; i < q->samples_per_channel; i++){
- buffer1[i] = buffer1[i] * fc * q->mlt_window[i] -
+ inbuffer[i] = inbuffer[i] * fc * q->mlt_window[i] -
previous_buffer[i] * q->mlt_window[q->samples_per_channel - 1 - i];
}
}
@@ -891,7 +891,7 @@ saturate_output_float (COOKContext *q, int chan, int16_t *out)
*
* @param q pointer to the COOKContext
* @param decode_buffer pointer to the mlt coefficients
- * @param gains array of current/prev gain pointers
+ * @param gains_ptr array of current/prev gain pointers
* @param previous_buffer pointer to the previous buffer to be used for overlapping
* @param out pointer to the output buffer
* @param chan 0: left or single channel, 1: right channel
@@ -899,10 +899,10 @@ saturate_output_float (COOKContext *q, int chan, int16_t *out)
static inline void
mlt_compensate_output(COOKContext *q, float *decode_buffer,
- cook_gains *gains, float *previous_buffer,
+ cook_gains *gains_ptr, float *previous_buffer,
int16_t *out, int chan)
{
- imlt_gain(q, decode_buffer, gains, previous_buffer);
+ imlt_gain(q, decode_buffer, gains_ptr, previous_buffer);
q->saturate_output (q, chan, out);
}
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/flvdec.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/flvdec.c
index 372460a76..f1556167e 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/flvdec.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/flvdec.c
@@ -132,4 +132,8 @@ AVCodec flv_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name = */NULL_IF_CONFIG_SMALL("Flash Video (FLV) / Sorenson Spark / Sorenson H.263"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres= */3,
};
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/golomb.h b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/golomb.h
index e7719d65b..3899af4cf 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/golomb.h
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/golomb.h
@@ -37,7 +37,9 @@ extern "C" {
#include <stdint.h>
#include "get_bits.h"
#include "put_bits.h"
+#ifdef HAVE_AV_CONFIG_H
#include "libavutil/common.h"
+#endif
#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h261dec.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h261dec.c
index 8f7edac53..f2c07df20 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h261dec.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h261dec.c
@@ -654,4 +654,8 @@ AVCodec h261_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name = */NULL_IF_CONFIG_SMALL("H.261"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres = */3,
};
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h263dec.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h263dec.c
index b5c5c37f4..5793dd1af 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h263dec.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h263dec.c
@@ -716,4 +716,8 @@ AVCodec h263_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name = */NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres = */3,
};
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mjpegdec.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mjpegdec.c
index 059d8c55e..414601697 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mjpegdec.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mjpegdec.c
@@ -1491,4 +1491,8 @@ AVCodec mjpeg_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name = */NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres = */8,
};
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mpeg12.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mpeg12.c
index 04fd547cd..99ff3fa62 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mpeg12.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mpeg12.c
@@ -2522,6 +2522,10 @@ AVCodec mpeg1video_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name= */NULL_IF_CONFIG_SMALL("MPEG-1 video"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres = */3,
};
AVCodec mpeg2video_decoder = {
@@ -2541,6 +2545,10 @@ AVCodec mpeg2video_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name= */NULL_IF_CONFIG_SMALL("MPEG-2 video"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres = */3,
};
//legacy decoder
@@ -2559,4 +2567,8 @@ AVCodec mpegvideo_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name= */NULL_IF_CONFIG_SMALL("MPEG-1 video"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres = */3,
};
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mpeg4videodec.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mpeg4videodec.c
index bbc518f0f..539d3a451 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mpeg4videodec.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mpeg4videodec.c
@@ -2255,4 +2255,8 @@ AVCodec mpeg4_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name= */NULL_IF_CONFIG_SMALL("MPEG-4 part 2"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres = */3,
};
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/msmpeg4.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/msmpeg4.c
index a3c9e2aeb..4983fa7fa 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/msmpeg4.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/msmpeg4.c
@@ -1934,6 +1934,10 @@ AVCodec msmpeg4v1_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name = */NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres = */3,
};
AVCodec msmpeg4v2_decoder = {
@@ -1951,6 +1955,10 @@ AVCodec msmpeg4v2_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name = */NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres = */3,
};
AVCodec msmpeg4v3_decoder = {
@@ -1968,6 +1976,10 @@ AVCodec msmpeg4v3_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name = */NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres = */3,
};
AVCodec wmv1_decoder = {
@@ -1985,4 +1997,8 @@ AVCodec wmv1_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name = */NULL_IF_CONFIG_SMALL("Windows Media Video 7"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres = */3,
};
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/rv10.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/rv10.c
index 04ad5ebe3..de7e3beca 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/rv10.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/rv10.c
@@ -719,6 +719,10 @@ AVCodec rv10_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name = */NULL_IF_CONFIG_SMALL("RealVideo 1.0"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres = */3,
};
AVCodec rv20_decoder = {
@@ -736,4 +740,8 @@ AVCodec rv20_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name = */NULL_IF_CONFIG_SMALL("RealVideo 2.0"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres = */3,
};
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/sp5xdec.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/sp5xdec.c
index 09ae52f04..a63d52259 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/sp5xdec.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/sp5xdec.c
@@ -202,6 +202,10 @@ AVCodec sp5x_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name = */NULL_IF_CONFIG_SMALL("Sunplus JPEG (SP5X)"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres = */5,
};
AVCodec amv_decoder = {
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/utils.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/utils.c
index c748770e2..1391625c0 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/utils.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/utils.c
@@ -500,6 +500,13 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
avctx->codec_id = codec->id; /* ffdshow custom code */
avctx->frame_number = 0;
if(avctx->codec->init){
+ if(avctx->codec_type == AVMEDIA_TYPE_VIDEO &&
+ avctx->codec->max_lowres < avctx->lowres){
+ av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n",
+ avctx->codec->max_lowres);
+ goto free_and_end;
+ }
+
ret = avctx->codec->init(avctx);
if (ret < 0) {
goto free_and_end;
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8.c
index 60825905b..2c3405aba 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8.c
@@ -744,6 +744,9 @@ static void decode_mb_mode(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y,
}
/**
+ * @param c arithmetic bitstream reader context
+ * @param block destination for block coefficients
+ * @param probs probabilities to use when reading trees from the bitstream
* @param i initial coeff index, 0 unless a separate DC block is coded
* @param zero_nhood the initial prediction context for number of surrounding
* all-zero blocks (only left/top, so 0-2)
@@ -924,6 +927,7 @@ static void intra_predict(VP8Context *s, uint8_t *dst[3], VP8Macroblock *mb,
* @param width width of src/dst plane data
* @param height height of src/dst plane data
* @param linesize size of a single line of plane data, including padding
+ * @param mc_func motion compensation function pointers (bilinear or sixtap MC)
*/
static inline void vp8_mc(VP8Context *s, int luma,
uint8_t *dst, uint8_t *src, const VP56mv *mv,
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/wmv2dec.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/wmv2dec.c
index 0dea3b171..407b9355b 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/wmv2dec.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/wmv2dec.c
@@ -499,4 +499,8 @@ AVCodec wmv2_decoder = {
/*.supported_framerates = */NULL,
/*.pix_fmts = */NULL,
/*.long_name = */NULL_IF_CONFIG_SMALL("Windows Media Video 8"),
+ /*.supported_samplerates = */NULL,
+ /*.sample_fmts = */NULL,
+ /*.channel_layouts = */NULL,
+ /*.max_lowres = */3,
};
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/common.h b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/common.h
index 722a50c32..13fc7cdc2 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/common.h
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/common.h
@@ -96,12 +96,8 @@ static inline av_const int av_log2_16bit_c(unsigned int v)
# include "intmath.h"
#endif
-#ifndef av_log2
-# define av_log2 av_log2_c
-#endif
-#ifndef av_log2_16bit
-# define av_log2_16bit av_log2_16bit_c
-#endif
+/* Pull in unguarded fallback defines at the end of this file. */
+#include "common.h"
/**
* Clip a signed integer value into the amin-amax range.
@@ -110,7 +106,7 @@ static inline av_const int av_log2_16bit_c(unsigned int v)
* @param amax maximum value of the clip range
* @return clipped value
*/
-static inline av_const int av_clip(int a, int amin, int amax)
+static inline av_const int av_clip_c(int a, int amin, int amax)
{
if (a < amin) return amin;
else if (a > amax) return amax;
@@ -122,7 +118,7 @@ static inline av_const int av_clip(int a, int amin, int amax)
* @param a value to clip
* @return clipped value
*/
-static inline av_const uint8_t av_clip_uint8(int a)
+static inline av_const uint8_t av_clip_uint8_c(int a)
{
if (a&(~0xFF)) return (-a)>>31;
else return a;
@@ -133,7 +129,7 @@ static inline av_const uint8_t av_clip_uint8(int a)
* @param a value to clip
* @return clipped value
*/
-static inline av_const int8_t av_clip_int8(int a)
+static inline av_const int8_t av_clip_int8_c(int a)
{
if ((a+0x80) & ~0xFF) return (a>>31) ^ 0x7F;
else return a;
@@ -144,7 +140,7 @@ static inline av_const int8_t av_clip_int8(int a)
* @param a value to clip
* @return clipped value
*/
-static inline av_const uint16_t av_clip_uint16(int a)
+static inline av_const uint16_t av_clip_uint16_c(int a)
{
if (a&(~0xFFFF)) return (-a)>>31;
else return a;
@@ -155,7 +151,7 @@ static inline av_const uint16_t av_clip_uint16(int a)
* @param a value to clip
* @return clipped value
*/
-static inline av_const int16_t av_clip_int16(int a)
+static inline av_const int16_t av_clip_int16_c(int a)
{
if ((a+0x8000) & ~0xFFFF) return (a>>31) ^ 0x7FFF;
else return a;
@@ -166,7 +162,7 @@ static inline av_const int16_t av_clip_int16(int a)
* @param a value to clip
* @return clipped value
*/
-static inline av_const int32_t av_clipl_int32(int64_t a)
+static inline av_const int32_t av_clipl_int32_c(int64_t a)
{
if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (a>>63) ^ 0x7FFFFFFF;
else return a;
@@ -179,7 +175,7 @@ static inline av_const int32_t av_clipl_int32(int64_t a)
* @param amax maximum value of the clip range
* @return clipped value
*/
-static inline av_const float av_clipf(float a, float amin, float amax)
+static inline av_const float av_clipf_c(float a, float amin, float amax)
{
if (a < amin) return amin;
else if (a > amax) return amax;
@@ -190,7 +186,7 @@ static inline av_const float av_clipf(float a, float amin, float amax)
* @param x value used to compute ceil(log2(x))
* @return computed ceiling of log2(x)
*/
-static inline av_const int av_ceil_log2(int x)
+static inline av_const int av_ceil_log2_c(int x)
{
return av_log2((x - 1) << 1);
}
@@ -320,3 +316,42 @@ static inline av_const int av_ceil_log2(int x)
#endif /* HAVE_AV_CONFIG_H */
#endif /* AVUTIL_COMMON_H */
+
+#ifdef HAVE_AV_CONFIG_H
+/*
+ * The following definitions are outside the multiple inclusion guard
+ * to ensure they are immediately available in intmath.h.
+ */
+
+#ifndef av_log2
+# define av_log2 av_log2_c
+#endif
+#ifndef av_log2_16bit
+# define av_log2_16bit av_log2_16bit_c
+#endif
+#ifndef av_ceil_log2
+# define av_ceil_log2 av_ceil_log2_c
+#endif
+#ifndef av_clip
+# define av_clip av_clip_c
+#endif
+#ifndef av_clip_uint8
+# define av_clip_uint8 av_clip_uint8_c
+#endif
+#ifndef av_clip_int8
+# define av_clip_int8 av_clip_int8_c
+#endif
+#ifndef av_clip_uint16
+# define av_clip_uint16 av_clip_uint16_c
+#endif
+#ifndef av_clip_int16
+# define av_clip_int16 av_clip_int16_c
+#endif
+#ifndef av_clipl_int32
+# define av_clipl_int32 av_clipl_int32_c
+#endif
+#ifndef av_clipf
+# define av_clipf av_clipf_c
+#endif
+
+#endif /* HAVE_AV_CONFIG_H */
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/intmath.h b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/intmath.h
index 052b61406..8d5433682 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/intmath.h
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/intmath.h
@@ -34,43 +34,24 @@ extern const uint32_t ff_inverse[257];
#if HAVE_FAST_CLZ && AV_GCC_VERSION_AT_LEAST(3,4)
#ifndef av_log2
-
-#define av_log2(x) (31 - __builtin_clz((x)|1))
-
-#ifndef av_log2_16bit
-#define av_log2_16bit av_log2
-#endif
-
+# define av_log2(x) (31 - __builtin_clz((x)|1))
+# ifndef av_log2_16bit
+# define av_log2_16bit av_log2
+# endif
#endif /* av_log2 */
#endif /* AV_GCC_VERSION_AT_LEAST(3,4) */
#ifndef FASTDIV
-
-#if CONFIG_FASTDIV
-# define FASTDIV(a,b) ((uint32_t)((((uint64_t)a) * ff_inverse[b]) >> 32))
-#else
-# define FASTDIV(a,b) ((a) / (b))
-#endif
-
+# if CONFIG_FASTDIV
+# define FASTDIV(a,b) ((uint32_t)((((uint64_t)a) * ff_inverse[b]) >> 32))
+# else
+# define FASTDIV(a,b) ((a) / (b))
+# endif
#endif /* FASTDIV */
-/*
- * Get definition of av_log2_c from common.h. In the event we got
- * here through common.h including this file, including it again will
- * be a no-op due to multi-inclusion guards, so we must duplicate the
- * fallback defines here.
- */
-
#include "common.h"
-#ifndef av_log2
-# define av_log2 av_log2_c
-#endif
-#ifndef av_log2_16bit
-# define av_log2_16bit av_log2_16bit_c
-#endif
-
extern const uint8_t ff_sqrt_tab[256];
static inline av_const unsigned int ff_sqrt(unsigned int a)
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/intreadwrite.h b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/intreadwrite.h
index 39fb9155b..6fbf2a1e2 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/intreadwrite.h
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/intreadwrite.h
@@ -21,8 +21,8 @@
#include <stdint.h>
#include "config.h"
+#include "attributes.h"
#include "bswap.h"
-#include "common.h"
/* ffdshow custom code */
#if defined(_MSC_VER)
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/lfg.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/lfg.c
index 09a7104a6..fc908d826 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/lfg.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/lfg.c
@@ -20,6 +20,8 @@
*/
#include <inttypes.h>
+#include <limits.h>
+#include <math.h>
#include "lfg.h"
#include "md5.h"
#include "intreadwrite.h"
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/lfg.h b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/lfg.h
index 68d4ee027..c7ebfdd72 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/lfg.h
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/lfg.h
@@ -57,7 +57,7 @@ static av_always_inline unsigned int av_mlfg_get(AVLFG *c){
* Get the next two numbers generated by a Box-Muller Gaussian
* generator using the random numbers issued by lfg.
*
- * @param out array where the two generated numbers are placed
+ * @param out[2] array where the two generated numbers are placed
*/
void av_bmg_get(AVLFG *lfg, double out[2]);
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/pixdesc.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/pixdesc.c
index 5f8d8144b..08daaa307 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/pixdesc.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/pixdesc.c
@@ -19,14 +19,16 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <stdio.h>
+#include <string.h>
#include "pixfmt.h"
#include "pixdesc.h"
#include "intreadwrite.h"
#include "common.h" /* for MSVC */
-void read_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4],
- const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component)
+void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4],
+ const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component)
{
AVComponentDescriptor comp= desc->comp[c];
int plane= comp.plane;
@@ -66,8 +68,8 @@ void read_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4],
}
}
-void write_line(const uint16_t *src, uint8_t *data[4], const int linesize[4],
- const AVPixFmtDescriptor *desc, int x, int y, int c, int w)
+void av_write_image_line(const uint16_t *src, uint8_t *data[4], const int linesize[4],
+ const AVPixFmtDescriptor *desc, int x, int y, int c, int w)
{
AVComponentDescriptor comp = desc->comp[c];
int plane = comp.plane;
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/pixdesc.h b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/pixdesc.h
index e5e11c477..add84785e 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/pixdesc.h
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavutil/pixdesc.h
@@ -108,8 +108,8 @@ extern const AVPixFmtDescriptor av_pix_fmt_descriptors[];
* component c in data[1] to dst, rather than the palette indexes in
* data[0]. The behavior is undefined if the format is not paletted.
*/
-void read_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4],
- const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component);
+void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4],
+ const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component);
/**
* Write the values from src to the pixel format component c of an
@@ -125,8 +125,8 @@ void read_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4],
* @param w the width of the line to write, that is the number of
* values to write to the image line
*/
-void write_line(const uint16_t *src, uint8_t *data[4], const int linesize[4],
- const AVPixFmtDescriptor *desc, int x, int y, int c, int w);
+void av_write_image_line(const uint16_t *src, uint8_t *data[4], const int linesize[4],
+ const AVPixFmtDescriptor *desc, int x, int y, int c, int w);
/**
* Return the pixel format corresponding to name.