00001 /* 00002 * Apple ProRes compatible decoder 00003 * 00004 * Copyright (c) 2010-2011 Maxim Poliakovski 00005 * 00006 * This file is part of Libav. 00007 * 00008 * Libav is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2.1 of the License, or (at your option) any later version. 00012 * 00013 * Libav is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with Libav; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00021 */ 00022 00023 #include "proresdata.h" 00024 00025 const uint8_t ff_prores_progressive_scan[64] = { 00026 0, 1, 8, 9, 2, 3, 10, 11, 00027 16, 17, 24, 25, 18, 19, 26, 27, 00028 4, 5, 12, 20, 13, 6, 7, 14, 00029 21, 28, 29, 22, 15, 23, 30, 31, 00030 32, 33, 40, 48, 41, 34, 35, 42, 00031 49, 56, 57, 50, 43, 36, 37, 44, 00032 51, 58, 59, 52, 45, 38, 39, 46, 00033 53, 60, 61, 54, 47, 55, 62, 63 00034 }; 00035 00036 const uint8_t ff_prores_interlaced_scan[64] = { 00037 0, 8, 1, 9, 16, 24, 17, 25, 00038 2, 10, 3, 11, 18, 26, 19, 27, 00039 32, 40, 33, 34, 41, 48, 56, 49, 00040 42, 35, 43, 50, 57, 58, 51, 59, 00041 4, 12, 5, 6, 13, 20, 28, 21, 00042 14, 7, 15, 22, 29, 36, 44, 37, 00043 30, 23, 31, 38, 45, 52, 60, 53, 00044 46, 39, 47, 54, 61, 62, 55, 63 00045 }; 00046 00047 00048 const uint8_t ff_prores_dc_codebook[4] = { 00049 0x04, // rice_order = 0, exp_golomb_order = 1, switch_bits = 0 00050 0x28, // rice_order = 1, exp_golomb_order = 2, switch_bits = 0 00051 0x4D, // rice_order = 2, exp_golomb_order = 3, switch_bits = 1 00052 0x70 // rice_order = 3, exp_golomb_order = 4, switch_bits = 0 00053 }; 00054 00055 const uint8_t ff_prores_ac_codebook[7] = { 00056 0x04, // rice_order = 0, exp_golomb_order = 1, switch_bits = 0 00057 0x28, // rice_order = 1, exp_golomb_order = 2, switch_bits = 0 00058 0x4C, // rice_order = 2, exp_golomb_order = 3, switch_bits = 0 00059 0x05, // rice_order = 0, exp_golomb_order = 1, switch_bits = 1 00060 0x29, // rice_order = 1, exp_golomb_order = 2, switch_bits = 1 00061 0x06, // rice_order = 0, exp_golomb_order = 1, switch_bits = 2 00062 0x0A, // rice_order = 0, exp_golomb_order = 2, switch_bits = 2 00063 }; 00064 00069 const uint8_t ff_prores_run_to_cb_index[16] = 00070 { 5, 5, 3, 3, 0, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 2 }; 00071 00072 const uint8_t ff_prores_lev_to_cb_index[10] = { 0, 6, 3, 5, 0, 1, 1, 1, 1, 2 };