mirror of
https://github.com/mpv-player/mpv
synced 2025-01-15 11:31:02 +00:00
sync to libmpeg2-0.4.1
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21542 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
fcb30369d8
commit
b4e852b305
@ -20,7 +20,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
|
||||
* detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
|
||||
* $Id$
|
||||
*/
|
||||
|
@ -20,7 +20,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
|
||||
* detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
|
||||
* $Id$
|
||||
*/
|
||||
@ -50,7 +50,7 @@ static inline uint32_t arch_accel (void)
|
||||
int AMD;
|
||||
uint32_t caps;
|
||||
|
||||
#if !defined(PIC) && !defined(__PIC__)
|
||||
#if defined(__x86_64__) || (!defined(PIC) && !defined(__PIC__))
|
||||
#define cpuid(op,eax,ebx,ecx,edx) \
|
||||
__asm__ ("cpuid" \
|
||||
: "=a" (eax), \
|
||||
@ -59,12 +59,12 @@ static inline uint32_t arch_accel (void)
|
||||
"=d" (edx) \
|
||||
: "a" (op) \
|
||||
: "cc")
|
||||
#else /* PIC version : save ebx */
|
||||
#else /* PIC version : save ebx (not needed on x86_64) */
|
||||
#define cpuid(op,eax,ebx,ecx,edx) \
|
||||
__asm__ ("push %%ebx\n\t" \
|
||||
__asm__ ("pushl %%ebx\n\t" \
|
||||
"cpuid\n\t" \
|
||||
"movl %%ebx,%1\n\t" \
|
||||
"pop %%ebx" \
|
||||
"popl %%ebx" \
|
||||
: "=a" (eax), \
|
||||
"=r" (ebx), \
|
||||
"=c" (ecx), \
|
||||
@ -73,6 +73,7 @@ static inline uint32_t arch_accel (void)
|
||||
: "cc")
|
||||
#endif
|
||||
|
||||
#ifndef __x86_64__ /* x86_64 supports the cpuid op */
|
||||
__asm__ ("pushf\n\t"
|
||||
"pushf\n\t"
|
||||
"pop %0\n\t"
|
||||
@ -90,6 +91,7 @@ static inline uint32_t arch_accel (void)
|
||||
|
||||
if (eax == ebx) /* no cpuid */
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
cpuid (0x00000000, eax, ebx, ecx, edx);
|
||||
if (!eax) /* vendor string only */
|
||||
@ -154,7 +156,7 @@ static RETSIGTYPE sigill_handler (int sig)
|
||||
}
|
||||
|
||||
#ifdef ARCH_PPC
|
||||
static inline uint32_t arch_accel (void)
|
||||
static uint32_t arch_accel (void)
|
||||
{
|
||||
static RETSIGTYPE (* oldsig) (int);
|
||||
|
||||
@ -184,7 +186,7 @@ static inline uint32_t arch_accel (void)
|
||||
#endif /* ARCH_PPC */
|
||||
|
||||
#ifdef ARCH_SPARC
|
||||
static inline uint32_t arch_accel (void)
|
||||
static uint32_t arch_accel (void)
|
||||
{
|
||||
static RETSIGTYPE (* oldsig) (int);
|
||||
|
||||
@ -220,7 +222,7 @@ static inline uint32_t arch_accel (void)
|
||||
#endif /* ARCH_PPC || ARCH_SPARC */
|
||||
|
||||
#ifdef ARCH_ALPHA
|
||||
static inline uint32_t arch_accel (void)
|
||||
static uint32_t arch_accel (void)
|
||||
{
|
||||
#ifdef CAN_COMPILE_ALPHA_MVI
|
||||
uint64_t no_mvi;
|
||||
|
@ -20,7 +20,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
|
||||
* detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
|
||||
* $Id$
|
||||
*/
|
||||
@ -47,19 +47,19 @@ static void state_restore_mmx (cpu_state_t * state)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined( ARCH_PPC ) && defined( HAVE_ALTIVEC )
|
||||
#if defined( __APPLE_CC__ ) && defined( __APPLE_ALTIVEC__ ) /* apple */
|
||||
#define LI(a,b) "li r" #a "," #b "\n\t"
|
||||
#define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t"
|
||||
#define STVX(a,b,c) "stvx v" #a ",r" #b ",r" #c "\n\t"
|
||||
#define LVX0(a,b,c) "lvx v" #a ",0,r" #c "\n\t"
|
||||
#define LVX(a,b,c) "lvx v" #a ",r" #b ",r" #c "\n\t"
|
||||
#else /* gnu */
|
||||
#ifdef ARCH_PPC
|
||||
#ifdef HAVE_ALTIVEC_H /* gnu */
|
||||
#define LI(a,b) "li " #a "," #b "\n\t"
|
||||
#define STVX0(a,b,c) "stvx " #a ",0," #c "\n\t"
|
||||
#define STVX(a,b,c) "stvx " #a "," #b "," #c "\n\t"
|
||||
#define LVX0(a,b,c) "lvx " #a ",0," #c "\n\t"
|
||||
#define LVX(a,b,c) "lvx " #a "," #b "," #c "\n\t"
|
||||
#else /* apple */
|
||||
#define LI(a,b) "li r" #a "," #b "\n\t"
|
||||
#define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t"
|
||||
#define STVX(a,b,c) "stvx v" #a ",r" #b ",r" #c "\n\t"
|
||||
#define LVX0(a,b,c) "lvx v" #a ",0,r" #c "\n\t"
|
||||
#define LVX(a,b,c) "lvx v" #a ",r" #b ",r" #c "\n\t"
|
||||
#endif
|
||||
|
||||
static void state_save_altivec (cpu_state_t * state)
|
||||
|
@ -20,7 +20,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
|
||||
* detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
|
||||
* $Id$
|
||||
*/
|
||||
|
@ -21,7 +21,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
|
||||
* detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
|
||||
* $Id$
|
||||
*/
|
||||
|
@ -20,7 +20,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
|
||||
* detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
|
||||
* $Id$
|
||||
*/
|
||||
@ -253,7 +253,7 @@ void mpeg2_idct_init (uint32_t accel)
|
||||
mpeg2_idct_mmx_init ();
|
||||
} else
|
||||
#endif
|
||||
#if defined( ARCH_PPC ) && defined( HAVE_ALTIVEC )
|
||||
#ifdef ARCH_PPC
|
||||
if (accel & MPEG2_ACCEL_PPC_ALTIVEC) {
|
||||
mpeg2_idct_copy = mpeg2_idct_copy_altivec;
|
||||
mpeg2_idct_add = mpeg2_idct_add_altivec;
|
||||
|
@ -21,7 +21,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
|
||||
* detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
|
||||
* $Id$
|
||||
*/
|
||||
|
@ -41,7 +41,7 @@ typedef vector unsigned short vector_u16_t;
|
||||
typedef vector signed int vector_s32_t;
|
||||
typedef vector unsigned int vector_u32_t;
|
||||
|
||||
#if defined( HAVE_ALTIVEC_H ) && !defined( __APPLE_ALTIVEC__ ) && (__GNUC__ * 100 + __GNUC_MINOR__ < 303)
|
||||
#if defined(HAVE_ALTIVEC_H) && (__GNUC__ * 100 + __GNUC_MINOR__ < 303)
|
||||
/* work around gcc <3.3 vec_mergel bug */
|
||||
static inline vector_s16_t my_vec_mergel (vector_s16_t const A,
|
||||
vector_s16_t const B)
|
||||
@ -56,10 +56,10 @@ static inline vector_s16_t my_vec_mergel (vector_s16_t const A,
|
||||
#define vec_mergel my_vec_mergel
|
||||
#endif
|
||||
|
||||
#if defined( __APPLE_CC__ ) && defined( __APPLE_ALTIVEC__ ) /* apple */
|
||||
#define VEC_S16(a,b,c,d,e,f,g,h) (vector_s16_t) (a, b, c, d, e, f, g, h)
|
||||
#else /* gnu */
|
||||
#ifdef HAVE_ALTIVEC_H /* gnu */
|
||||
#define VEC_S16(a,b,c,d,e,f,g,h) {a, b, c, d, e, f, g, h}
|
||||
#else /* apple */
|
||||
#define VEC_S16(a,b,c,d,e,f,g,h) (vector_s16_t) (a, b, c, d, e, f, g, h)
|
||||
#endif
|
||||
|
||||
static const vector_s16_t constants ATTR_ALIGN(16) =
|
||||
|
@ -20,7 +20,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
|
||||
* detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
|
||||
* $Id$
|
||||
*/
|
||||
|
@ -170,21 +170,6 @@
|
||||
mpeg2dec->fbuf[0] = &mpeg2dec->fbuf_alloc[0].fbuf;
|
||||
mpeg2dec->fbuf[1] = &mpeg2dec->fbuf_alloc[1].fbuf;
|
||||
mpeg2dec->fbuf[2] = &mpeg2dec->fbuf_alloc[2].fbuf;
|
||||
@@ -272,9 +272,11 @@
|
||||
if (!(buffer[2] & 2)) /* missing marker_bit */
|
||||
return 1;
|
||||
|
||||
- sequence->display_width = (buffer[1] << 6) | (buffer[2] >> 2);
|
||||
- sequence->display_height =
|
||||
- ((buffer[2]& 1 ) << 13) | (buffer[3] << 5) | (buffer[4] >> 3);
|
||||
+ if( (buffer[1] << 6) | (buffer[2] >> 2) )
|
||||
+ sequence->display_width = (buffer[1] << 6) | (buffer[2] >> 2);
|
||||
+ if( ((buffer[2]& 1 ) << 13) | (buffer[3] << 5) | (buffer[4] >> 3) )
|
||||
+ sequence->display_height =
|
||||
+ ((buffer[2]& 1 ) << 13) | (buffer[3] << 5) | (buffer[4] >> 3);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -551,6 +558,7 @@
|
||||
if (!(mpeg2dec->sequence.flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE)) {
|
||||
picture->nb_fields = (buffer[3] & 2) ? 3 : 2;
|
||||
@ -203,24 +188,6 @@
|
||||
k * mpeg2dec->quantizer_matrix[index][j];
|
||||
--- libmpeg2/idct.c 2006-06-16 20:12:26.000000000 +0200
|
||||
+++ libmpeg2/idct.c 2006-06-16 20:12:50.000000000 +0200
|
||||
@@ -66,7 +70,7 @@
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
-static void inline idct_row (int16_t * const block)
|
||||
+static inline void idct_row (int16_t * const block)
|
||||
{
|
||||
int d0, d1, d2, d3;
|
||||
int a0, a1, a2, a3, b0, b1, b2, b3;
|
||||
@@ -119,7 +123,7 @@
|
||||
block[7] = (a0 - b0) >> 12;
|
||||
}
|
||||
|
||||
-static void inline idct_col (int16_t * const block)
|
||||
+static inline void idct_col (int16_t * const block)
|
||||
{
|
||||
int d0, d1, d2, d3;
|
||||
int a0, a1, a2, a3, b0, b1, b2, b3;
|
||||
@@ -239,12 +239,15 @@
|
||||
|
||||
void mpeg2_idct_init (uint32_t accel)
|
||||
@ -257,24 +224,6 @@
|
||||
mpeg2_idct_copy = mpeg2_idct_copy_alpha;
|
||||
--- libmpeg2/idct_alpha.c 2006-06-16 20:12:26.000000000 +0200
|
||||
+++ libmpeg2/idct_alpha.c 2006-06-16 20:12:50.000000000 +0200
|
||||
@@ -59,7 +63,7 @@
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
-static void inline idct_row (int16_t * const block)
|
||||
+static inline void idct_row (int16_t * const block)
|
||||
{
|
||||
uint64_t l, r;
|
||||
int_fast32_t d0, d1, d2, d3;
|
||||
@@ -116,7 +120,7 @@
|
||||
block[7] = (a0 - b0) >> 12;
|
||||
}
|
||||
|
||||
-static void inline idct_col (int16_t * const block)
|
||||
+static inline void idct_col (int16_t * const block)
|
||||
{
|
||||
int_fast32_t d0, d1, d2, d3;
|
||||
int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3;
|
||||
@@ -157,6 +161,7 @@
|
||||
block[8*7] = (a0 - b0) >> 17;
|
||||
}
|
||||
@ -324,8 +273,7 @@
|
||||
+#ifdef HAVE_MMX
|
||||
+ if (accel & MPEG2_ACCEL_X86_MMX)
|
||||
mpeg2_mc = mpeg2_mc_mmx;
|
||||
- elseo
|
||||
+ else
|
||||
else
|
||||
#endif
|
||||
-#ifdef ARCH_PPC
|
||||
+#if defined(ARCH_PPC) && defined(HAVE_ALTIVEC)
|
||||
@ -406,15 +354,6 @@
|
||||
|
||||
decoder->quantizer_matrix[0] =
|
||||
decoder->quantizer_prescale[0][quantizer_scale_code];
|
||||
@@ -1252,7 +1252,7 @@
|
||||
ref[0] + offset, decoder->stride, 16); \
|
||||
table[4] (decoder->dest[1] + decoder->offset, \
|
||||
ref[1] + offset, decoder->stride, 16); \
|
||||
- table[4] (decoder->dest[2] + (decoder->offset >> 1), \
|
||||
+ table[4] (decoder->dest[2] + decoder->offset, \
|
||||
ref[2] + offset, decoder->stride, 16)
|
||||
|
||||
#define bit_buf (decoder->bitstream_buf)
|
||||
@@ -1568,6 +1569,18 @@
|
||||
|
||||
#define NEXT_MACROBLOCK \
|
@ -20,7 +20,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
|
||||
* detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
|
||||
* $Id$
|
||||
*/
|
||||
|
@ -20,7 +20,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
|
||||
* detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
|
||||
* $Id$
|
||||
*/
|
||||
@ -67,7 +67,7 @@ static mmx_t round4 = {0x0002000200020002LL};
|
||||
* unrolling will help
|
||||
*/
|
||||
|
||||
static inline void mmx_zero_reg (void)
|
||||
static inline void mmx_zero_reg ()
|
||||
{
|
||||
/* load 0 into mm0 */
|
||||
pxor_r2r (mm0, mm0);
|
||||
|
@ -20,7 +20,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
|
||||
* detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
|
||||
* $Id$
|
||||
*/
|
||||
@ -29,7 +29,7 @@
|
||||
#define MPEG2_H
|
||||
|
||||
#define MPEG2_VERSION(a,b,c) (((a)<<16)|((b)<<8)|(c))
|
||||
#define MPEG2_RELEASE MPEG2_VERSION (0, 4, 0) /* 0.4.0 */
|
||||
#define MPEG2_RELEASE MPEG2_VERSION (0, 4, 1) /* 0.4.1 */
|
||||
|
||||
#define SEQ_FLAG_MPEG2 1
|
||||
#define SEQ_FLAG_CONSTRAINED_PARAMETERS 2
|
||||
|
@ -20,7 +20,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
|
||||
* detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
|
||||
* $Id$
|
||||
*/
|
||||
|
@ -21,7 +21,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
|
||||
* Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
|
||||
* detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
|
||||
* $Id$
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user