/*****************************************************************************
 *  File: main.cpp
 *
 *  This file is the top level of the application selector.
 *
 ****************************************************************************/

// #include <stdio.h>
// #include <stdlib.h>

#include "system.h"
// #include "altera_avalon_pio_regs.h"

#include "VIP_ctrl\vip_wrapper_for_c_func.h"
#include "audio_tvdecoder\tvdecoder_ctrl.h"

#define LCD_W 800
#define LCD_H 480

#define FRAME_W 640
#define FRAME_H 480

int main()
{

  init_i2c();
  tv_decoder_init();

//  IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, 3);

  Scaler_init();
  
  Mixer_init();


  Mixer_set_layer_position(1, (LCD_W - FRAME_W)/2, (LCD_H - FRAME_H)/2);
  Scaler_set_output_size(FRAME_W, FRAME_H);

  while(1) {}


  return ( 0 );
}
