changeset 31288:020ae1402728

Remove stale leftovers from MPlayer-specific buffer handling in libmpeg2.
author diego
date Wed, 09 Jun 2010 14:35:31 +0000
parents 168e89b341b1
children 2dead2f28eac
files libmpeg2/decode.c libmpeg2/header.c libmpeg2/libmpeg2_changes.diff
diffstat 3 files changed, 0 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/libmpeg2/decode.c	Wed Jun 09 13:44:32 2010 +0000
+++ b/libmpeg2/decode.c	Wed Jun 09 14:35:31 2010 +0000
@@ -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 @@
     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)
--- a/libmpeg2/header.c	Wed Jun 09 13:44:32 2010 +0000
+++ b/libmpeg2/header.c	Wed Jun 09 14:35:31 2010 +0000
@@ -104,9 +104,6 @@
     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;
--- a/libmpeg2/libmpeg2_changes.diff	Wed Jun 09 13:44:32 2010 +0000
+++ b/libmpeg2/libmpeg2_changes.diff	Wed Jun 09 14:35:31 2010 +0000
@@ -126,36 +126,8 @@
      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++) {