/*****************************************************************************
 *
 * This software module was originally developed by
 *
 *   Ryuji Kitaura  (Sharp Corporation)
 *   Hisashi Saiga  (Sharp Corporation)
 *   Tomoko Aono    (Sharp Corporation)
 *   Hiroyuki Katata(Sharp Corporation)
 *
 * in the course of development of the MPEG-4 Video (ISO/IEC 14496-2) standard.
 * This software module is an implementation of a part of one or more MPEG-4
 * Video (ISO/IEC 14496-2) tools as specified by the MPEG-4 Video (ISO/IEC
 * 14496-2) standard.
 *
 * ISO/IEC gives users of the MPEG-4 Video (ISO/IEC 14496-2) standard free
 * license to this software module or modifications thereof for use in hardware
 * or software products claiming conformance to the MPEG-4 Video (ISO/IEC
 * 14496-2) standard.
 *
 * Those intending to use this software module in hardware or software products
 * are advised that its use may infringe existing patents. The original
 * developer of this software module and his/her company, the subsequent
 * editors and their companies, and ISO/IEC have no liability for use of this
 * software module or modifications thereof in an implementation. Copyright is
 * not released for non MPEG-4 Video (ISO/IEC 14496-2) Standard conforming
 * products.
 *
 * Sharp Corporation retains full right to use the code for his/her own
 * purpose, assign or donate the code to a third party and to inhibit third
 * parties from using the code for non MPEG-4 Video (ISO/IEC 14496-2) Standard
 * conforming products. This copyright notice must be included in all copies or
 * derivative works.
 *
 * Copyright (c) 1997
 *
 *****************************************************************************/
/************************************************************************/
/*                                                                      */
/* This software module was originally developed by                     */
/*                                                                      */
/*  Ryuji Kitaura  (Sharp Corporation)                                  */
/*  Hisashi Saiga  (Sharp Corporation)                                  */
/*  Tomoko Aono    (Sharp Corporation)                                  */
/*  Hiroyuki Katata(Sharp Corporation)                                  */
/*                                                                      */
/* in the course of development of the MPEG-4 Video(ISO/IEC 14496-2).   */
/* This software module is an implementation of a part of one or        */
/* more MPEG-4 Video tools as specified by the MPEG-4 Video             */
/* (ISO/IEC 14496-2).                                                   */
/*                                                                      */
/* ISO/IEC gives users of the MPEG-4 Video(ISO/IEC 14496-2)             */
/* free license to this software module or modifications thereof        */
/* for use in hardware or software products claiming conformance        */
/* to the MPEG-4 Video(ISO/IEC 14496-2).                                */
/*                                                                      */
/* Those intending to use this software                                 */
/* module in hardware or software products are advised that its         */
/* use may infringe existing patents. The original developer of         */
/* this software module and his/her company, the subsequent             */
/* editors and their companies, and ISO/IEC have no liability           */
/* for use of this software module or modifications thereof in          */
/* an implementation. Copyright is not released for non                 */
/* MPEG-4 Video(ISO/IEC 14496-2) conforming products                    */
/*                                                                      */
/* ACTS-MoMuSys partners retain full right to use the code for          */
/* their own purposes, assign or donate the code to a third party       */
/* and to inhibit third parties from using the code for non             */
/* MPEG-4 Video(ISO/IEC 14496-2) conforming products.                   */
/*                                                                      */
/* This copyright notice must be included in all copies or              */
/* derivative works.                                                    */
/* Copyright (c)1997                                                    */
/*                                                                      */
/************************************************************************/




/* =============================================================================
Encoder of VM ver 1.1(Mar. 11, 1996)

Copyright (C) 1996 Sharp Corporation


TMN version 1.6 is changed to VM ver 1.1
Modified:
  25.07.97 F. Jaureguizar: Delete PictImage *InitImage(Int size); and
           PictImage *FillImage(unsigned char *in, Int size); declarations.
============================================================================= */
/*****************************************************************
 * tmn (TMN encoder) 
 * Written by Karl Olav Lillevold <kol@nta.no>, 1995 Telenor R&D.
 * Donated to the Momusys-project as background code by Telenor. 
 *
 *****************************************************************/

/**********************************************************************
 *
 * Headerfile for TMN4 coder
 * Type definitions and declaration of functions 
 * Date last modified: every now and then
 *
 **********************************************************************/

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<limits.h>

/* This should not be changed */

/* If someone forgets to define a coding format, QCIF is default */
#if (!defined SQCIF && !defined QCIF && !defined CIF && !defined CIF4 && !defined CIF16)
#define QCIF
#endif

/* The coding format is decided here. */
#ifdef SQCIF
#define DEF_PELS 128
#define DEF_LINES 96
#endif
#ifdef QCIF
#define DEF_PELS 176
#define DEF_LINES 144
#endif
#ifdef CIF
#define DEF_PELS 352
#define DEF_LINES 288
#endif
#ifdef CIF4
#define DEF_PELS 704
#define DEF_LINES 576
#endif
#ifdef CIF16
#define DEF_PELS 1408
#define DEF_LINES 1152
#endif

/* globals */
Int pels;
Int lines;


/****************************/
/* Structure with image data */

typedef struct pict_image {
  unsigned char *lum;		/* Luminance plane		*/
  unsigned char *Cr;		/* Cr plane			*/
  unsigned char *Cb;		/* Cb plane			*/
} PictImage;

/* changed 6/16 */
#include "do_bgc.p"
/**/
