pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/multimedia/xine-lib Disable mutex debugging by default...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3fad37008d65
branches: trunk
changeset: 517538:3fad37008d65
user: joerg <joerg%pkgsrc.org@localhost>
date: Mon Aug 14 12:15:38 2006 +0000
description:
Disable mutex debugging by default, it results in Xine spinning around
all the time at least on DragonFly. Move some inline functions around
so that they exist before they are used, avoiding compilation errors
on DragonFly where -fno-unit-at-a-time is disable by default.
diffstat:
multimedia/xine-lib/Makefile | 3 +-
multimedia/xine-lib/distinfo | 6 +-
multimedia/xine-lib/patches/patch-bh | 14 +
multimedia/xine-lib/patches/patch-da | 848 ++++++++++++++++++
multimedia/xine-lib/patches/patch-db | 1566 ++++++++++++++++++++++++++++++++++
multimedia/xine-lib/patches/patch-dc | 382 ++++++++
6 files changed, 2817 insertions(+), 2 deletions(-)
diffs (truncated from 2859 to 300 lines):
diff -r 14a64af683fd -r 3fad37008d65 multimedia/xine-lib/Makefile
--- a/multimedia/xine-lib/Makefile Mon Aug 14 09:57:14 2006 +0000
+++ b/multimedia/xine-lib/Makefile Mon Aug 14 12:15:38 2006 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.40 2006/08/06 10:36:50 wiz Exp $
+# $NetBSD: Makefile,v 1.41 2006/08/14 12:15:38 joerg Exp $
.include "Makefile.common"
COMMENT= Multimedia player library
+PKGREVISION= 1
BUILDLINK_API_DEPENDS.vcdimager+= vcdimager>=0.7.20nb1
diff -r 14a64af683fd -r 3fad37008d65 multimedia/xine-lib/distinfo
--- a/multimedia/xine-lib/distinfo Mon Aug 14 09:57:14 2006 +0000
+++ b/multimedia/xine-lib/distinfo Mon Aug 14 12:15:38 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.35 2006/08/06 10:36:50 wiz Exp $
+$NetBSD: distinfo,v 1.36 2006/08/14 12:15:38 joerg Exp $
SHA1 (xine-lib-1.1.2.tar.bz2) = 07e454e2287e34414b598faf78ae6d8ab8ffbb69
RMD160 (xine-lib-1.1.2.tar.bz2) = 21322d6d7e085237926741495d70f5ce7764910b
@@ -25,5 +25,9 @@
SHA1 (patch-bd) = 5352293022da25b08598d42655af2524ff99b28a
SHA1 (patch-be) = d076593d15c58762e84f53964fb90c61873e7a45
SHA1 (patch-bg) = aa1a8960d597113825993be59db45644a620e99d
+SHA1 (patch-bh) = 443e5f542c6d3f5162e5c9c34b0d4311f9138a5a
SHA1 (patch-cb) = 08d9920022988d2764d941cfa8b1aa5602a0ec81
SHA1 (patch-cd) = a080c745d08ded46db7c1173fe55350c1eb9ff33
+SHA1 (patch-da) = 7cb3cb60fd47720f081a101f80f9b53da7696c78
+SHA1 (patch-db) = 07214343b63a5e3bad774e8a18b3d8533526b97d
+SHA1 (patch-dc) = 218fbda52fffecb02993695116fcca0fbf65346e
diff -r 14a64af683fd -r 3fad37008d65 multimedia/xine-lib/patches/patch-bh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/xine-lib/patches/patch-bh Mon Aug 14 12:15:38 2006 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-bh,v 1.3 2006/08/14 12:15:38 joerg Exp $
+
+--- src/xine-utils/xine_mutex.c.orig 2006-06-23 18:24:22.000000000 +0000
++++ src/xine-utils/xine_mutex.c
+@@ -29,7 +29,9 @@
+ #include <pthread.h>
+ #include "xineutils.h"
+
++#if 0
+ #define DBG_MUTEX
++#endif
+
+ int xine_mutex_init (xine_mutex_t *mutex, const pthread_mutexattr_t *mutexattr,
+ const char *id) {
diff -r 14a64af683fd -r 3fad37008d65 multimedia/xine-lib/patches/patch-da
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/xine-lib/patches/patch-da Mon Aug 14 12:15:38 2006 +0000
@@ -0,0 +1,848 @@
+$NetBSD: patch-da,v 1.1 2006/08/14 12:15:38 joerg Exp $
+
+Move some inlined functions to a place before they are used,
+otherwise GCC barfs when -fno-unit-a-time is active.
+
+--- src/libffmpeg/libavcodec/h263.c.orig 2006-08-14 11:26:49.000000000 +0000
++++ src/libffmpeg/libavcodec/h263.c
+@@ -3395,6 +3395,53 @@ static inline int get_amv(MpegEncContext
+ }
+
+ /**
++ * decodes the dc value.
++ * @param n block index (0-3 are luma, 4-5 are chroma)
++ * @param dir_ptr the prediction direction will be stored here
++ * @return the quantized dc
++ */
++static inline int mpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr)
++{
++ int level, code;
++
++ if (n < 4)
++ code = get_vlc2(&s->gb, dc_lum.table, DC_VLC_BITS, 1);
++ else
++ code = get_vlc2(&s->gb, dc_chrom.table, DC_VLC_BITS, 1);
++ if (code < 0 || code > 9 /* && s->nbit<9 */){
++ av_log(s->avctx, AV_LOG_ERROR, "illegal dc vlc\n");
++ return -1;
++ }
++ if (code == 0) {
++ level = 0;
++ } else {
++ if(IS_3IV1){
++ if(code==1)
++ level= 2*get_bits1(&s->gb)-1;
++ else{
++ if(get_bits1(&s->gb))
++ level = get_bits(&s->gb, code-1) + (1<<(code-1));
++ else
++ level = -get_bits(&s->gb, code-1) - (1<<(code-1));
++ }
++ }else{
++ level = get_xbits(&s->gb, code);
++ }
++
++ if (code > 8){
++ if(get_bits1(&s->gb)==0){ /* marker */
++ if(s->error_resilience>=2){
++ av_log(s->avctx, AV_LOG_ERROR, "dc marker bit missing\n");
++ return -1;
++ }
++ }
++ }
++ }
++
++ return ff_mpeg4_pred_dc(s, n, level, dir_ptr, 0);
++}
++
++/**
+ * decodes first partition.
+ * @return number of MBs decoded or <0 if an error occured
+ */
+@@ -3700,125 +3747,380 @@ int ff_mpeg4_decode_partitions(MpegEncCo
+ }
+
+ /**
+- * decode partition C of one MB.
++ * decodes a block.
+ * @return <0 if an error occured
+ */
+-static int mpeg4_decode_partitioned_mb(MpegEncContext *s, DCTELEM block[6][64])
++static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
++ int n, int coded, int intra, int rvlc)
+ {
+- int cbp, mb_type;
+- const int xy= s->mb_x + s->mb_y*s->mb_stride;
++ int level, i, last, run;
++ int dc_pred_dir;
++ RLTable * rl;
++ RL_VLC_ELEM * rl_vlc;
++ const uint8_t * scan_table;
++ int qmul, qadd;
+
+- mb_type= s->current_picture.mb_type[xy];
+- cbp = s->cbp_table[xy];
++ //Note intra & rvlc should be optimized away if this is inlined
+
+- if(s->current_picture.qscale_table[xy] != s->qscale){
+- ff_set_qscale(s, s->current_picture.qscale_table[xy] );
+- }
++ if(intra) {
++ if(s->qscale < s->intra_dc_threshold){
++ /* DC coef */
++ if(s->partitioned_frame){
++ level = s->dc_val[0][ s->block_index[n] ];
++ if(n<4) level= FASTDIV((level + (s->y_dc_scale>>1)), s->y_dc_scale);
++ else level= FASTDIV((level + (s->c_dc_scale>>1)), s->c_dc_scale);
++ dc_pred_dir= (s->pred_dir_table[s->mb_x + s->mb_y*s->mb_stride]<<n)&32;
++ }else{
++ level = mpeg4_decode_dc(s, n, &dc_pred_dir);
++ if (level < 0)
++ return -1;
++ }
++ block[0] = level;
++ i = 0;
++ }else{
++ i = -1;
++ }
++ if (!coded)
++ goto not_coded;
+
+- if (s->pict_type == P_TYPE || s->pict_type==S_TYPE) {
+- int i;
+- for(i=0; i<4; i++){
+- s->mv[0][i][0] = s->current_picture.motion_val[0][ s->block_index[i] ][0];
+- s->mv[0][i][1] = s->current_picture.motion_val[0][ s->block_index[i] ][1];
++ if(rvlc){
++ rl = &rvlc_rl_intra;
++ rl_vlc = rvlc_rl_intra.rl_vlc[0];
++ }else{
++ rl = &rl_intra;
++ rl_vlc = rl_intra.rl_vlc[0];
+ }
+- s->mb_intra = IS_INTRA(mb_type);
++ if (s->ac_pred) {
++ if (dc_pred_dir == 0)
++ scan_table = s->intra_v_scantable.permutated; /* left */
++ else
++ scan_table = s->intra_h_scantable.permutated; /* top */
++ } else {
++ scan_table = s->intra_scantable.permutated;
++ }
++ qmul=1;
++ qadd=0;
++ } else {
++ i = -1;
++ if (!coded) {
++ s->block_last_index[n] = i;
++ return 0;
++ }
++ if(rvlc) rl = &rvlc_rl_inter;
++ else rl = &rl_inter;
+
+- if (IS_SKIP(mb_type)) {
+- /* skip mb */
+- for(i=0;i<6;i++)
+- s->block_last_index[i] = -1;
+- s->mv_dir = MV_DIR_FORWARD;
+- s->mv_type = MV_TYPE_16X16;
+- if(s->pict_type==S_TYPE && s->vol_sprite_usage==GMC_SPRITE){
+- s->mcsel=1;
+- s->mb_skipped = 0;
+- }else{
+- s->mcsel=0;
+- s->mb_skipped = 1;
+- }
+- }else if(s->mb_intra){
+- s->ac_pred = IS_ACPRED(s->current_picture.mb_type[xy]);
+- }else if(!s->mb_intra){
+-// s->mcsel= 0; //FIXME do we need to init that
++ scan_table = s->intra_scantable.permutated;
+
+- s->mv_dir = MV_DIR_FORWARD;
+- if (IS_8X8(mb_type)) {
+- s->mv_type = MV_TYPE_8X8;
+- } else {
+- s->mv_type = MV_TYPE_16X16;
++ if(s->mpeg_quant){
++ qmul=1;
++ qadd=0;
++ if(rvlc){
++ rl_vlc = rvlc_rl_inter.rl_vlc[0];
++ }else{
++ rl_vlc = rl_inter.rl_vlc[0];
+ }
+- }
+- } else { /* I-Frame */
+- s->mb_intra = 1;
+- s->ac_pred = IS_ACPRED(s->current_picture.mb_type[xy]);
+- }
+-
+- if (!IS_SKIP(mb_type)) {
+- int i;
+- s->dsp.clear_blocks(s->block[0]);
+- /* decode each block */
+- for (i = 0; i < 6; i++) {
+- if(mpeg4_decode_block(s, block[i], i, cbp&32, s->mb_intra, s->rvlc) < 0){
+- av_log(s->avctx, AV_LOG_ERROR, "texture corrupted at %d %d %d\n", s->mb_x, s->mb_y, s->mb_intra);
+- return -1;
++ }else{
++ qmul = s->qscale << 1;
++ qadd = (s->qscale - 1) | 1;
++ if(rvlc){
++ rl_vlc = rvlc_rl_inter.rl_vlc[s->qscale];
++ }else{
++ rl_vlc = rl_inter.rl_vlc[s->qscale];
+ }
+- cbp+=cbp;
+ }
+ }
++ {
++ OPEN_READER(re, &s->gb);
++ for(;;) {
++ UPDATE_CACHE(re, &s->gb);
++ GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 0);
++ if (level==0) {
++ /* escape */
++ if(rvlc){
++ if(SHOW_UBITS(re, &s->gb, 1)==0){
++ av_log(s->avctx, AV_LOG_ERROR, "1. marker bit missing in rvlc esc\n");
++ return -1;
++ }; SKIP_CACHE(re, &s->gb, 1);
+
+- /* per-MB end of slice check */
++ last= SHOW_UBITS(re, &s->gb, 1); SKIP_CACHE(re, &s->gb, 1);
++ run= SHOW_UBITS(re, &s->gb, 6); LAST_SKIP_CACHE(re, &s->gb, 6);
++ SKIP_COUNTER(re, &s->gb, 1+1+6);
++ UPDATE_CACHE(re, &s->gb);
+
+- if(--s->mb_num_left <= 0){
+-//printf("%06X %d\n", show_bits(&s->gb, 24), s->gb.size_in_bits - get_bits_count(&s->gb));
+- if(mpeg4_is_resync(s))
+- return SLICE_END;
+- else
+- return SLICE_NOEND;
+- }else{
+- if(mpeg4_is_resync(s)){
+- const int delta= s->mb_x + 1 == s->mb_width ? 2 : 1;
+- if(s->cbp_table[xy+delta])
+- return SLICE_END;
+- }
+- return SLICE_OK;
+- }
+-}
++ if(SHOW_UBITS(re, &s->gb, 1)==0){
++ av_log(s->avctx, AV_LOG_ERROR, "2. marker bit missing in rvlc esc\n");
++ return -1;
++ }; SKIP_CACHE(re, &s->gb, 1);
+
+-/**
+- * read the next MVs for OBMC. yes this is a ugly hack, feel free to send a patch :)
+- */
+-static void preview_obmc(MpegEncContext *s){
+- GetBitContext gb= s->gb;
++ level= SHOW_UBITS(re, &s->gb, 11); SKIP_CACHE(re, &s->gb, 11);
+
Home |
Main Index |
Thread Index |
Old Index