[MPlayer-cvslog] r31354 - in trunk/libmpeg2: decode.c header.c libmpeg2_changes.diff

diego subversion at mplayerhq.hu
Wed Jun 9 16:35:31 CEST 2010


Author: diego
Date: Wed Jun  9 16:35:31 2010
New Revision: 31354

Log:
Remove stale leftovers from MPlayer-specific buffer handling in libmpeg2.

Modified:
   trunk/libmpeg2/decode.c
   trunk/libmpeg2/header.c
   trunk/libmpeg2/libmpeg2_changes.diff

Modified: trunk/libmpeg2/decode.c
==============================================================================
--- trunk/libmpeg2/decode.c	Wed Jun  9 15:44:32 2010	(r31353)
+++ trunk/libmpeg2/decode.c	Wed Jun  9 16:35:31 2010	(r31354)
@@ -19,10 +19,6 @@
  * You should have received a copy of the GNU General Public License
  * 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 libmpeg2_changes.diff for the exact changes.
- * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
- * $Id$
  */
 
 #include "config.h"
@@ -349,15 +345,6 @@ void mpeg2_set_buf (mpeg2dec_t * mpeg2de
     fbuf->buf[1] = buf[1];
     fbuf->buf[2] = buf[2];
     fbuf->id = id;
-    // HACK! FIXME! At first I frame, copy pointers to prediction frame too!
-    if (mpeg2dec->custom_fbuf && !mpeg2dec->fbuf[1]->buf[0]){
-	mpeg2dec->fbuf[1]->buf[0]=buf[0];
-	mpeg2dec->fbuf[1]->buf[1]=buf[1];
-	mpeg2dec->fbuf[1]->buf[2]=buf[2];
-	mpeg2dec->fbuf[1]->id=NULL;
-    }
-//    printf("libmpeg2: FBUF 0:%p 1:%p 2:%p\n",
-//	mpeg2dec->fbuf[0]->buf[0],mpeg2dec->fbuf[1]->buf[0],mpeg2dec->fbuf[2]->buf[0]);
 }
 
 void mpeg2_custom_fbuf (mpeg2dec_t * mpeg2dec, int custom_fbuf)

Modified: trunk/libmpeg2/header.c
==============================================================================
--- trunk/libmpeg2/header.c	Wed Jun  9 15:44:32 2010	(r31353)
+++ trunk/libmpeg2/header.c	Wed Jun  9 16:35:31 2010	(r31354)
@@ -104,9 +104,6 @@ void mpeg2_header_state_init (mpeg2dec_t
     mpeg2dec->decoder.convert = NULL;
     mpeg2dec->decoder.convert_id = NULL;
     mpeg2dec->picture = mpeg2dec->pictures;
-    memset(&mpeg2dec->fbuf_alloc[0].fbuf, 0, sizeof(mpeg2_fbuf_t));
-    memset(&mpeg2dec->fbuf_alloc[1].fbuf, 0, sizeof(mpeg2_fbuf_t));
-    memset(&mpeg2dec->fbuf_alloc[2].fbuf, 0, sizeof(mpeg2_fbuf_t));
     mpeg2dec->fbuf[0] = &mpeg2dec->fbuf_alloc[0].fbuf;
     mpeg2dec->fbuf[1] = &mpeg2dec->fbuf_alloc[1].fbuf;
     mpeg2dec->fbuf[2] = &mpeg2dec->fbuf_alloc[2].fbuf;

Modified: trunk/libmpeg2/libmpeg2_changes.diff
==============================================================================
--- trunk/libmpeg2/libmpeg2_changes.diff	Wed Jun  9 15:44:32 2010	(r31353)
+++ trunk/libmpeg2/libmpeg2_changes.diff	Wed Jun  9 16:35:31 2010	(r31354)
@@ -126,36 +126,8 @@ Index: libmpeg2/cpu_state.c
      if (accel & MPEG2_ACCEL_PPC_ALTIVEC) {
  	mpeg2_cpu_state_save = state_save_altivec;
  	mpeg2_cpu_state_restore = state_restore_altivec;
---- libmpeg2/decode.c	2006-06-16 20:12:26.000000000 +0200
-+++ libmpeg2/decode.c	2006-06-16 20:12:50.000000000 +0200
-@@ -345,6 +349,15 @@
-     fbuf->buf[1] = buf[1];
-     fbuf->buf[2] = buf[2];
-     fbuf->id = id;
-+    // HACK! FIXME! At first I frame, copy pointers to prediction frame too!
-+    if (mpeg2dec->custom_fbuf && !mpeg2dec->fbuf[1]->buf[0]){
-+	mpeg2dec->fbuf[1]->buf[0]=buf[0];
-+	mpeg2dec->fbuf[1]->buf[1]=buf[1];
-+	mpeg2dec->fbuf[1]->buf[2]=buf[2];
-+	mpeg2dec->fbuf[1]->id=NULL;
-+    }
-+//    printf("libmpeg2: FBUF 0:%p 1:%p 2:%p\n",
-+//	mpeg2dec->fbuf[0]->buf[0],mpeg2dec->fbuf[1]->buf[0],mpeg2dec->fbuf[2]->buf[0]);
- }
-
- void mpeg2_custom_fbuf (mpeg2dec_t * mpeg2dec, int custom_fbuf)
 --- libmpeg2/header.c	2006-06-16 20:12:26.000000000 +0200
 +++ libmpeg2/header.c	2006-06-16 20:12:50.000000000 +0200
-@@ -100,6 +104,9 @@
-     mpeg2dec->decoder.convert = NULL;
-     mpeg2dec->decoder.convert_id = NULL;
-     mpeg2dec->picture = mpeg2dec->pictures;
-+    memset(&mpeg2dec->fbuf_alloc[0].fbuf, 0, sizeof(mpeg2_fbuf_t));
-+    memset(&mpeg2dec->fbuf_alloc[1].fbuf, 0, sizeof(mpeg2_fbuf_t));
-+    memset(&mpeg2dec->fbuf_alloc[2].fbuf, 0, sizeof(mpeg2_fbuf_t));
-     mpeg2dec->fbuf[0] = &mpeg2dec->fbuf_alloc[0].fbuf;
-     mpeg2dec->fbuf[1] = &mpeg2dec->fbuf_alloc[1].fbuf;
-     mpeg2dec->fbuf[2] = &mpeg2dec->fbuf_alloc[2].fbuf;
 @@ -872,6 +879,7 @@
  	mpeg2dec->scaled[idx] = decoder->q_scale_type;
  	for (i = 0; i < 32; i++) {


More information about the MPlayer-cvslog mailing list