diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-07-03 13:10:00 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-07-03 13:10:00 +0400 |
commit | 2e8c5630cec0d378a040565ac558c75fe44601be (patch) | |
tree | c1f4397a544bd636e34e9743249461df0d74b659 /src/filters/transform/MPCVideoDec | |
parent | a4d5c4b972568aff96553c71d0f23db2c49b9c5b (diff) |
updated ffmpeg
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2100 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform/MPCVideoDec')
7 files changed, 60 insertions, 29 deletions
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/dxva.h b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/dxva.h index 003eeb10b..6e4005cc1 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/dxva.h +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/dxva.h @@ -1954,7 +1954,7 @@ DECLARE_INTERFACE_(IDirect3DDXVADevice9, IUnknown) STDMETHOD(QueryStatus)(THIS_ IDirect3DSurface9* pSurface,DWORD Flags) PURE;
};
-#endif /* __DXVA1_DEPRECATED_INTERFACES__ */
+#endif /* __DXVA1_DEPRECATED_INTERFACES__ */
#if _MSC_VER >= 1200
#pragma warning(pop)
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264.c index 7330a98cf..3811ab983 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264.c @@ -1354,7 +1354,7 @@ static int pred_weight_table(H264Context *h){ /**
* Initialize implicit_weight table.
- * @param field, 0/1 initialize the weight for interlaced MBAFF
+ * @param field 0/1 initialize the weight for interlaced MBAFF
* -1 initializes the rest
*/
static void implicit_weight_table(H264Context *h, int field){
@@ -1763,7 +1763,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ if(h->x264_build < 44U)
den *= 2;
av_reduce(&s->avctx->time_base.num, &s->avctx->time_base.den,
- h->sps.num_units_in_tick * 2, den, 1<<30);
+ h->sps.num_units_in_tick, den, 1<<30);
}
if (MPV_common_init(s) < 0)
@@ -1835,7 +1835,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ if(h0->current_slice == 0){
while(h->frame_num != h->prev_frame_num &&
h->frame_num != (h->prev_frame_num+1)%(1<<h->sps.log2_max_frame_num)){
- av_log(NULL, AV_LOG_DEBUG, "Frame num gap %d %d\n", h->frame_num, h->prev_frame_num);
+ av_log(h->s.avctx, AV_LOG_DEBUG, "Frame num gap %d %d\n", h->frame_num, h->prev_frame_num);
if (ff_h264_frame_start(h) < 0)
return -1;
h->prev_frame_num++;
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mlpdsp.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mlpdsp.c index 290020ad3..45b88fb6e 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mlpdsp.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mlpdsp.c @@ -59,7 +59,6 @@ void ff_mlp_init(DSPContext* c, AVCodecContext *avctx) { c->mlp_filter_channel = ff_mlp_filter_channel; -//ffdshow custom code #if HAVE_MMX if (ARCH_X86) ff_mlp_init_x86(c, avctx); diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8.c index c560fbf8c..60825905b 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8.c @@ -747,8 +747,7 @@ static void decode_mb_mode(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y, * @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) - * @param qmul[0] dc dequant factor - * @param qmul[1] ac dequant factor + * @param qmul array holding the dc/ac dequant factor at position 0/1 * @return 0 if no coeffs were decoded * otherwise, the index of the last coeff decoded plus one */ @@ -1168,38 +1167,41 @@ static void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb, int *level, in // TODO: look at backup_mb_border / xchg_mb_border in h264.c static void filter_mb(VP8Context *s, uint8_t *dst[3], VP8Macroblock *mb, int mb_x, int mb_y) { - int filter_level, inner_limit, hev_thresh; + int filter_level, inner_limit, hev_thresh, mbedge_lim, bedge_lim; filter_level_for_mb(s, mb, &filter_level, &inner_limit, &hev_thresh); if (!filter_level) return; + mbedge_lim = 2*(filter_level+2) + inner_limit; + bedge_lim = 2* filter_level + inner_limit; + if (mb_x) { - s->vp8dsp.vp8_h_loop_filter16(dst[0], s->linesize, filter_level+2, inner_limit, hev_thresh); - s->vp8dsp.vp8_h_loop_filter8 (dst[1], s->uvlinesize, filter_level+2, inner_limit, hev_thresh); - s->vp8dsp.vp8_h_loop_filter8 (dst[2], s->uvlinesize, filter_level+2, inner_limit, hev_thresh); + s->vp8dsp.vp8_h_loop_filter16(dst[0], s->linesize, mbedge_lim, inner_limit, hev_thresh); + s->vp8dsp.vp8_h_loop_filter8 (dst[1], s->uvlinesize, mbedge_lim, inner_limit, hev_thresh); + s->vp8dsp.vp8_h_loop_filter8 (dst[2], s->uvlinesize, mbedge_lim, inner_limit, hev_thresh); } if (!mb->skip || mb->mode == MODE_I4x4 || mb->mode == VP8_MVMODE_SPLIT) { - s->vp8dsp.vp8_h_loop_filter16_inner(dst[0]+ 4, s->linesize, filter_level, inner_limit, hev_thresh); - s->vp8dsp.vp8_h_loop_filter16_inner(dst[0]+ 8, s->linesize, filter_level, inner_limit, hev_thresh); - s->vp8dsp.vp8_h_loop_filter16_inner(dst[0]+12, s->linesize, filter_level, inner_limit, hev_thresh); - s->vp8dsp.vp8_h_loop_filter8_inner (dst[1]+ 4, s->uvlinesize, filter_level, inner_limit, hev_thresh); - s->vp8dsp.vp8_h_loop_filter8_inner (dst[2]+ 4, s->uvlinesize, filter_level, inner_limit, hev_thresh); + s->vp8dsp.vp8_h_loop_filter16_inner(dst[0]+ 4, s->linesize, bedge_lim, inner_limit, hev_thresh); + s->vp8dsp.vp8_h_loop_filter16_inner(dst[0]+ 8, s->linesize, bedge_lim, inner_limit, hev_thresh); + s->vp8dsp.vp8_h_loop_filter16_inner(dst[0]+12, s->linesize, bedge_lim, inner_limit, hev_thresh); + s->vp8dsp.vp8_h_loop_filter8_inner (dst[1]+ 4, s->uvlinesize, bedge_lim, inner_limit, hev_thresh); + s->vp8dsp.vp8_h_loop_filter8_inner (dst[2]+ 4, s->uvlinesize, bedge_lim, inner_limit, hev_thresh); } if (mb_y) { - s->vp8dsp.vp8_v_loop_filter16(dst[0], s->linesize, filter_level+2, inner_limit, hev_thresh); - s->vp8dsp.vp8_v_loop_filter8 (dst[1], s->uvlinesize, filter_level+2, inner_limit, hev_thresh); - s->vp8dsp.vp8_v_loop_filter8 (dst[2], s->uvlinesize, filter_level+2, inner_limit, hev_thresh); + s->vp8dsp.vp8_v_loop_filter16(dst[0], s->linesize, mbedge_lim, inner_limit, hev_thresh); + s->vp8dsp.vp8_v_loop_filter8 (dst[1], s->uvlinesize, mbedge_lim, inner_limit, hev_thresh); + s->vp8dsp.vp8_v_loop_filter8 (dst[2], s->uvlinesize, mbedge_lim, inner_limit, hev_thresh); } if (!mb->skip || mb->mode == MODE_I4x4 || mb->mode == VP8_MVMODE_SPLIT) { - s->vp8dsp.vp8_v_loop_filter16_inner(dst[0]+ 4*s->linesize, s->linesize, filter_level, inner_limit, hev_thresh); - s->vp8dsp.vp8_v_loop_filter16_inner(dst[0]+ 8*s->linesize, s->linesize, filter_level, inner_limit, hev_thresh); - s->vp8dsp.vp8_v_loop_filter16_inner(dst[0]+12*s->linesize, s->linesize, filter_level, inner_limit, hev_thresh); - s->vp8dsp.vp8_v_loop_filter8_inner (dst[1]+ 4*s->uvlinesize, s->uvlinesize, filter_level, inner_limit, hev_thresh); - s->vp8dsp.vp8_v_loop_filter8_inner (dst[2]+ 4*s->uvlinesize, s->uvlinesize, filter_level, inner_limit, hev_thresh); + s->vp8dsp.vp8_v_loop_filter16_inner(dst[0]+ 4*s->linesize, s->linesize, bedge_lim, inner_limit, hev_thresh); + s->vp8dsp.vp8_v_loop_filter16_inner(dst[0]+ 8*s->linesize, s->linesize, bedge_lim, inner_limit, hev_thresh); + s->vp8dsp.vp8_v_loop_filter16_inner(dst[0]+12*s->linesize, s->linesize, bedge_lim, inner_limit, hev_thresh); + s->vp8dsp.vp8_v_loop_filter8_inner (dst[1]+ 4*s->uvlinesize, s->uvlinesize, bedge_lim, inner_limit, hev_thresh); + s->vp8dsp.vp8_v_loop_filter8_inner (dst[2]+ 4*s->uvlinesize, s->uvlinesize, bedge_lim, inner_limit, hev_thresh); } } diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8dsp.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8dsp.c index c6b022ddd..9f5573dfc 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8dsp.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/vp8dsp.c @@ -162,7 +162,7 @@ static av_always_inline int simple_limit(uint8_t *p, int stride, int flim) static av_always_inline int normal_limit(uint8_t *p, int stride, int E, int I) { LOAD_PIXELS - return simple_limit(p, stride, 2*E+I) + return simple_limit(p, stride, E) && FFABS(p3-p2) <= I && FFABS(p2-p1) <= I && FFABS(p1-p0) <= I && FFABS(q3-q2) <= I && FFABS(q2-q1) <= I && FFABS(q1-q0) <= I; } diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/vp8dsp-init.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/vp8dsp-init.c index 6247da9dc..698d39427 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/vp8dsp-init.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/vp8dsp-init.c @@ -85,6 +85,12 @@ extern void ff_put_vp8_bilinear4_h_mmxext(uint8_t *dst, int dststride, extern void ff_put_vp8_bilinear8_h_sse2 (uint8_t *dst, int dststride, uint8_t *src, int srcstride, int height, int mx, int my); +extern void ff_put_vp8_bilinear4_h_ssse3 (uint8_t *dst, int dststride, + uint8_t *src, int srcstride, + int height, int mx, int my); +extern void ff_put_vp8_bilinear8_h_ssse3 (uint8_t *dst, int dststride, + uint8_t *src, int srcstride, + int height, int mx, int my); extern void ff_put_vp8_bilinear4_v_mmxext(uint8_t *dst, int dststride, uint8_t *src, int srcstride, @@ -92,13 +98,14 @@ extern void ff_put_vp8_bilinear4_v_mmxext(uint8_t *dst, int dststride, extern void ff_put_vp8_bilinear8_v_sse2 (uint8_t *dst, int dststride, uint8_t *src, int srcstride, int height, int mx, int my); -extern void ff_put_vp8_bilinear8_v_ssse3 (uint8_t *dst, int dststride, +extern void ff_put_vp8_bilinear4_v_ssse3 (uint8_t *dst, int dststride, uint8_t *src, int srcstride, int height, int mx, int my); -extern void ff_put_vp8_bilinear8_h_ssse3 (uint8_t *dst, int dststride, +extern void ff_put_vp8_bilinear8_v_ssse3 (uint8_t *dst, int dststride, uint8_t *src, int srcstride, int height, int mx, int my); + extern void ff_put_vp8_pixels8_mmx (uint8_t *dst, int dststride, uint8_t *src, int srcstride, int height, int mx, int my); @@ -207,6 +214,7 @@ HVBILIN(mmxext, 8, 8, 16) HVBILIN(mmxext, 8, 16, 16) HVBILIN(sse2, 8, 8, 16) HVBILIN(sse2, 8, 16, 16) +HVBILIN(ssse3, 8, 4, 8) HVBILIN(ssse3, 8, 8, 16) HVBILIN(ssse3, 8, 16, 16) @@ -284,6 +292,7 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) VP8_MC_FUNC(2, 4, ssse3); VP8_BILINEAR_MC_FUNC(0, 16, ssse3); VP8_BILINEAR_MC_FUNC(1, 8, ssse3); + VP8_BILINEAR_MC_FUNC(2, 4, ssse3); } if (mm_flags & FF_MM_SSE4) { diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/vp8dsp.asm b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/vp8dsp.asm index 3ac9ca950..2c3eee400 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/vp8dsp.asm +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/vp8dsp.asm @@ -770,7 +770,8 @@ FILTER_BILINEAR mmxext, 4, 0 INIT_XMM FILTER_BILINEAR sse2, 8, 7 -cglobal put_vp8_bilinear8_v_ssse3, 7,7,5 +%macro FILTER_BILINEAR_SSSE3 1 +cglobal put_vp8_bilinear%1_v_ssse3, 7,7 shl r6d, 4 %ifdef PIC lea r11, [bilinear_filter_vb_m] @@ -789,9 +790,16 @@ cglobal put_vp8_bilinear8_v_ssse3, 7,7,5 psraw m1, 2 pavgw m0, m4 pavgw m1, m4 +%if mmsize==8 + packuswb m0, m0 + packuswb m1, m1 + movh [r0+r1*0], m0 + movh [r0+r1*1], m1 +%else packuswb m0, m1 movh [r0+r1*0], m0 movhps [r0+r1*1], m0 +%endif lea r0, [r0+r1*2] lea r2, [r2+r3*2] @@ -799,7 +807,7 @@ cglobal put_vp8_bilinear8_v_ssse3, 7,7,5 jg .nextrow REP_RET -cglobal put_vp8_bilinear8_h_ssse3, 7,7,5 +cglobal put_vp8_bilinear%1_h_ssse3, 7,7 shl r5d, 4 %ifdef PIC lea r11, [bilinear_filter_vb_m] @@ -818,15 +826,28 @@ cglobal put_vp8_bilinear8_h_ssse3, 7,7,5 psraw m1, 2 pavgw m0, m4 pavgw m1, m4 +%if mmsize==8 + packuswb m0, m0 + packuswb m1, m1 + movh [r0+r1*0], m0 + movh [r0+r1*1], m1 +%else packuswb m0, m1 movh [r0+r1*0], m0 movhps [r0+r1*1], m0 +%endif lea r0, [r0+r1*2] lea r2, [r2+r3*2] sub r4, 2 jg .nextrow REP_RET +%endmacro + +INIT_MMX +FILTER_BILINEAR_SSSE3 4 +INIT_XMM +FILTER_BILINEAR_SSSE3 8 cglobal put_vp8_pixels8_mmx, 5,5 .nextrow: |