1 /************************************************************************** 2 * 3 * Copyright 2011 Christian König 4 * All Rights Reserved. 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a 7 * copy of this software and associated documentation files (the 8 * "Software"), to deal in the Software without restriction, including 9 * without limitation the rights to use, copy, modify, merge, publish, 10 * distribute, sub license, and/or sell copies of the Software, and to 11 * permit persons to whom the Software is furnished to do so, subject to 12 * the following conditions: 13 * 14 * The above copyright notice and this permission notice (including the 15 * next paragraph) shall be included in all copies or substantial portions 16 * of the Software. 17 * 18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 21 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR 22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 * 26 **************************************************************************/ 27 28 #include "vl_zscan_data.h" 29 30 const int vl_zscan_normal_16[] = 31 { 32 /* Zig-Zag scan pattern */ 33 0, 1, 4, 8, 5, 2, 3, 6, 34 9,12,13,10, 7,11,14,15 35 }; 36 37 const int vl_zscan_linear[] = 38 { 39 /* Linear scan pattern */ 40 0, 1, 2, 3, 4, 5, 6, 7, 41 8, 9,10,11,12,13,14,15, 42 16,17,18,19,20,21,22,23, 43 24,25,26,27,28,29,30,31, 44 32,33,34,35,36,37,38,39, 45 40,41,42,43,44,45,46,47, 46 48,49,50,51,52,53,54,55, 47 56,57,58,59,60,61,62,63 48 }; 49 50 const int vl_zscan_normal[] = 51 { 52 /* Zig-Zag scan pattern */ 53 0, 1, 8,16, 9, 2, 3,10, 54 17,24,32,25,18,11, 4, 5, 55 12,19,26,33,40,48,41,34, 56 27,20,13, 6, 7,14,21,28, 57 35,42,49,56,57,50,43,36, 58 29,22,15,23,30,37,44,51, 59 58,59,52,45,38,31,39,46, 60 53,60,61,54,47,55,62,63 61 }; 62 63 const int vl_zscan_alternate[] = 64 { 65 /* Alternate scan pattern */ 66 0, 8,16,24, 1, 9, 2,10, 67 17,25,32,40,48,56,57,49, 68 41,33,26,18, 3,11, 4,12, 69 19,27,34,42,50,58,35,43, 70 51,59,20,28, 5,13, 6,14, 71 21,29,36,44,52,60,37,45, 72 53,61,22,30, 7,15,23,31, 73 38,46,54,62,39,47,55,63 74 }; 75 76 const int vl_zscan_h265_up_right_diagonal_16[] = 77 { 78 /* Up-right diagonal scan order for 4x4 blocks - see H.265 section 6.5.3. */ 79 0, 4, 1, 8, 5, 2, 12, 9, 80 6, 3, 13, 10, 7, 14, 11, 15, 81 }; 82 83 const int vl_zscan_h265_up_right_diagonal[] = 84 { 85 /* Up-right diagonal scan order for 8x8 blocks - see H.265 section 6.5.3. */ 86 0, 8, 1, 16, 9, 2, 24, 17, 87 10, 3, 32, 25, 18, 11, 4, 40, 88 33, 26, 19, 12, 5, 48, 41, 34, 89 27, 20, 13, 6, 56, 49, 42, 35, 90 28, 21, 14, 7, 57, 50, 43, 36, 91 29, 22, 15, 58, 51, 44, 37, 30, 92 23, 59, 52, 45, 38, 31, 60, 53, 93 46, 39, 61, 54, 47, 62, 55, 63, 94 }; 95