;
; yuvtables.s
; Copyright (C) 2002 P.Everett <peter@everett9981.freeserve.co.uk>
;
; This file is part of KinoAMP, a free RISCOS MPEG program stream decoder.
;
; KinoAMP is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; KinoAMP is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
;
; 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
;

; colour translation tables

  AREA |A$$zidata|, DATA, NOINIT

  ALIGN 32
  EXPORT ka_Y_Map
  EXPORT ka_UV_Map
ka_Y_Map % 256
ka_UV_Map % 256

; Ur, Ug [0, 255]
; Vb, Vg [0, 255]
  EXPORT ka_V_Table
  EXPORT ka_U_Table
ka_U_Table % 256*4
ka_V_Table % 256*4

  ALIGN 32
; Yc [-224*2, 255+ 224*2] for 16M
  EXPORT ka_Yc_Table_8bit
  EXPORT ka_Yc0_Table_8bit
ka_Yc_Table_8bit  % 224*2
ka_Yc0_Table_8bit % 256+224*2
                  % 224*2+256+224*2  ; repeat for alternate luminance table

  ALIGN 32
; Yc [-224*2, 255+ 224*2] for 64K (green)
  EXPORT ka_Yc_Table_6bit
  EXPORT ka_Yc0_Table_6bit
ka_Yc_Table_6bit  % 224*2
ka_Yc0_Table_6bit % 256+224*2
                  % 224*2+256+224*2  ; repeat for alternate luminance table

  ALIGN 32
; Yc [-224*2, 255+ 224*2] for 64K (green)
  EXPORT ka_Yc_Table_6bit_hi_q
  EXPORT ka_Yc0_Table_6bit_hi_q
ka_Yc_Table_6bit_hi_q  % 4*(224*2)
ka_Yc0_Table_6bit_hi_q % 4*(256+224*2)

  ALIGN 32
; Yc [-224*2, 255+ 224*2] for 32K or 64K (except green)
  EXPORT ka_Yc_Table_5bit
  EXPORT ka_Yc0_Table_5bit
ka_Yc_Table_5bit  % 224*2
ka_Yc0_Table_5bit % 256+224*2
                  % 224*2+256+224*2  ; repeat for alternate luminance table

  ALIGN 32
; Yc [-224*2, 255+ 224*2] for 32K or 64K (except green)
  EXPORT ka_Yc_Table_5bit_hi_q
  EXPORT ka_Yc0_Table_5bit_hi_q
ka_Yc_Table_5bit_hi_q  % 4*(224*2)
ka_Yc0_Table_5bit_hi_q % 4*(256+224*2)

  ALIGN 32
; Yc [-224*2, 255+ 224*2] for 4K
  EXPORT ka_Yc_Table_4bit
  EXPORT ka_Yc0_Table_4bit
ka_Yc_Table_4bit  % 224*2
ka_Yc0_Table_4bit % 256+224*2
                  % 224*2+256+224*2  ; repeat for alternate luminance table

  ALIGN 32
; Yc [-224*2, 255+ 224*2] for 4K
  EXPORT ka_Yc_Table_4bit_hi_q
  EXPORT ka_Yc0_Table_4bit_hi_q
ka_Yc_Table_4bit_hi_q  % 4*(224*2)
ka_Yc0_Table_4bit_hi_q % 4*(256+224*2)

  ALIGN 32
  END
