aboutsummaryrefslogtreecommitdiff
path: root/lib/ffmpeg/libavcodec/bfin
diff options
context:
space:
mode:
authorelupus <elupus@xbmc.org>2012-03-25 23:27:29 +0200
committerelupus <elupus@xbmc.org>2012-03-31 16:28:00 +0200
commit2836f95ad7d9425fc27c2de62b5c51e7829032f6 (patch)
tree158a931d0795a3c9d9e21294ac9f1fa63e03f17f /lib/ffmpeg/libavcodec/bfin
parent8a0ce9e337267786236cba4f68d1db93bd28c3ef (diff)
Update ffmpeg to n0.10.2 (f139838d6473c7b5152178f602cb953a824c2ff9)
xbmc ffmpeg 05f8b5549c5e20cf9a417069838edd6841d7bd40
Diffstat (limited to 'lib/ffmpeg/libavcodec/bfin')
-rw-r--r--lib/ffmpeg/libavcodec/bfin/dsputil_bfin.c35
-rw-r--r--lib/ffmpeg/libavcodec/bfin/mathops.h10
-rw-r--r--lib/ffmpeg/libavcodec/bfin/mpegvideo_bfin.c9
3 files changed, 28 insertions, 26 deletions
diff --git a/lib/ffmpeg/libavcodec/bfin/dsputil_bfin.c b/lib/ffmpeg/libavcodec/bfin/dsputil_bfin.c
index a667deb5fe..bfcc337388 100644
--- a/lib/ffmpeg/libavcodec/bfin/dsputil_bfin.c
+++ b/lib/ffmpeg/libavcodec/bfin/dsputil_bfin.c
@@ -197,11 +197,14 @@ static int bfin_pix_abs8_xy2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_si
void dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx )
{
- c->get_pixels = ff_bfin_get_pixels;
+ const int high_bit_depth = avctx->bits_per_raw_sample > 8;
+
c->diff_pixels = ff_bfin_diff_pixels;
c->put_pixels_clamped = ff_bfin_put_pixels_clamped;
c->add_pixels_clamped = ff_bfin_add_pixels_clamped;
+ if (!high_bit_depth)
+ c->get_pixels = ff_bfin_get_pixels;
c->clear_blocks = bfin_clear_blocks;
c->pix_sum = ff_bfin_pix_sum;
c->pix_norm1 = ff_bfin_pix_norm1;
@@ -228,6 +231,7 @@ void dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx )
c->sse[1] = ff_bfin_sse8;
c->sse[2] = ff_bfin_sse4;
+ if (!high_bit_depth) {
c->put_pixels_tab[0][0] = bfin_put_pixels16;
c->put_pixels_tab[0][1] = bfin_put_pixels16_x2;
c->put_pixels_tab[0][2] = bfin_put_pixels16_y2;
@@ -247,20 +251,23 @@ void dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx )
c->put_no_rnd_pixels_tab[0][1] = bfin_put_pixels16_x2_nornd;
c->put_no_rnd_pixels_tab[0][2] = bfin_put_pixels16_y2_nornd;
/* c->put_no_rnd_pixels_tab[0][3] = ff_bfin_put_pixels16_xy2_nornd; */
+ }
- if (avctx->dct_algo == FF_DCT_AUTO)
- c->fdct = ff_bfin_fdct;
-
- if (avctx->idct_algo==FF_IDCT_VP3) {
- c->idct_permutation_type = FF_NO_IDCT_PERM;
- c->idct = ff_bfin_vp3_idct;
- c->idct_add = ff_bfin_vp3_idct_add;
- c->idct_put = ff_bfin_vp3_idct_put;
- } else if (avctx->idct_algo == FF_IDCT_AUTO) {
- c->idct_permutation_type = FF_NO_IDCT_PERM;
- c->idct = ff_bfin_idct;
- c->idct_add = bfin_idct_add;
- c->idct_put = bfin_idct_put;
+ if (avctx->bits_per_raw_sample <= 8) {
+ if (avctx->dct_algo == FF_DCT_AUTO)
+ c->fdct = ff_bfin_fdct;
+
+ if (avctx->idct_algo == FF_IDCT_VP3) {
+ c->idct_permutation_type = FF_NO_IDCT_PERM;
+ c->idct = ff_bfin_vp3_idct;
+ c->idct_add = ff_bfin_vp3_idct_add;
+ c->idct_put = ff_bfin_vp3_idct_put;
+ } else if (avctx->idct_algo == FF_IDCT_AUTO) {
+ c->idct_permutation_type = FF_NO_IDCT_PERM;
+ c->idct = ff_bfin_idct;
+ c->idct_add = bfin_idct_add;
+ c->idct_put = bfin_idct_put;
+ }
}
}
diff --git a/lib/ffmpeg/libavcodec/bfin/mathops.h b/lib/ffmpeg/libavcodec/bfin/mathops.h
index a0e808c81a..50c03160ed 100644
--- a/lib/ffmpeg/libavcodec/bfin/mathops.h
+++ b/lib/ffmpeg/libavcodec/bfin/mathops.h
@@ -24,7 +24,6 @@
#include "config.h"
-#if CONFIG_MPEGAUDIO_HP
#define MULH(X,Y) ({ int xxo; \
__asm__ ( \
"a1 = %2.L * %1.L (FU);\n\t" \
@@ -34,15 +33,6 @@
"a1 = a1 >>> 16;\n\t" \
"%0 = (a0 += a1);\n\t" \
: "=d" (xxo) : "d" (X), "d" (Y) : "A0","A1"); xxo; })
-#else
-#define MULH(X,Y) ({ int xxo; \
- __asm__ ( \
- "a1 = %2.H * %1.L (IS,M);\n\t" \
- "a0 = %1.H * %2.H, a1+= %1.H * %2.L (IS,M);\n\t"\
- "a1 = a1 >>> 16;\n\t" \
- "%0 = (a0 += a1);\n\t" \
- : "=d" (xxo) : "d" (X), "d" (Y) : "A0","A1"); xxo; })
-#endif
/* signed 16x16 -> 32 multiply */
#define MUL16(a, b) ({ int xxo; \
diff --git a/lib/ffmpeg/libavcodec/bfin/mpegvideo_bfin.c b/lib/ffmpeg/libavcodec/bfin/mpegvideo_bfin.c
index 0373e22ff8..996290a52d 100644
--- a/lib/ffmpeg/libavcodec/bfin/mpegvideo_bfin.c
+++ b/lib/ffmpeg/libavcodec/bfin/mpegvideo_bfin.c
@@ -61,8 +61,13 @@ static int dct_quantize_bfin (MpegEncContext *s,
dc = block[0] = (block[0] + (q >> 1)) / q;
start_i = 1;
last_non_zero = 0;
- bias = s->q_intra_matrix16[qscale][1];
- qmat = s->q_intra_matrix16[qscale][0];
+ if(n<4){
+ bias = s->q_intra_matrix16[qscale][1];
+ qmat = s->q_intra_matrix16[qscale][0];
+ }else{
+ bias = s->q_chroma_intra_matrix16[qscale][1];
+ qmat = s->q_chroma_intra_matrix16[qscale][0];
+ }
} else {
start_i = 0;