diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-07-01 22:43:43 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-07-01 22:43:43 +0400 |
commit | a260f0cb99fc88f9ebdee5893d90132cf13650e0 (patch) | |
tree | e4629ac1113fe044c635fc348504f500e481dcfa | |
parent | 5a9717449b04649884a7394cc84c34d03450961e (diff) |
updated ffmpeg
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2095 10f7b99b-c216-0410-bff0-8a66a9350fd8
18 files changed, 34 insertions, 289 deletions
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/config.h b/src/filters/transform/MPCVideoDec/ffmpeg/config.h index af97f858b..22020397f 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/config.h +++ b/src/filters/transform/MPCVideoDec/ffmpeg/config.h @@ -153,7 +153,6 @@ Note: when adding a new codec, you have to: #define CONFIG_AVS_DECODER 0
#define CONFIG_CAVS_DECODER 0
#define CONFIG_CINEPAK_DECODER 0
-#define CONFIG_COREPNG_DECODER 0
#define CONFIG_CSCD_DECODER 0
#define CONFIG_CYUV_DECODER 0
#define CONFIG_DVVIDEO_DECODER 0
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/custom_code.txt b/src/filters/transform/MPCVideoDec/ffmpeg/custom_code.txt index ec18f27e1..58e9ce8e1 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/custom_code.txt +++ b/src/filters/transform/MPCVideoDec/ffmpeg/custom_code.txt @@ -9,13 +9,8 @@ The following files have MPC-specific custom code (compared to ffdshow): * libavcodec/CompilatorVersion.c
* libavcodec/dsputil.c
* libavcodec/h264.c
-* libavcodec/mpeg12.c
* libavcodec/mpc_helper.c
+* libavcodec/mpeg12.c
* libavcodec/vp3.c
* libavutil/internal.h
* libavutil/log.h
-
-The following files have MPC-specific custom code (compared to ffmpeg):
-* libavcodec/vp8.c
-* libavcodec/vp8data.h
-* libavcodec/vp8dsp.c
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/ffcodecs.h b/src/filters/transform/MPCVideoDec/ffmpeg/ffcodecs.h index f8f0abcb8..ea7197265 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/ffcodecs.h +++ b/src/filters/transform/MPCVideoDec/ffmpeg/ffcodecs.h @@ -45,7 +45,6 @@ CODEC_OP(CODEC_ID_FFV1 ,35,"ffv1") \
CODEC_OP(CODEC_ID_ZMBV ,36,"zmbv") \
CODEC_OP(CODEC_ID_PNG ,37,"png") \
- CODEC_OP(CODEC_ID_COREPNG ,38,"corepng") \
CODEC_OP(CODEC_ID_LJPEG ,39,"ljpeg") \
CODEC_OP(CODEC_ID_JPEGLS ,40,"jpegls") \
CODEC_OP(CODEC_ID_CSCD ,41,"camstudio") \
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/allcodecs.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/allcodecs.c index 79a6ae32b..ad49dfdb7 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/allcodecs.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/allcodecs.c @@ -54,7 +54,6 @@ void avcodec_register_all(void) //REGISTER_DECODER (AVS, avs);
//REGISTER_DECODER (CAVS, cavs);
//REGISTER_DECODER (CINEPAK, cinepak);
- //REGISTER_DECODER (COREPNG, corepng);
//REGISTER_DECODER (CSCD, cscd);
//REGISTER_DECODER (CYUV, cyuv);
//REGISTER_ENCDEC (DVVIDEO, dvvideo);
@@ -131,8 +130,11 @@ void avcodec_register_all(void) //REGISTER_DECODER (MACE6, mace6);
REGISTER_DECODER (MLP, mlp);
//REGISTER_DECODER (MP1, mp1);
+ //REGISTER_DECODER (MP1FLOAT, mp1float);
//REGISTER_DECODER (MP2, mp2);
+ //REGISTER_DECODER (MP2FLOAT, mp2float);
//REGISTER_DECODER (MP3, mp3);
+ //REGISTER_DECODER (MP3FLOAT, mp3float);
//REGISTER_DECODER (MSGSM, msgsm);
REGISTER_DECODER (NELLYMOSER, nellymoser);
//REGISTER_DECODER (QDM2, qdm2);
@@ -144,6 +146,7 @@ void avcodec_register_all(void) //REGISTER_DECODER (VORBIS, vorbis);
//REGISTER_DECODER (WMAV1, wmav1);
//REGISTER_DECODER (WMAV2, wmav2);
+ //REGISTER_DECODER (WAVPACK, wavpack);
/* PCM codecs */
//REGISTER_DECODER (PCM_ALAW, pcm_alaw);
@@ -177,6 +180,6 @@ void avcodec_register_all(void) REGISTER_PARSER (AC3, ac3);
//REGISTER_PARSER (DCA, dca);
REGISTER_PARSER (MLP, mlp);
- //REGISTER_PARSER (MPEGAUDIO, mpegaudio);
+ //REGISTER_PARSER (MPEGAUDIO, mpegaudio);
}
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/avcodec.h b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/avcodec.h index c8283a9dc..84e6ac199 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/avcodec.h +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/avcodec.h @@ -71,14 +71,6 @@ enum CodecType { CODEC_TYPE_NB
};
-/**
- * Needed for CorePNG
- */
-enum CorePNGFrameType {
- SAMPLE_I,
- SAMPLE_P
-};
-
#if LIBAVCODEC_VERSION_MAJOR < 53
#define CodecType AVMediaType
@@ -2476,7 +2468,6 @@ typedef struct AVCodecContext { void (*handle_user_data)(struct AVCodecContext *c,const uint8_t *buf,int buf_size);
int h264_has_to_drop_first_non_ref; // Workaround Haali's media splitter (http://forum.doom9.org/showthread.php?p=1226434#post1226434)
- enum CorePNGFrameType corepng_frame_type;
/**
* Force 4:3 or 16:9 as DAR (MPEG-2 only)
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/corepng.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/corepng.c deleted file mode 100644 index 04a9fd685..000000000 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/corepng.c +++ /dev/null @@ -1,195 +0,0 @@ -/*
- * 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 of the License, or (at your option) any later version.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * 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 "avcodec.h"
-#include "common.h"
-#include "dsputil.h"
-
-#define PNGFrameType_RGB24 0x01
-#define PNGFrameType_YUY2 0x02
-#define PNGFrameType_YV12 0x03
-
-extern AVCodec png_decoder;
-
-typedef struct CorePNGCodecPrivate {
- int16_t wSize;
- int8_t bType;
-} CorePNGCodecPrivate;
-
-typedef struct CorePNGcontext{
- AVCodecContext *avctx;
- DSPContext dsp;
- AVFrame picture,prev_picture;
- CorePNGCodecPrivate private;
- uint8_t *buf;int buf_size;
- int shiftX,shiftY;
- AVCodecContext *decctx;
- AVFrame decframe;
-} CorePNGcontext;
-
-static int read_image(CorePNGcontext * const a, uint8_t *ptr, int linesize,int flip)
-{
- int got_picture=0,ret;
- a->decframe.data[0]=ptr;
- a->decframe.linesize[0]=linesize*(flip?-1:1);
- ret=avcodec_decode_video(a->decctx,&a->decframe,&got_picture,a->buf,a->buf_size);
- if(ret>0){
- a->buf+=ret;
- a->buf_size-=ret;
- }
- return 0;
-}
-
-static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
- uint8_t *buf, int buf_size)
-{
- CorePNGcontext * const a = avctx->priv_data;
- int Bpp,num_planes,swapUV=0;
- AVFrame temp,*p;
-
- if (!a->decctx) {
- a->decctx=avcodec_alloc_context();
- avcodec_open(a->decctx,&png_decoder);
- avcodec_get_frame_defaults(&a->decframe);
- }
-
- temp= a->picture;
- a->picture= a->prev_picture;
- a->prev_picture= temp;
-
- p= &a->picture;
- avctx->coded_frame= p;
-
- avctx->flags |= CODEC_FLAG_EMU_EDGE; // alternatively we would have to use our own buffer management
-
- if(p->data[0])
- avctx->release_buffer(avctx, p);
-
- p->reference= 1;
- if(avctx->get_buffer(avctx, p) < 0){
- av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
- return -1;
- }
-
- /* special case for last picture */
- if (buf_size == 0) {
- return 0;
- }
-
- a->buf=buf;a->buf_size=buf_size;
-
- switch(a->private.bType){
- case PNGFrameType_RGB24:
- read_image(a,a->picture.data[0],a->picture.linesize[0],0);
- Bpp=3;num_planes=1;
- break;
- case PNGFrameType_YUY2:
- swapUV=1;
- case PNGFrameType_YV12:
- read_image(a,a->picture.data[0],a->picture.linesize[0],1);
- read_image(a,a->picture.data[swapUV?1:2],a->picture.linesize[swapUV?1:2],1);
- read_image(a,a->picture.data[swapUV?2:1],a->picture.linesize[swapUV?2:1],1);
- Bpp=1;num_planes=3;
- break;
- default:
- return 0;
- }
-
- if(avctx->sample_fmt==SAMPLE_I){ //indicates that this is a keyframe, CorePNG doesn't store this info in the stream ifself
- a->picture.key_frame=1;
- a->picture.pict_type=FF_I_TYPE;
- }else{
- int i,shiftX=0,shiftY=0;
- a->picture.key_frame=0;
- a->picture.pict_type=FF_P_TYPE;
- for(i=0;i<num_planes;i++,shiftX=a->shiftX,shiftY=a->shiftY){
- uint8_t *cur=a->picture.data[i],*prev=a->prev_picture.data[i];
- int y;
- for(y=0;y<avctx->height>>shiftY;y++,cur+=a->picture.linesize[i],prev+=a->prev_picture.linesize[i])
- a->dsp.add_bytes(cur,prev,avctx->width*Bpp>>shiftX);
- }
- }
-
- *data_size = sizeof(AVFrame);
- *(AVFrame*)data = a->picture;
-
- return buf_size;
-}
-
-static int decode_init(AVCodecContext *avctx){
-
- CorePNGcontext * const a = avctx->priv_data;
-
- dsputil_init(&a->dsp, avctx);
-
- a->avctx= avctx;
- a->picture.data[0]=a->prev_picture.data[0]=NULL;
-
- if(avctx->extradata_size == sizeof(CorePNGCodecPrivate))
- memcpy(&a->private,avctx->extradata,sizeof(CorePNGCodecPrivate));
- else{
- a->private.wSize = sizeof(CorePNGCodecPrivate);
- a->private.bType = PNGFrameType_RGB24;
- }
-
- switch(a->private.bType){
- case PNGFrameType_RGB24:
- avctx->pix_fmt = PIX_FMT_BGR24;
- break;
- case PNGFrameType_YUY2:
- avctx->pix_fmt = PIX_FMT_YUV422P;
- break;
- case PNGFrameType_YV12:
- avctx->pix_fmt = PIX_FMT_YUV420P;
- break;
- }
- avctx->has_b_frames=0;
-
- avcodec_get_chroma_sub_sample(avctx->pix_fmt, &a->shiftX, &a->shiftY);
-
- a->decctx=NULL;
-
- return 0;
-}
-
-static int decode_done(AVCodecContext *avctx)
-{
- CorePNGcontext * const a = avctx->priv_data;
- if(a->decctx){
- avcodec_close(a->decctx);
- av_free(a->decctx);
- }
- return 0;
-}
-
-AVCodec corepng_decoder = {
- "corepng",
- CODEC_TYPE_VIDEO,
- CODEC_ID_COREPNG,
- sizeof(CorePNGcontext),
- decode_init,
- NULL,
- decode_done,
- decode_frame,
- /*.capabilities = */0,
- /*.next = */NULL,
- /*.flush = */NULL,
- /*.supported_framerates = */NULL,
- /*.pix_fmts = */NULL,
- /*.long_name = */"CorePNG",
-};
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/dsputil.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/dsputil.c index 82daa904f..a162a4d9d 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/dsputil.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/dsputil.c @@ -356,7 +356,7 @@ static void draw_edges_c(uint8_t *buf, int wrap, int width, int height, int w) }
/**
- * Copies a rectangular area of samples to a temporary buffer and replicates the boarder samples.
+ * Copy a rectangular area of samples to a temporary buffer and replicate the border samples.
* @param buf destination buffer
* @param src source buffer
* @param linesize number of bytes between 2 vertically adjacent samples in both the source and destination buffers
@@ -4588,7 +4588,7 @@ const char* avcodec_get_current_idct(AVCodecContext *avctx) #if HAVE_MMX
return avcodec_get_current_idct_mmx(avctx,c);
#else
- return "";
+ return "";
#endif
}
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264.c index f2854cf18..7330a98cf 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264.c @@ -1606,7 +1606,7 @@ static void field_end(H264Context *h){ }
/**
- * Replicates H264 "master" context to thread contexts.
+ * Replicate H264 "master" context to thread contexts.
*/
static void clone_slice(H264Context *dst, H264Context *src)
{
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264dsp.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264dsp.c index 7d1e22593..9c848af87 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264dsp.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264dsp.c @@ -314,9 +314,7 @@ void ff_h264dsp_init(H264DSPContext *c) c->h264_h_loop_filter_chroma_intra= h264_h_loop_filter_chroma_intra_c;
c->h264_loop_filter_strength= NULL;
-/* MPC custom code start */
#if HAVE_MMX
ff_h264dsp_init_x86(c);
#endif
-/* MPC custom code end */
}
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264pred.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264pred.c index 8fafba919..aad472b7d 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264pred.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264pred.c @@ -1298,9 +1298,7 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id){ h->pred16x16_add[VERT_PRED8x8]= pred16x16_vertical_add_c;
h->pred16x16_add[ HOR_PRED8x8]= pred16x16_horizontal_add_c;
-/* MPC custom code start */
#if HAVE_MMX
ff_h264_pred_init_x86(h, codec_id);
#endif
-/* MPC custom code end */
}
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mathops.h b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mathops.h index 2c43787e0..ce3a414a8 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mathops.h +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mathops.h @@ -161,11 +161,6 @@ if ((y) < (x)) {\ #ifndef PACK_2S8 # define PACK_2S8(a,b) PACK_2U8((a)&255, (b)&255) #endif - -/* ffdshow custom code */ -#ifndef INT_BIT -# define INT_BIT (8 * sizeof(int)) -#endif #ifndef PACK_4S8 # define PACK_4S8(a,b,c,d) PACK_4U8((a)&255, (b)&255, (c)&255, (d)&255) #endif @@ -173,5 +168,10 @@ if ((y) < (x)) {\ # define PACK_2S16(a,b) PACK_2U16((a)&0xffff, (b)&0xffff) #endif +/* ffdshow custom code */ +#ifndef INT_BIT +# define INT_BIT (8 * sizeof(int)) +#endif + #endif /* AVCODEC_MATHOPS_H */ diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mjpegdec.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mjpegdec.c index f4917095b..059d8c55e 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mjpegdec.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mjpegdec.c @@ -975,9 +975,6 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s) if(s->lossless){
if(CONFIG_JPEGLS_DECODER && s->ls){
-// for(){
-// reset_ls_coding_parameters(s, 0);
-
if(ff_jpegls_decode_picture(s, predictor, point_transform, ilv) < 0)
return -1;
}else{
@@ -1039,32 +1036,15 @@ static int mjpeg_decode_app(MJpegDecodeContext *s) informations, but it's always present in AVID creates files */
if (id == AV_RL32("AVI1"))
{
- /* structure:
- 4bytes AVI1
- 1bytes polarity
- 1bytes always zero
- 4bytes field_size
- 4bytes field_size_less_padding
- */
s->buggy_avid = 1;
-// if (s->first_picture)
-// printf("mjpeg: workarounding buggy AVID\n");
+
i = get_bits(&s->gb, 8);
if (i==2) s->bottom_field= 1;
else if(i==1) s->bottom_field= 0;
-#if 0
- skip_bits(&s->gb, 8);
- skip_bits(&s->gb, 32);
- skip_bits(&s->gb, 32);
- len -= 10;
-#endif
-// if (s->interlace_polarity)
-// printf("mjpeg: interlace polarity: %d\n", s->interlace_polarity);
+
goto out;
}
-// len -= 2;
-
if (id == AV_RL32("JFIF"))
{
int t_w, t_h, v1, v2;
@@ -1138,16 +1118,6 @@ static int mjpeg_decode_app(MJpegDecodeContext *s) len -= 4;
if (id == AV_RL32("mjpg")) /* Apple MJPEG-A */
{
-#if 0
- skip_bits(&s->gb, 32); /* field size */
- skip_bits(&s->gb, 32); /* pad field size */
- skip_bits(&s->gb, 32); /* next off */
- skip_bits(&s->gb, 32); /* quant off */
- skip_bits(&s->gb, 32); /* huff off */
- skip_bits(&s->gb, 32); /* image off */
- skip_bits(&s->gb, 32); /* scan off */
- skip_bits(&s->gb, 32); /* data off */
-#endif
if (s->avctx->debug & FF_DEBUG_PICT_INFO)
av_log(s->avctx, AV_LOG_INFO, "mjpeg: Apple MJPEG-A header found\n");
}
@@ -1202,29 +1172,6 @@ static int mjpeg_decode_com(MJpegDecodeContext *s) return 0;
}
-#if 0
-static int valid_marker_list[] =
-{
- /* 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f */
-/* 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 1 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 2 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 3 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 4 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 5 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 6 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 7 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 8 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 9 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* a */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* b */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-/* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-/* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
-}
-#endif
-
/* return the 8 bit start code value and update the search
state. Return -1 if no start code found */
static int find_marker(const uint8_t **pbuf_ptr, const uint8_t *buf_end)
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mpeg12.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mpeg12.c index ecbb62c89..04fd547cd 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mpeg12.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mpeg12.c @@ -2479,7 +2479,7 @@ static int decode_chunks(AVCodecContext *avctx, ff_er_add_slice(s2, s2->resync_mb_x, s2->resync_mb_y, s2->mb_x, s2->mb_y, AC_ERROR|DC_ERROR|MV_ERROR);
// ==> Start patch MPC
else if (!s2->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
- //}else{
+ //}else{
// <== End patch MPC
ff_er_add_slice(s2, s2->resync_mb_x, s2->resync_mb_y, s2->mb_x-1, s2->mb_y, AC_END|DC_END|MV_END);
}
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/svq1dec.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/svq1dec.c index 7bc220bb3..74fede36a 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/svq1dec.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/svq1dec.c @@ -844,6 +844,10 @@ AVCodec svq1_decoder = { /*.next=*/NULL,
/*.flush=*/ff_mpeg_flush,
/*.supported_framerates = */NULL,
+#if __STDC_VERSION__ >= 199901L
+ .pix_fmts=(const enum PixelFormat[]){PIX_FMT_YUV410P, PIX_FMT_NONE},
+#else
/*.pix_fmts = */NULL,
+#endif
/*.long_name= */NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1"),
};
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vc1_dxva.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vc1_dxva.c index 8d89f0718..b33f4241f 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vc1_dxva.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vc1_dxva.c @@ -21,7 +21,6 @@ int av_vc1_decode_frame(AVCodecContext *avctx, {
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
- //AVFrame *pict = data;
uint8_t *buf2 = NULL;
v->allow_interlaced = 1;
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8.c index 963dd5765..c560fbf8c 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8.c @@ -1466,7 +1466,7 @@ AVCodec vp8_decoder = { NULL, vp8_decode_free, vp8_decode_frame, - CODEC_CAP_DR1, + /*.capabilities = */CODEC_CAP_DR1, /*.next = */NULL, /*.flush = */vp8_decode_flush, /*.supported_framerates = */NULL, diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8data.h b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8data.h index 110061f0e..5d718b4bb 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8data.h +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8data.h @@ -72,9 +72,18 @@ enum inter_splitmvmode { static const uint8_t vp8_pred4x4_mode[] = { -/* MPC custom code start */ - DC_PRED, HOR_PRED, VERT_PRED, TM_VP8_PRED -/* MPC custom code end */ +#if __STDC_VERSION__ >= 199901L + [DC_PRED8x8] = DC_PRED, + [VERT_PRED8x8] = VERT_PRED, + [HOR_PRED8x8] = HOR_PRED, + [PLANE_PRED8x8] = TM_VP8_PRED, +#else + /* see h264pred.h for the correct order */ + DC_PRED, + HOR_PRED, + VERT_PRED, + TM_VP8_PRED, +#endif }; static const int8_t vp8_pred16x16_tree_intra[4][2] = diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8dsp.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8dsp.c index e8730319b..c6b022ddd 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8dsp.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8dsp.c @@ -464,9 +464,7 @@ av_cold void ff_vp8dsp_init(VP8DSPContext *dsp) VP8_BILINEAR_MC_FUNC(1, 8); VP8_BILINEAR_MC_FUNC(2, 4); -/* MPC custom code start */ #if HAVE_MMX ff_vp8dsp_init_x86(dsp); #endif -/* MPC custom code end */ } |