/*****************************************************************************
* block.c: MPEG2 video transrating module
*****************************************************************************
- * Copyright (C) 2003-2004 VideoLAN
+ * Copyright (C) 2003-2004 the VideoLAN team
* Copyright (C) 2003 Antoine Missout
* Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
* Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
*
* 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, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
#define NDEBUG 1
#include <assert.h>
#include <math.h>
-#include <vlc/vlc.h>
-#include <vlc/sout.h>
-#include <vlc/input.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_sout.h>
+#include <vlc_codec.h>
#include "transrate.h"
{
int new_level = new_blk->level;
int level = blk->level;
- if ( i1 > 64 || i2 > 64 || !blk->run || !new_blk->run ) return score;
+ if ( i1 > 64 || i2 > 64 || !blk->run || !new_blk->run ) return score;
if ( i1 + blk->run == i2 + new_blk->run )
{
- int64_t tmp = saturate(level * i_qscale)
+ int64_t tmp = saturate(level * i_qscale)
- saturate(new_level * i_qscale_new);
i1 += blk->run;
i2 += new_blk->run;
if (i < 64 ) goto normal_code;
}
fprintf(stderr, "Err in B14\n");
- tr->b_error = 1;
+ tr->b_error = 1;
break; /* illegal, check needed to avoid buffer overflow */
}
bs_flush( bs, 2 ); /* dump end of block code */
if (i < 64) goto normal_code;
}
fprintf(stderr, "Err in B15\n");
- tr->b_error = 1;
+ tr->b_error = 1;
break; /* illegal, check needed to avoid buffer overflow */
}
bs_flush( bs, 4 ); /* dump end of block code */
if (i < 64) goto normal_code;
}
fprintf(stderr, "Err in non-intra\n");
- tr->b_error = 1;
+ tr->b_error = 1;
break; /* illegal, check needed to avoid buffer overflow */
}
bs_flush( bs, 2 ); /* dump end of block code */