diff --git a/inc/mpp_err.h b/inc/mpp_err.h index 58156b17..b98f1f7f 100644 --- a/inc/mpp_err.h +++ b/inc/mpp_err.h @@ -39,6 +39,10 @@ typedef enum { MPP_ERR_VPU_CODEC_INIT = MPP_ERR_BASE - 3, MPP_ERR_STREAM = MPP_ERR_BASE - 4, MPP_ERR_FATAL_THREAD = MPP_ERR_BASE - 5, + MPP_ERR_NOMEM = MPP_ERR_BASE - 6, + MPP_ERR_PROTOL = MPP_ERR_BASE - 7, + MPP_FAIL_SPLIT_FRAME = MPP_ERR_BASE - 8, + MPP_ERR_VPUHW = MPP_ERR_BASE - 9, MPP_EOS_STREAM_REACHED = MPP_ERR_BASE - 11, } MPP_RET; diff --git a/inc/rk_type.h b/inc/rk_type.h index 4b736c54..910f4bfb 100644 --- a/inc/rk_type.h +++ b/inc/rk_type.h @@ -56,5 +56,16 @@ typedef signed long long int RK_S64; #ifndef MODULE_TAG #define MODULE_TAG NULL #endif +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif +#ifndef INT64_C +#define INT64_C(c) (c ## LL) +#define UINT64_C(c) (c ## ULL) +#endif #endif /*__RK_TYPE_H__*/ diff --git a/mpp/codec/dec/h265/CMakeLists.txt b/mpp/codec/dec/h265/CMakeLists.txt index b66fe4ac..0ec0b108 100644 --- a/mpp/codec/dec/h265/CMakeLists.txt +++ b/mpp/codec/dec/h265/CMakeLists.txt @@ -1 +1,23 @@ # vim: syntax=cmake +set(H265D_PARSER_HDR + h265d_defs.h + h265d_parser.h + h265d_codec.h + ) + +set(H265D_PARSER_SRC + ../../../mpp_bitread.c + h265d_parser.c + h265d_ps.c + h265d_refs.c + h265d_sei.c + h265d_parser2_syntax.c + ) + +add_library(h265d_parser STATIC + ${H265D_PARSER_SRC} ${H265D_PARSER_HDR} + ) + +target_link_libraries(h265d_parser osal) + +add_subdirectory(test) diff --git a/mpp/codec/dec/h265/h265d_codec.h b/mpp/codec/dec/h265/h265d_codec.h new file mode 100644 index 00000000..5a982c7e --- /dev/null +++ b/mpp/codec/dec/h265/h265d_codec.h @@ -0,0 +1,154 @@ +/* + * + * Copyright 2010 Rockchip Electronics Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * @file h265d_codec.h + * @brief + * @author csy(csy@rock-chips.com) + + * @version 1.0.0 + * @history + * 2015.7.15 : Create + */ + +#ifndef __MPP_CODEC_H__ +#define __MPP_CODEC_H__ + +#include "rk_type.h" +#include "mpp_common.h" +#include "vpu_api.h" +#include "mpp_frame.h" +#include "mpp_dec.h" + +enum MppColorSpace { + MPPCOL_SPC_RGB = 0, + MPPCOL_SPC_BT709 = 1, ///< also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B + MPPCOL_SPC_UNSPECIFIED = 2, + MPPCOL_SPC_FCC = 4, + MPPCOL_SPC_BT470BG = 5, ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 + MPPCOL_SPC_SMPTE170M = 6, ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above + MPPCOL_SPC_SMPTE240M = 7, + MPPCOL_SPC_YCOCG = 8, ///< Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16 + MPPCOL_SPC_NB , ///< Not part of ABI +}; + +enum MppColorRange { + MPPCOL_RANGE_UNSPECIFIED = 0, + MPPCOL_RANGE_MPEG = 1, ///< the normal 219*2^(n-8) "MPEG" YUV ranges + MPPCOL_RANGE_JPEG = 2, ///< the normal 2^n-1 "JPEG" YUV ranges + MPPCOL_RANGE_NB , ///< Not part of ABI +}; + +typedef struct MppRational { + RK_S32 num; ///< numerator + RK_S32 den; ///< denominator +} MppRational_t; + +enum MppPictureStructure { + MPP_PICTURE_STRUCTURE_UNKNOWN, //< unknown + MPP_PICTURE_STRUCTURE_TOP_FIELD, //< coded as top field + MPP_PICTURE_STRUCTURE_BOTTOM_FIELD, //< coded as bottom field + MPP_PICTURE_STRUCTURE_FRAME, //< coded as frame +}; + +#define END_NOT_FOUND (-100) + +typedef struct SplitContext { + RK_U8 *buffer; + RK_U32 buffer_size; + RK_S32 index; + RK_S32 last_index; + RK_U32 state; ///< contains the last few bytes in MSB order + RK_S32 frame_start_found; + RK_S32 overread; ///< the number of bytes which where irreversibly read from the next frame + RK_S32 overread_index; ///< the index into ParseContext.buffer of the overread bytes + RK_U64 state64; ///< contains the last 8 bytes in MSB order + RK_S32 eos; +} SplitContext_t; + +typedef struct H265dContext { + + void *priv_data; + + void *split_cxt; + + /** + * for rk log printf + **/ + // RK_LOG_CONTEX_t *log_ctx; + /** + * display width & height + **/ + RK_S32 width, height; + + /** + *codec decoder width & height + **/ + RK_S32 coded_width, coded_height; + + RK_U8 *extradata; + + RK_U32 extradata_size; + + VideoPacket_t *pkt; + + /** + * Pixel format + **/ + RK_U32 pix_fmt; + + RK_U32 err_recognition; + + /** + * sample aspect ratio (0 if unknown) + * That is the width of a pixel divided by the height of the pixel. + * Numerator and denominator must be relatively prime and smaller than 256 for some video standards. + * - decoding: Set by rkcodec. + */ + MppRational_t sample_aspect_ratio; + + /** + * YUV colorspace type. + * - decoding: Set by rkcodec + */ + enum MppColorSpace colorspace; + + /** + * MPEG vs JPEG YUV range. + * - decoding: Set by rkcodec + */ + enum MppColorRange color_range; + + void *compare_info; + + RK_U32 need_split; + +} H265dContext_t; +#ifdef __cplusplus +extern "C" { +#endif + +RK_S32 h265d_parser2_syntax(void *ctx); + +RK_S32 h265d_syntax_fill_slice(void *ctx, MppBuffer *streambuf); + + +#ifdef __cplusplus +} +#endif + +#endif /* __MPP_CODEC_H__ */ diff --git a/mpp/codec/dec/h265/h265d_defs.h b/mpp/codec/dec/h265/h265d_defs.h new file mode 100644 index 00000000..60f726ac --- /dev/null +++ b/mpp/codec/dec/h265/h265d_defs.h @@ -0,0 +1,45 @@ +/* + * + * Copyright 2010 Rockchip Electronics Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * @file h265d_defs.h + * @brief + * @author csy(csy@rock-chips.com) + + * @version 1.0.0 + * @history + * 2015.7.15 : Create + */ + + +#ifndef __H265D_DEF_H__ +#define __H265D_DEF_H__ + +#ifdef VPS_EXTENSION +#define MAX_VPS_NUM_SCALABILITY_TYPES 16 +#define MAX_VPS_LAYER_ID_PLUS1 MAX_LAYERS +#define MAX_VPS_LAYER_SETS_PLUS1 1024 +#define VPS_EXTN_MASK_AND_DIM_INFO 1 +#define VPS_MOVE_DIR_DEPENDENCY_FLAG 1 +#define VPS_EXTN_DIRECT_REF_LAYERS 1 +#define VPS_EXTN_PROFILE_INFO 1 +#define VPS_PROFILE_OUTPUT_LAYERS 1 +#define VPS_EXTN_OP_LAYER_SETS 1 +#endif +#define DERIVE_LAYER_ID_LIST_VARIABLES 1 + +#endif /* H265D_DEF_H */ diff --git a/mpp/codec/dec/h265/h265d_parser.c b/mpp/codec/dec/h265/h265d_parser.c new file mode 100644 index 00000000..c6a17f7d --- /dev/null +++ b/mpp/codec/dec/h265/h265d_parser.c @@ -0,0 +1,1746 @@ +/* + * + * Copyright 2010 Rockchip Electronics Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * @file h265d_parser.c + * @brief + * @author csy(csy@rock-chips.com) + + * @version 1.0.0 + * @history + * 2015.7.15 : Create + */ +#define MODULE_TAG "H265D_PARSER" +#include "mpp_bitread.h" +#include "h265d_parser.h" +#include "mpp_mem.h" +#include "mpp_env.h" +#include "h265d_syntax.h" + +#define START_CODE 0x000001 ///< start_code_prefix_one_3bytes + +RK_U32 h265d_debug; +//FILE *fp = NULL; +//static RK_U32 start_write = 0, value = 0; + +/** + * Find the end of the current frame in the bitstream. + * @return the position of the first byte of the next frame, or END_NOT_FOUND + */ +static RK_S32 hevc_find_frame_end(SplitContext_t *sc, const RK_U8 *buf, + int buf_size) +{ + RK_S32 i; + + for (i = 0; i < buf_size; i++) { + int nut, layer_id; + + sc->state64 = (sc->state64 << 8) | buf[i]; + + if (((sc->state64 >> 3 * 8) & 0xFFFFFF) != START_CODE) + continue; + nut = (sc->state64 >> (2 * 8 + 1)) & 0x3F; + layer_id = (((sc->state64 >> 2 * 8) & 0x01) << 5) + (((sc->state64 >> 1 * 8) & 0xF8) >> 3); + //mpp_log("nut = %d layer_id = %d\n",nut,layer_id); + // Beginning of access unit + if ((nut >= NAL_VPS && nut <= NAL_AUD) || nut == NAL_SEI_PREFIX || + (nut >= 41 && nut <= 44) || (nut >= 48 && nut <= 55)) { + if (sc->frame_start_found && !layer_id) { + sc->frame_start_found = 0; + return i - 5; + } + } else if (nut <= NAL_RASL_R || + (nut >= NAL_BLA_W_LP && nut <= NAL_CRA_NUT)) { + int first_slice_segment_in_pic_flag = buf[i] >> 7; + //mpp_log("nut = %d first_slice_segment_in_pic_flag %d layer_id = %d \n",nut, + // first_slice_segment_in_pic_flag, + // layer_id); + if (first_slice_segment_in_pic_flag && !layer_id) { + if (!sc->frame_start_found) { + sc->frame_start_found = 1; + } else { // First slice of next frame found + sc->frame_start_found = 0; + return i - 5; + } + } + } + } + return END_NOT_FOUND; +} + +static RK_S32 mpp_combine_frame(SplitContext_t *sc, RK_S32 next, const RK_U8 **buf, RK_S32 *buf_size) +{ + if (sc->overread) { + mpp_log("overread %d, state:%X next:%d index:%d o_index:%d\n", + sc->overread, sc->state, next, sc->index, sc->overread_index); + mpp_log("%X %X %X %X\n", (*buf)[0], (*buf)[1], (*buf)[2], (*buf)[3]); + } + + /* Copy overread bytes from last frame into buffer. */ + for (; sc->overread > 0; sc->overread--) { + sc->buffer[sc->index++] = sc->buffer[sc->overread_index++]; + } + + /* flush remaining if EOF */ + if (!*buf_size && next == END_NOT_FOUND) { + next = 0; + } + + sc->last_index = sc->index; + + /* copy into buffer end return */ + if (next == END_NOT_FOUND) { + RK_U32 min_size = (*buf_size) + sc->index + MPP_INPUT_BUFFER_PADDING_SIZE; + void* new_buffer; + if (min_size > sc->buffer_size) { + min_size = MPP_MAX(17 * min_size / 16 + 32, min_size); + new_buffer = mpp_realloc(sc->buffer, RK_U8, min_size); + if (!new_buffer) { + sc->buffer_size = 0; + return MPP_ERR_NOMEM; + } + sc->buffer_size = min_size; + sc->buffer = new_buffer; + } + + memcpy(&sc->buffer[sc->index], *buf, *buf_size); + sc->index += *buf_size; + + return -1; + } + + *buf_size = + sc->overread_index = sc->index + next; + + /* append to buffer */ + if (sc->index) { + RK_U32 min_size = next + sc->index + MPP_INPUT_BUFFER_PADDING_SIZE; + void* new_buffer; + if (min_size > sc->buffer_size) { + min_size = MPP_MAX(17 * min_size / 16 + 32, min_size); + new_buffer = mpp_realloc(sc->buffer, RK_U8, min_size); + if (!new_buffer) { + sc->buffer_size = 0; + return MPP_ERR_NOMEM; + } + sc->buffer_size = min_size; + sc->buffer = new_buffer; + } + + if (next > -MPP_INPUT_BUFFER_PADDING_SIZE) + memcpy(&sc->buffer[sc->index], *buf, + next + MPP_INPUT_BUFFER_PADDING_SIZE); + sc->index = 0; + *buf = sc->buffer; + } + + /* store overread bytes */ + for (; next < 0; next++) { + sc->state = (sc->state << 8) | sc->buffer[sc->last_index + next]; + sc->state64 = (sc->state64 << 8) | sc->buffer[sc->last_index + next]; + sc->overread++; + } + + if (sc->overread) { + mpp_log("overread %d, state:%X next:%d index:%d o_index:%d\n", + sc->overread, sc->state, next, sc->index, sc->overread_index); + mpp_log("%X %X %X %X\n", (*buf)[0], (*buf)[1], (*buf)[2], (*buf)[3]); + } + + return 0; +} + +RK_S32 h265d_split_init(void **sc) +{ + SplitContext_t *s = NULL; + if (s == NULL) { + s = mpp_calloc(SplitContext_t, 1); + if (s != NULL) { + *sc = s; + } else { + mpp_err("split alloc context fail"); + return MPP_ERR_NOMEM; + } + } + return MPP_OK; +} + +RK_S32 h265d_split_frame(void *sc, + const RK_U8 **poutbuf, RK_S32 *poutbuf_size, + const RK_U8 *buf, RK_S32 buf_size) +{ + RK_S32 next; + + SplitContext_t *s = (SplitContext_t*)sc; + if (s->eos) { + *poutbuf = s->buffer; + *poutbuf_size = s->index; + return 0; + } + next = hevc_find_frame_end(s, buf, buf_size); + + if (mpp_combine_frame(s, next, &buf, &buf_size) < 0) { + *poutbuf = NULL; + *poutbuf_size = 0; + return buf_size; + } + + *poutbuf = buf; + *poutbuf_size = buf_size; + if (next < 0) + next = 0; + return next; +} + +RK_S32 h265d_split_flush(void *sc) +{ + SplitContext_t *s = (SplitContext_t*)sc; + s->index = 0; + s->last_index = 0; + s->state = 0; + s->frame_start_found = 0; + s->overread = 0; + s->overread_index = 0; + s->state64 = 0; + + return MPP_OK; +} + + +RK_S32 h265d_split_deinit(void *sc) +{ + SplitContext_t *s = (SplitContext_t *)sc; + if (s->buffer) { + mpp_free(s->buffer); + s->buffer = NULL; + } + if (s) { + mpp_free(s); + s = NULL; + } + return MPP_OK; +} + +static RK_S32 pred_weight_table(HEVCContext *s, GetBitCxt_t *gb) +{ + RK_U32 i = 0; + RK_U32 j = 0; + RK_U8 luma_weight_l0_flag[16]; + RK_U8 chroma_weight_l0_flag[16]; + RK_U8 luma_weight_l1_flag[16]; + RK_U8 chroma_weight_l1_flag[16]; + + READ_UE(gb, &s->sh.luma_log2_weight_denom); + if (s->sps->chroma_format_idc != 0) { + RK_S32 delta = 0; + READ_SE(gb, &delta); + s->sh.chroma_log2_weight_denom = mpp_clip(s->sh.luma_log2_weight_denom + delta, 0, 7); + } + + for (i = 0; i < s->sh.nb_refs[L0]; i++) { + READ_BIT1(gb, &luma_weight_l0_flag[i]); + if (!luma_weight_l0_flag[i]) { + s->sh.luma_weight_l0[i] = 1 << s->sh.luma_log2_weight_denom; + s->sh.luma_offset_l0[i] = 0; + } + } + + if (s->sps->chroma_format_idc != 0) { // FIXME: invert "if" and "for" + for (i = 0; i < s->sh.nb_refs[L0]; i++) { + READ_BIT1(gb, &chroma_weight_l0_flag[i]); + } + } else { + for (i = 0; i < s->sh.nb_refs[L0]; i++) + chroma_weight_l0_flag[i] = 0; + } + + for (i = 0; i < s->sh.nb_refs[L0]; i++) { + if (luma_weight_l0_flag[i]) { + RK_S32 delta_luma_weight_l0 = 0; + READ_SE(gb, &delta_luma_weight_l0); + s->sh.luma_weight_l0[i] = (1 << s->sh.luma_log2_weight_denom) + delta_luma_weight_l0; + READ_SE(gb, &s->sh.luma_offset_l0[i]); + } + if (chroma_weight_l0_flag[i]) { + for (j = 0; j < 2; j++) { + RK_S32 delta_chroma_weight_l0 = 0; + RK_S32 delta_chroma_offset_l0 = 0; + READ_SE(gb, &delta_chroma_weight_l0); + READ_SE(gb, &delta_chroma_offset_l0); + s->sh.chroma_weight_l0[i][j] = (1 << s->sh.chroma_log2_weight_denom) + delta_chroma_weight_l0; + s->sh.chroma_offset_l0[i][j] = mpp_clip((delta_chroma_offset_l0 - ((128 * s->sh.chroma_weight_l0[i][j]) + >> s->sh.chroma_log2_weight_denom) + 128), -128, 127); + } + } else { + s->sh.chroma_weight_l0[i][0] = 1 << s->sh.chroma_log2_weight_denom; + s->sh.chroma_offset_l0[i][0] = 0; + s->sh.chroma_weight_l0[i][1] = 1 << s->sh.chroma_log2_weight_denom; + s->sh.chroma_offset_l0[i][1] = 0; + } + } + + if (s->sh.slice_type == B_SLICE) { + for (i = 0; i < s->sh.nb_refs[L1]; i++) { + READ_BIT1(gb, &luma_weight_l1_flag[i]); + if (!luma_weight_l1_flag[i]) { + s->sh.luma_weight_l1[i] = 1 << s->sh.luma_log2_weight_denom; + s->sh.luma_offset_l1[i] = 0; + } + } + if (s->sps->chroma_format_idc != 0) { + for (i = 0; i < s->sh.nb_refs[L1]; i++) + READ_BIT1(gb, &chroma_weight_l1_flag[i]); + } else { + for (i = 0; i < s->sh.nb_refs[L1]; i++) + chroma_weight_l1_flag[i] = 0; + } + for (i = 0; i < s->sh.nb_refs[L1]; i++) { + if (luma_weight_l1_flag[i]) { + RK_S32 delta_luma_weight_l1 = 0; + READ_UE(gb, &delta_luma_weight_l1); + s->sh.luma_weight_l1[i] = (1 << s->sh.luma_log2_weight_denom) + delta_luma_weight_l1; + READ_SE(gb, &s->sh.luma_offset_l1[i]); + } + if (chroma_weight_l1_flag[i]) { + for (j = 0; j < 2; j++) { + RK_S32 delta_chroma_weight_l1 = 0; + RK_S32 delta_chroma_offset_l1 = 0; + READ_SE(gb, &delta_chroma_weight_l1); + READ_SE(gb, &delta_chroma_offset_l1); + s->sh.chroma_weight_l1[i][j] = (1 << s->sh.chroma_log2_weight_denom) + delta_chroma_weight_l1; + s->sh.chroma_offset_l1[i][j] = mpp_clip((delta_chroma_offset_l1 - ((128 * s->sh.chroma_weight_l1[i][j]) + >> s->sh.chroma_log2_weight_denom) + 128), -128, 127); + } + } else { + s->sh.chroma_weight_l1[i][0] = 1 << s->sh.chroma_log2_weight_denom; + s->sh.chroma_offset_l1[i][0] = 0; + s->sh.chroma_weight_l1[i][1] = 1 << s->sh.chroma_log2_weight_denom; + s->sh.chroma_offset_l1[i][1] = 0; + } + } + } + return 0; +} + +static RK_S32 decode_lt_rps(HEVCContext *s, LongTermRPS *rps, GetBitCxt_t *gb) +{ + const HEVCSPS *sps = s->sps; + RK_S32 max_poc_lsb = 1 << sps->log2_max_poc_lsb; + RK_S32 prev_delta_msb = 0; + RK_U32 nb_sps = 0, nb_sh; + RK_S32 i; + + RK_S32 bit_begin = gb->UsedBits; + s->rps_bit_offset[s->slice_idx] = + s->rps_bit_offset_st[s->slice_idx]; + + rps->nb_refs = 0; + if (!sps->long_term_ref_pics_present_flag) + return 0; + + if (sps->num_long_term_ref_pics_sps > 0) + READ_UE(gb, &nb_sps); + + READ_UE(gb, &nb_sh); + + if (nb_sh + nb_sps > MPP_ARRAY_ELEMS(rps->poc)) + return MPP_ERR_STREAM; + + rps->nb_refs = nb_sh + nb_sps; + + for (i = 0; i < rps->nb_refs; i++) { + RK_U8 delta_poc_msb_present; + + if ((RK_U32)i < nb_sps) { + RK_U8 lt_idx_sps = 0; + + if (sps->num_long_term_ref_pics_sps > 1) + READ_BITS(gb, mpp_ceil_log2(sps->num_long_term_ref_pics_sps), <_idx_sps); + + rps->poc[i] = sps->lt_ref_pic_poc_lsb_sps[lt_idx_sps]; + rps->used[i] = sps->used_by_curr_pic_lt_sps_flag[lt_idx_sps]; + } else { + READ_BITS(gb, sps->log2_max_poc_lsb, &rps->poc[i]); + READ_BIT1(gb, &rps->used[i]); + } + + READ_BIT1(gb, &delta_poc_msb_present); + if (delta_poc_msb_present) { + RK_S32 delta = 0; + + READ_UE(gb, &delta); + + if (i && (RK_U32)i != nb_sps) + delta += prev_delta_msb; + + rps->poc[i] += s->poc - delta * max_poc_lsb - s->sh.pic_order_cnt_lsb; + prev_delta_msb = delta; + } + } + + s->rps_bit_offset[s->slice_idx] + += (gb->UsedBits - bit_begin); + + return 0; +} + +static RK_S32 set_sps(HEVCContext *s, const HEVCSPS *sps) +{ + RK_U32 num = 0, den = 0; + + s->h265dctx->coded_width = sps->width; + s->h265dctx->coded_height = sps->height; + s->h265dctx->width = sps->output_width; + s->h265dctx->height = sps->output_height; + s->h265dctx->pix_fmt = sps->pix_fmt; + s->h265dctx->sample_aspect_ratio = sps->vui.sar; + + if (sps->vui.video_signal_type_present_flag) + s->h265dctx->color_range = sps->vui.video_full_range_flag ? MPPCOL_RANGE_JPEG + : MPPCOL_RANGE_MPEG; + else + s->h265dctx->color_range = MPPCOL_RANGE_MPEG; + + if (sps->vui.colour_description_present_flag) { + s->h265dctx->colorspace = sps->vui.matrix_coeffs; + } else { + s->h265dctx->colorspace = MPPCOL_SPC_UNSPECIFIED; + } + + s->sps = sps; + s->vps = (HEVCVPS*) s->vps_list[s->sps->vps_id]; + + if (s->vps->vps_timing_info_present_flag) { + num = s->vps->vps_num_units_in_tick; + den = s->vps->vps_time_scale; + } else if (sps->vui.vui_timing_info_present_flag) { + num = sps->vui.vui_num_units_in_tick; + den = sps->vui.vui_time_scale; + } + + if (num != 0 && den != 0) { + // s->h265dctx->time_base.num = num; + // s->h265dctx->time_base.den = den; + // av_reduce(&s->h265dctx->time_base.num, &s->h265dctx->time_base.den, + // num, den, 1 << 30); + } + + return 0; + +} +static RK_S32 compare_sliceheader(SliceHeader *openhevc_sh, SliceHeader *sh) +{ + + if (openhevc_sh->pps_id != sh->pps_id) { + mpp_log(" pps_id diff \n"); + return -1; + } + + if (openhevc_sh->slice_type != sh->slice_type) { + mpp_log(" slice_type diff \n"); + return -1; + } + + if (openhevc_sh->pic_order_cnt_lsb != sh->pic_order_cnt_lsb) { + mpp_log(" pic_order_cnt_lsb diff \n"); + return -1; + } + + if (openhevc_sh->first_slice_in_pic_flag != sh->first_slice_in_pic_flag) { + mpp_log(" first_slice_in_pic_flag diff \n"); + return -1; + } + + if (openhevc_sh->dependent_slice_segment_flag != sh->dependent_slice_segment_flag) { + mpp_log(" dependent_slice_segment_flag diff \n"); + return -1; + } + + if (openhevc_sh->pic_output_flag != sh->pic_output_flag) { + mpp_log(" pic_output_flag diff \n"); + return -1; + } + + if (openhevc_sh->colour_plane_id != sh->colour_plane_id) { + mpp_log(" colour_plane_id diff \n"); + return -1; + } + + if (openhevc_sh->rpl_modification_flag[0] != sh->rpl_modification_flag[0]) { + mpp_log(" rpl_modification_flag[0] diff \n"); + return -1; + } + + if (openhevc_sh->rpl_modification_flag[1] != sh->rpl_modification_flag[1]) { + mpp_log(" rpl_modification_flag[1] diff \n"); + return -1; + } + + if (openhevc_sh->no_output_of_prior_pics_flag != sh->no_output_of_prior_pics_flag) { + mpp_log(" no_output_of_prior_pics_flag diff \n"); + return -1; + } + + if (openhevc_sh->slice_temporal_mvp_enabled_flag != sh->slice_temporal_mvp_enabled_flag) { + mpp_log(" slice_temporal_mvp_enabled_flag diff \n"); + return -1; + } + + if (openhevc_sh->nb_refs[0] != sh->nb_refs[0]) { + mpp_log(" nb_refs[0] diff \n"); + return -1; + } + + if (openhevc_sh->nb_refs[1] != sh->nb_refs[1]) { + mpp_log(" nb_refs[1] diff \n"); + return -1; + } + + if (openhevc_sh->slice_sample_adaptive_offset_flag[0] != + sh->slice_sample_adaptive_offset_flag[0]) { + mpp_log(" slice_sample_adaptive_offset_flag[0] diff \n"); + return -1; + } + + if (openhevc_sh->slice_sample_adaptive_offset_flag[1] != + sh->slice_sample_adaptive_offset_flag[1]) { + mpp_log(" slice_sample_adaptive_offset_flag[1] diff \n"); + return -1; + } + + if (openhevc_sh->slice_sample_adaptive_offset_flag[2] != + sh->slice_sample_adaptive_offset_flag[2]) { + mpp_log(" slice_sample_adaptive_offset_flag[2] diff \n"); + return -1; + } + + if (openhevc_sh->mvd_l1_zero_flag != sh->mvd_l1_zero_flag) { + mpp_log(" mvd_l1_zero_flag diff \n"); + return -1; + } + if (openhevc_sh->cabac_init_flag != sh->cabac_init_flag) { + mpp_log(" cabac_init_flag diff \n"); + return -1; + } + + if (openhevc_sh->disable_deblocking_filter_flag != + sh->disable_deblocking_filter_flag) { + mpp_log(" disable_deblocking_filter_flag diff \n"); + return -1; + } + + if (openhevc_sh->slice_loop_filter_across_slices_enabled_flag != + sh->slice_loop_filter_across_slices_enabled_flag) { + mpp_log(" slice_loop_filter_across_slices_enable diff \n"); + return -1; + } + + if (openhevc_sh->collocated_list != sh->collocated_list) { + mpp_log(" collocated_list diff \n"); + return -1; + } + + if (openhevc_sh->collocated_ref_idx != sh->collocated_ref_idx) { + mpp_log(" collocated_ref_idx diff \n"); + return -1; + } + + if (openhevc_sh->slice_qp_delta != sh->slice_qp_delta) { + mpp_log(" slice_qp_delta diff \n"); + return -1; + } + + if (openhevc_sh->slice_cb_qp_offset != sh->slice_cb_qp_offset) { + mpp_log(" slice_cb_qp_offset diff \n"); + return -1; + } + + if (openhevc_sh->slice_cr_qp_offset != sh->slice_cr_qp_offset) { + mpp_log(" slice_cr_qp_offset diff \n"); + return -1; + } + + if (openhevc_sh->beta_offset != sh->beta_offset) { + mpp_log(" beta_offset diff \n"); + return -1; + } + + if (openhevc_sh->tc_offset != sh->tc_offset) { + mpp_log(" tc_offset diff \n"); + return -1; + } + + if (openhevc_sh->max_num_merge_cand != sh->max_num_merge_cand) { + mpp_log(" max_num_merge_cand diff \n"); + return -1; + } + + if (openhevc_sh->num_entry_point_offsets != sh->num_entry_point_offsets) { + mpp_log(" num_entry_point_offsets diff \n"); + return -1; + } + + if (openhevc_sh->slice_qp != sh->slice_qp) { + mpp_log(" slice_qp diff \n"); + return -1; + } + + if (openhevc_sh->luma_log2_weight_denom != sh->luma_log2_weight_denom) { + mpp_log(" luma_log2_weight_denom diff \n"); + return -1; + } + + if (openhevc_sh->chroma_log2_weight_denom != sh->chroma_log2_weight_denom) { + mpp_log(" chroma_log2_weight_denom diff \n"); + return -1; + } + + /* if (openhevc_sh->slice_ctb_addr_rs != sh->slice_ctb_addr_rs) { + mpp_log(" slice_ctb_addr_rs diff \n"); + return -1; + }*/ + return 0; +} + +static RK_S32 hls_slice_header(HEVCContext *s) +{ + + GetBitCxt_t *gb = &s->HEVClc->gb; + SliceHeader *sh = &s->sh; + RK_S32 i, ret; + RK_S32 value, pps_id; +#ifdef JCTVC_M0458_INTERLAYER_RPS_SIG + int NumILRRefIdx; +#endif + + // Coded parameters + + READ_BIT1(gb, &sh->first_slice_in_pic_flag); + if ((IS_IDR(s) || IS_BLA(s)) && sh->first_slice_in_pic_flag) { + s->seq_decode = (s->seq_decode + 1) & 0xff; + s->max_ra = INT_MAX; + if (IS_IDR(s)) + mpp_hevc_clear_refs(s); + } + if (s->nal_unit_type >= 16 && s->nal_unit_type <= 23) + READ_BIT1(gb, &sh->no_output_of_prior_pics_flag); + + READ_UE(gb, &pps_id); + + if (pps_id >= MAX_PPS_COUNT || !s->pps_list[pps_id]) { + mpp_err( "PPS id out of range: %d\n", pps_id); + return MPP_ERR_STREAM; + } else { + sh->pps_id = pps_id; + } + + if (!sh->first_slice_in_pic_flag && + s->pps != (HEVCPPS*)s->pps_list[sh->pps_id]) { + mpp_err( "PPS changed between slices.\n"); + return MPP_ERR_STREAM; + } + s->pps = (HEVCPPS*)s->pps_list[sh->pps_id]; + + if (s->sps != (HEVCSPS*)s->sps_list[s->pps->sps_id]) { + s->sps = (HEVCSPS*)s->sps_list[s->pps->sps_id]; + mpp_hevc_clear_refs(s); + ret = set_sps(s, s->sps); + if (ret < 0) + return ret; + + s->seq_decode = (s->seq_decode + 1) & 0xff; + s->max_ra = INT_MAX; + } + + // s->h265dctx->profile = s->sps->ptl.general_ptl.profile_idc; + // s->h265dctx->level = s->sps->ptl.general_ptl.level_idc; + + sh->dependent_slice_segment_flag = 0; + if (!sh->first_slice_in_pic_flag) { + RK_S32 slice_address_length; + + if (s->pps->dependent_slice_segments_enabled_flag) + READ_BIT1(gb, &sh->dependent_slice_segment_flag); + + slice_address_length = mpp_ceil_log2(s->sps->ctb_width * + s->sps->ctb_height); + + READ_BITS(gb, slice_address_length, &sh->slice_segment_addr); + + if (sh->slice_segment_addr >= (RK_U32)(s->sps->ctb_width * s->sps->ctb_height)) { + mpp_err( + "Invalid slice segment address: %u.\n", + sh->slice_segment_addr); + return MPP_ERR_STREAM; + } + + if (!sh->dependent_slice_segment_flag) { + sh->slice_addr = sh->slice_segment_addr; + s->slice_idx++; + } + } else { + sh->slice_segment_addr = sh->slice_addr = 0; + s->slice_idx = 0; + s->slice_initialized = 0; + } + + if (!sh->dependent_slice_segment_flag) { + s->slice_initialized = 0; + + for (i = 0; i < s->pps->num_extra_slice_header_bits; i++) + READ_SKIPBITS(gb, 1); // slice_reserved_undetermined_flag[] + + READ_UE(gb, &sh->slice_type); + if (!(sh->slice_type == I_SLICE || + sh->slice_type == P_SLICE || + sh->slice_type == B_SLICE)) { + mpp_err( "Unknown slice type: %d.\n", + sh->slice_type); + return MPP_ERR_STREAM; + } + if (!s->decoder_id && IS_IRAP(s) && sh->slice_type != I_SLICE) { + mpp_err( "Inter slices in an IRAP frame.\n"); + return MPP_ERR_STREAM; + } + + if (s->pps->output_flag_present_flag) + READ_BIT1(gb, &sh->pic_output_flag); + + if (s->sps->separate_colour_plane_flag) + READ_BITS(gb, 2, &sh->colour_plane_id ); + + if (!IS_IDR(s)) { + int poc; + + READ_BITS(gb, s->sps->log2_max_poc_lsb, &sh->pic_order_cnt_lsb); + poc = mpp_hevc_compute_poc(s, sh->pic_order_cnt_lsb); + if (!sh->first_slice_in_pic_flag && poc != s->poc) { + mpp_log("Ignoring POC change between slices: %d -> %d\n", s->poc, poc); +#if 0 + if (s->h265dctx->err_recognition & AV_EF_EXPLODE) + return MPP_ERR_STREAM; +#endif + poc = s->poc; + } + s->poc = poc; + + READ_BIT1(gb, &sh->short_term_ref_pic_set_sps_flag); + + RK_S32 bit_begin = gb->UsedBits; + + if (!sh->short_term_ref_pic_set_sps_flag) { + + ret = mpp_hevc_decode_short_term_rps(s, &sh->slice_rps, s->sps, 1); + if (ret < 0) + return ret; + + sh->short_term_rps = &sh->slice_rps; + } else { + RK_S32 numbits, rps_idx; + + if (!s->sps->nb_st_rps) { + mpp_err( "No ref lists in the SPS.\n"); + return MPP_ERR_STREAM; + } + + numbits = mpp_ceil_log2(s->sps->nb_st_rps); + rps_idx = 0; + if (numbits > 0) + READ_BITS(gb, numbits, &rps_idx); + + sh->short_term_rps = &s->sps->st_rps[rps_idx]; + } + + s->rps_bit_offset_st[s->slice_idx] = gb->UsedBits - bit_begin; + + sh->short_term_ref_pic_set_size = s->rps_bit_offset_st[s->slice_idx]; + + ret = decode_lt_rps(s, &sh->long_term_rps, gb); + if (ret < 0) { + mpp_log("Invalid long term RPS.\n"); + // if (s->h265dctx->err_recognition & AV_EF_EXPLODE) + // return MPP_ERR_STREAM; + } + + if (s->sps->sps_temporal_mvp_enabled_flag) + READ_BIT1(gb, &sh->slice_temporal_mvp_enabled_flag); + else + sh->slice_temporal_mvp_enabled_flag = 0; + } else { + s->sh.short_term_rps = NULL; + s->poc = 0; + } + + /* 8.3.1 */ + if (s->temporal_id == 0 && + s->nal_unit_type != NAL_TRAIL_N && + s->nal_unit_type != NAL_TSA_N && + s->nal_unit_type != NAL_STSA_N && + s->nal_unit_type != NAL_RADL_N && + s->nal_unit_type != NAL_RADL_R && + s->nal_unit_type != NAL_RASL_N && + s->nal_unit_type != NAL_RASL_R) + s->pocTid0 = s->poc; + + if (s->sps->sao_enabled) { + READ_BIT1(gb, &sh->slice_sample_adaptive_offset_flag[0]); + READ_BIT1(gb, &sh->slice_sample_adaptive_offset_flag[1]); + sh->slice_sample_adaptive_offset_flag[2] = + sh->slice_sample_adaptive_offset_flag[1]; + } else { + sh->slice_sample_adaptive_offset_flag[0] = 0; + sh->slice_sample_adaptive_offset_flag[1] = 0; + sh->slice_sample_adaptive_offset_flag[2] = 0; + } + + sh->nb_refs[L0] = sh->nb_refs[L1] = 0; + if (sh->slice_type == P_SLICE || sh->slice_type == B_SLICE) { + int nb_refs; + + sh->nb_refs[L0] = s->pps->num_ref_idx_l0_default_active; + if (sh->slice_type == B_SLICE) + sh->nb_refs[L1] = s->pps->num_ref_idx_l1_default_active; + + READ_BIT1(gb, &value); + + if (value) { // num_ref_idx_active_override_flag + READ_UE(gb, &sh->nb_refs[L0]); + sh->nb_refs[L0] += 1; + if (sh->slice_type == B_SLICE) { + READ_UE(gb, &sh->nb_refs[L1]); + sh->nb_refs[L1] += 1; + } + } + if (sh->nb_refs[L0] > MAX_REFS || sh->nb_refs[L1] > MAX_REFS) { + mpp_err( "Too many refs: %d/%d.\n", + sh->nb_refs[L0], sh->nb_refs[L1]); + return MPP_ERR_STREAM; + } + + sh->rpl_modification_flag[0] = 0; + sh->rpl_modification_flag[1] = 0; + nb_refs = mpp_hevc_frame_nb_refs(s); + if (!nb_refs) { + mpp_err( "Zero refs for a frame with P or B slices.\n"); + return MPP_ERR_STREAM; + } + + if (s->pps->lists_modification_present_flag && nb_refs > 1) { + READ_BIT1(gb, &sh->rpl_modification_flag[0]); + if (sh->rpl_modification_flag[0]) { + for (i = 0; (RK_U32)i < sh->nb_refs[L0]; i++) + READ_BITS(gb, mpp_ceil_log2(nb_refs), &sh->list_entry_lx[0][i]); + } + + if (sh->slice_type == B_SLICE) { + READ_BIT1(gb, &sh->rpl_modification_flag[1]); + if (sh->rpl_modification_flag[1] == 1) + for (i = 0; (RK_U32)i < sh->nb_refs[L1]; i++) + READ_BITS(gb, mpp_ceil_log2(nb_refs), &sh->list_entry_lx[1][i]); + } + } + + if (sh->slice_type == B_SLICE) + READ_BIT1(gb, &sh->mvd_l1_zero_flag); + + if (s->pps->cabac_init_present_flag) + READ_BIT1(gb, &sh->cabac_init_flag); + else + sh->cabac_init_flag = 0; + + sh->collocated_ref_idx = 0; + if (sh->slice_temporal_mvp_enabled_flag) { + sh->collocated_list = L0; + if (sh->slice_type == B_SLICE) { + READ_BIT1(gb, &value); + sh->collocated_list = !value; + } + + if (sh->nb_refs[sh->collocated_list] > 1) { + READ_UE(gb, &sh->collocated_ref_idx); + if (sh->collocated_ref_idx >= sh->nb_refs[sh->collocated_list]) { + mpp_err( + "Invalid collocated_ref_idx: %d.\n", + sh->collocated_ref_idx); + return MPP_ERR_STREAM; + } + } + } + + if ((s->pps->weighted_pred_flag && sh->slice_type == P_SLICE) || + (s->pps->weighted_bipred_flag && sh->slice_type == B_SLICE)) { + pred_weight_table(s, gb); + } + + READ_UE(gb, &value); + sh->max_num_merge_cand = 5 - value; + if (sh->max_num_merge_cand < 1 || sh->max_num_merge_cand > 5) { + mpp_err( + "Invalid number of merging MVP candidates: %d.\n", + sh->max_num_merge_cand); + return MPP_ERR_STREAM; + } + } + READ_SE(gb, &sh->slice_qp_delta ); + if (s->pps->pic_slice_level_chroma_qp_offsets_present_flag) { + READ_SE(gb, &sh->slice_cb_qp_offset); + READ_SE(gb, &sh->slice_cr_qp_offset); + } else { + sh->slice_cb_qp_offset = 0; + sh->slice_cr_qp_offset = 0; + } + + if (s->pps->deblocking_filter_control_present_flag) { + int deblocking_filter_override_flag = 0; + + if (s->pps->deblocking_filter_override_enabled_flag) + READ_BIT1(gb, & deblocking_filter_override_flag); + + if (deblocking_filter_override_flag) { + READ_BIT1(gb, &sh->disable_deblocking_filter_flag); + if (!sh->disable_deblocking_filter_flag) { + READ_SE(gb, &sh->beta_offset); + sh->beta_offset = sh->beta_offset * 2; + READ_SE(gb, &sh->tc_offset); + sh->tc_offset = sh->tc_offset * 2; + } + } else { + sh->disable_deblocking_filter_flag = s->pps->disable_dbf; + sh->beta_offset = s->pps->beta_offset; + sh->tc_offset = s->pps->tc_offset; + } + } else { + sh->disable_deblocking_filter_flag = 0; + sh->beta_offset = 0; + sh->tc_offset = 0; + } + + if (s->pps->seq_loop_filter_across_slices_enabled_flag && + (sh->slice_sample_adaptive_offset_flag[0] || + sh->slice_sample_adaptive_offset_flag[1] || + !sh->disable_deblocking_filter_flag)) { + READ_BIT1(gb, &sh->slice_loop_filter_across_slices_enabled_flag); + } else { + sh->slice_loop_filter_across_slices_enabled_flag = s->pps->seq_loop_filter_across_slices_enabled_flag; + } + } else if (!s->slice_initialized) { + mpp_err( "Independent slice segment missing.\n"); + return MPP_ERR_STREAM; + } + + sh->num_entry_point_offsets = 0; + if (s->pps->tiles_enabled_flag || s->pps->entropy_coding_sync_enabled_flag) { + READ_UE(gb, &sh->num_entry_point_offsets); + if (s->pps->entropy_coding_sync_enabled_flag) { + if (sh->num_entry_point_offsets > s->sps->ctb_height || sh->num_entry_point_offsets < 0) { + mpp_err("The number of entries %d is higher than the number of CTB rows %d \n", + sh->num_entry_point_offsets, + s->sps->ctb_height); + return MPP_ERR_STREAM; + } + } else { + if (sh->num_entry_point_offsets > s->sps->ctb_height * s->sps->ctb_width || sh->num_entry_point_offsets < 0) { + mpp_err("The number of entries %d is higher than the number of CTBs %d \n", + sh->num_entry_point_offsets, + s->sps->ctb_height * s->sps->ctb_width); + return MPP_ERR_STREAM; + } + } + } +#if 0 + if (s->pps->slice_header_extension_present_flag) { + RK_U32 length = 0; + READ_UE(gb, &length); + for (i = 0; (RK_U32)i < length; i++) + READ_SKIPBITS(gb, 8); // slice_header_extension_data_byte + } +#endif + // Inferred parameters + sh->slice_qp = 26U + s->pps->pic_init_qp_minus26 + sh->slice_qp_delta; + if (sh->slice_qp > 51 || + sh->slice_qp < -s->sps->qp_bd_offset) { + mpp_err("The slice_qp %d is outside the valid range " + "[%d, 51].\n", + sh->slice_qp, + -s->sps->qp_bd_offset); + return MPP_ERR_STREAM; + } + if (s->h265dctx->compare_info != NULL && sh->first_slice_in_pic_flag) { + CurrentFameInf_t *info = (CurrentFameInf_t *)s->h265dctx->compare_info; + SliceHeader *openhevc_sh = (SliceHeader *)&info->sh; + h265d_dbg(H265D_DBG_FUNCTION, "compare_sliceheader in"); + if (compare_sliceheader(openhevc_sh, &s->sh) < 0) { + mpp_log("compare sliceHeader with openhevc diff\n"); + mpp_assert(0); + } + h265d_dbg(H265D_DBG_FUNCTION, "compare_sliceheader ok"); + } + + sh->slice_ctb_addr_rs = sh->slice_segment_addr; + + if (!s->sh.slice_ctb_addr_rs && s->sh.dependent_slice_segment_flag) { + mpp_err("Impossible slice segment.\n"); + return MPP_ERR_STREAM; + } + + s->slice_initialized = 1; + + return 0; +} + +/** + * @return AV MPP_ERR_STREAM if the packet is not a valid NAL unit, + * 0 if the unit should be skipped, 1 otherwise + */ +static RK_S32 hls_nal_unit(HEVCContext *s) +{ + GetBitCxt_t*gb = &s->HEVClc->gb; + RK_S32 value = 0; + + READ_BIT1(gb, &value); + if ( value != 0) + return MPP_ERR_STREAM; + + READ_BITS(gb, 6, &s->nal_unit_type); + + READ_BITS(gb, 6, &s->nuh_layer_id); + + READ_BITS(gb, 3, &s->temporal_id); + + s->temporal_id = s->temporal_id - 1; + + if (s->temporal_id < 0) + return MPP_ERR_STREAM; + + h265d_dbg(H265D_DBG_GLOBAL, + "nal_unit_type: %d, nuh_layer_id: %d temporal_id: %d\n", + s->nal_unit_type, s->nuh_layer_id, s->temporal_id); + + return (s->nuh_layer_id); +} + +static RK_S32 hevc_frame_start(HEVCContext *s) +{ + + int ret; + + s->is_decoded = 0; + s->first_nal_type = s->nal_unit_type; + + ret = mpp_hevc_set_new_ref(s, &s->frame, s->poc); + + if (ret < 0) + goto fail; + + + ret = mpp_hevc_frame_rps(s); + if (ret < 0) { + mpp_err("Error constructing the frame RPS.\n"); + goto fail; + } + return 0; + +fail: + s->ref = NULL; + return ret; +} + +static RK_S32 parser_nal_unit(HEVCContext *s, const RK_U8 *nal, int length) +{ + + HEVCLocalContext *lc = s->HEVClc; + GetBitCxt_t *gb = &lc->gb; + RK_S32 ret; + mpp_Init_Bits(gb, (RK_U8*)nal, length); + + ret = hls_nal_unit(s); + if (ret < 0) { + mpp_err("Invalid NAL unit %d, skipping.\n", + s->nal_unit_type); + goto fail; + } else if (ret != (s->decoder_id) && s->nal_unit_type != NAL_VPS) + return 0; + + if (s->temporal_id > s->temporal_layer_id) + return 0; + + s->nuh_layer_id = ret; + h265d_dbg(H265D_DBG_GLOBAL, "s->nal_unit_type = %d,len = %d \n", s->nal_unit_type, length); + //mpp_log("s->nal_unit_type = %d,len = %d \n", s->nal_unit_type, length); +#if 0 + if (fp != NULL) { + if (s->nal_unit_type >= 32 && s->nal_unit_type <= 34) { + RK_U32 nal_1 = 0x01000000; + fwrite(&nal_1, 1, 4, fp); + fwrite(nal, 1, length, fp); + } + } + if (s->nb_frame > 1088 && (s->nal_unit_type >= 16 && s->nal_unit_type <= 21)) { + start_write = 1; + mpp_log("start %d", s->nb_frame); + } +#endif + + switch (s->nal_unit_type) { + case NAL_VPS: + ret = mpp_hevc_decode_nal_vps(s); + if (ret < 0) + goto fail; + break; + case NAL_SPS: + ret = mpp_hevc_decode_nal_sps(s); + if (ret < 0) + goto fail; + break; + case NAL_PPS: + ret = mpp_hevc_decode_nal_pps(s); + if (ret < 0) + goto fail; + break; + case NAL_SEI_PREFIX: + case NAL_SEI_SUFFIX: + ret = mpp_hevc_decode_nal_sei(s); + if (ret < 0) + goto fail; + break; + case NAL_TRAIL_R: + case NAL_TRAIL_N: + case NAL_TSA_N: + case NAL_TSA_R: + case NAL_STSA_N: + case NAL_STSA_R: + case NAL_BLA_W_LP: + case NAL_BLA_W_RADL: + case NAL_BLA_N_LP: + case NAL_IDR_W_RADL: + case NAL_IDR_N_LP: + case NAL_CRA_NUT: + case NAL_RADL_N: + case NAL_RADL_R: + case NAL_RASL_N: + case NAL_RASL_R: +#if 0 + if (fp != NULL && (s->nb_frame < 1200) && start_write) { + RK_U32 nal_1 = 0x01000000; + fwrite(&nal_1, 1, 4, fp); + fwrite(nal, 1, length, fp); + } +#endif + h265d_dbg(H265D_DBG_FUNCTION, "hls_slice_header in"); + ret = hls_slice_header(s); + h265d_dbg(H265D_DBG_FUNCTION, "hls_slice_header out"); + if (ret < 0) + return ret; + + if (s->max_ra == INT_MAX) { + if (s->nal_unit_type == NAL_CRA_NUT || IS_BLA(s)) { + s->max_ra = s->poc; + } else { + if (IS_IDR(s)) + s->max_ra = INT_MIN; + } + } + + if ((s->nal_unit_type == NAL_RASL_R || s->nal_unit_type == NAL_RASL_N) && + s->poc <= s->max_ra) { + s->is_decoded = 0; + break; + } else { + if (s->nal_unit_type == NAL_RASL_R && s->poc > s->max_ra) + s->max_ra = INT_MIN; + } + + if (s->sh.first_slice_in_pic_flag) { + ret = hevc_frame_start(s); + if (ret < 0) + return ret; + } else if (!s->ref) { + mpp_err("First slice in a frame missing.\n"); + goto fail; + } + + if (s->nal_unit_type != s->first_nal_type) { + mpp_err("Non-matching NAL types of the VCL NALUs: %d %d\n", + s->first_nal_type, s->nal_unit_type); + goto fail; + } + + if (!s->sh.dependent_slice_segment_flag && + s->sh.slice_type != I_SLICE) { + ret = mpp_hevc_slice_rpl(s); + if (ret < 0) { + mpp_log("Error constructing the reference lists for the current slice.\n"); + goto fail; + } + // rk_get_ref_info(s); + } + + + s->is_decoded = 1; + + break; + case NAL_EOS_NUT: + case NAL_EOB_NUT: + s->seq_decode = (s->seq_decode + 1) & 0xff; + s->max_ra = INT_MAX; + break; + case NAL_AUD: + case NAL_FD_NUT: + break; + default: + mpp_log("Skipping NAL unit %d\n", s->nal_unit_type); + } + + return 0; +fail: + // if (s->h265dctx->err_recognition & AV_EF_EXPLODE) + // return ret; + return 0; +} + +/* FIXME: This is adapted from ff_h264_decode_nal, avoiding duplication + * between these functions would be nice. */ +RK_S32 mpp_hevc_extract_rbsp(HEVCContext *s, const RK_U8 *src, int length, + HEVCNAL *nal) +{ + RK_S32 i, si, di; + RK_U8 *dst; + + s->skipped_bytes = 0; + +#define STARTCODE_TEST \ + if (i + 2 < length && src[i + 1] == 0 && src[i + 2] <= 3) { \ + if (src[i + 2] != 3) { \ + /* startcode, so we must be past the end */ \ + length = i; \ + } \ + break; \ + } + + for (i = 0; i + 1 < length; i += 2) { + if (src[i]) + continue; + if (i > 0 && src[i - 1] == 0) + i--; + STARTCODE_TEST; + } + + if (i >= length - 1) { // no escaped 0 + nal->data = src; + nal->size = length; + return length; + } + + if (length + MPP_INPUT_BUFFER_PADDING_SIZE > nal->rbsp_buffer_size) { + RK_S32 min_size = length + MPP_INPUT_BUFFER_PADDING_SIZE; + mpp_free(nal->rbsp_buffer); + nal->rbsp_buffer = NULL; + min_size = MPP_MAX(17 * min_size / 16 + 32, min_size); + nal->rbsp_buffer = mpp_malloc(RK_U8, min_size); + if (nal->rbsp_buffer == NULL) { + min_size = 0; + } + nal->rbsp_buffer_size = min_size; + } + + if (!nal->rbsp_buffer) + return MPP_ERR_NOMEM; + + dst = nal->rbsp_buffer; + + memcpy(dst, src, i); + si = di = i; + while (si + 2 < length) { + // remove escapes (very rare 1:2^22) + if (src[si + 2] >= 3) { + dst[di++] = src[si++]; + dst[di++] = src[si++]; + } else if (src[si] == 0 && src[si + 1] == 0) { + if (src[si + 2] == 3) { // escape + dst[di++] = 0; + dst[di++] = 0; + si += 3; + + s->skipped_bytes++; + continue; + } else// next start code + goto nsc; + } + + dst[di++] = src[si++]; + } + while (si < length) + dst[di++] = src[si++]; + +nsc: + memset(dst + di, 0, MPP_INPUT_BUFFER_PADDING_SIZE); + + nal->data = dst; + nal->size = di; + return si; +} + +static RK_S32 mpp_hevc_output_frame(void *ctx, int flush) +{ + + H265dContext_t *h265dctx = (H265dContext_t *)ctx; + HEVCContext *s = (HEVCContext *)h265dctx->priv_data; + + do { + RK_S32 nb_output = 0; + RK_S32 min_poc = INT_MAX; + RK_S32 min_idx = 0; + RK_U32 i; + + for (i = 0; i < MPP_ARRAY_ELEMS(s->DPB); i++) { + HEVCFrame *frame = &s->DPB[i]; + if ((frame->flags & HEVC_FRAME_FLAG_OUTPUT) && + frame->sequence == s->seq_output) { + nb_output++; + if (frame->poc < min_poc) { + min_poc = frame->poc; + min_idx = i; + } + } + } + + /* wait for more frames before output */ + if (!flush && s->seq_output == s->seq_decode && s->sps && + nb_output <= s->sps->temporal_layer[s->sps->max_sub_layers - 1].num_reorder_pics) + return 0; + + if (nb_output) { + HEVCFrame *frame = &s->DPB[min_idx]; + + frame->flags &= ~(HEVC_FRAME_FLAG_OUTPUT); + s->output_frame_idx = min_idx; + + mpp_buf_slot_set_display(s->slots, frame->slot_index); + + h265d_dbg(H265D_DBG_REF, + "Output frame with POC %d frame->slot_index = %d\n", frame->poc, frame->slot_index); + + + return 1; + } + + if (s->seq_output != s->seq_decode) + s->seq_output = (s->seq_output + 1) & 0xff; + else + break; + } while (1); + + return 0; +} + + +static RK_S32 split_nal_units(HEVCContext *s, RK_U8 *buf, RK_U32 length) +{ + RK_S32 i, consumed; + MPP_RET ret = MPP_OK; + s->nb_nals = 0; + while (length >= 4) { + HEVCNAL *nal; + RK_S32 extract_length = 0; + + if (s->is_nalff) { + for (i = 0; i < s->nal_length_size; i++) + extract_length = (extract_length << 8) | buf[i]; + buf += s->nal_length_size; + length -= s->nal_length_size; + + if (extract_length > (RK_S32)length) { + mpp_err( "Invalid NAL unit size.\n"); + ret = MPP_ERR_STREAM; + goto fail; + } + } else { + /* search start code */ + if (buf[2] == 0) { + length--; + buf++; + continue; + } + if (buf[0] != 0 || buf[1] != 0 || buf[2] != 1) { + mpp_err( "No start code is found.\n"); + ret = MPP_ERR_STREAM; + goto fail; + } + + buf += 3; + length -= 3; + } + + if (!s->is_nalff) + extract_length = length; + + if (s->nals_allocated < 1) { + RK_S32 new_size = s->nals_allocated + 10; + HEVCNAL *tmp = mpp_malloc(HEVCNAL, new_size); + memset((void*)tmp, 0, new_size * sizeof(HEVCNAL)); + s->nals_allocated = new_size; + s->nals = tmp; + } + if (s->nals_allocated < s->nb_nals + 1) { + int new_size = s->nals_allocated + 10; + HEVCNAL *tmp = mpp_malloc(HEVCNAL, new_size); + memset((void*)tmp, 0, new_size * sizeof(HEVCNAL)); + if (!tmp) { + mpp_err("return enomm new_size %d", new_size); + ret = MPP_ERR_NOMEM; + goto fail; + } + memcpy((void*)tmp, (void*)s->nals, (new_size - 10)*sizeof(HEVCNAL)); + mpp_free(s->nals); + s->nals = NULL; + s->nals = tmp; + memset(s->nals + s->nals_allocated, 0, + (new_size - s->nals_allocated) * sizeof(*tmp)); + s->nals_allocated = new_size; + } + nal = &s->nals[s->nb_nals]; + + consumed = mpp_hevc_extract_rbsp(s, buf, extract_length, nal); + + s->nb_nals++; + + if (consumed <= 0) { + ret = MPP_ERR_STREAM; + goto fail; + } + + mpp_Init_Bits(&s->HEVClc->gb, (RK_U8 *)nal->data, nal->size); + + hls_nal_unit(s); + + if (s->nal_unit_type < NAL_VPS) { + + if (nal->size != consumed) + h265d_dbg(H265D_DBG_GLOBAL, "tag_stream: nal.size=%d, consumed=%d\n", nal->size, consumed); + + } + + if (s->nal_unit_type == NAL_EOB_NUT || + s->nal_unit_type == NAL_EOS_NUT) + s->eos = 1; + + buf += consumed; + length -= consumed; + } +fail: + return ret; + +} + +RK_S32 h265d_prepare(void *ctx, MppPacket pkt, HalDecTask *task) +{ + + MPP_RET ret = MPP_OK; + H265dContext_t *h265dctx = (H265dContext_t *)ctx; + HEVCContext *s = h265dctx->priv_data; + RK_U8 *buf = NULL; + void *pos = NULL; + RK_S32 length = 0; + s->eos = mpp_packet_get_eos(pkt); + buf = mpp_packet_get_pos(pkt); + length = mpp_packet_get_size(pkt); + s->pts = mpp_packet_get_pts(pkt); + + if (h265dctx->need_split) { + RK_S32 consume = 0; + RK_U8 *split_out_buf = NULL; + RK_S32 split_size = 0; + consume = h265d_split_frame(h265dctx->split_cxt, (const RK_U8**)&split_out_buf, &split_size, + (const RK_U8*)buf, length); + pos = buf + consume; + mpp_packet_set_pos(pkt, pos); + if (split_size) { + buf = split_out_buf; + length = split_size; + } else { + return MPP_FAIL_SPLIT_FRAME; + } + } + ret = split_nal_units(s, buf, length); + + if (MPP_OK == ret) { + if (MPP_OK == h265d_syntax_fill_slice(s->h265dctx, task->stmbuf)) { + task->valid = 1; + } + } + return ret; + +} + +static RK_S32 parser_nal_units(HEVCContext *s) +{ + /* parse the NAL units */ + RK_S32 i, ret = 0; + for (i = 0; i < s->nb_nals; i++) { + ret = parser_nal_unit(s, s->nals[i].data, s->nals[i].size); + if (ret < 0) { + mpp_log("Error parsing NAL unit #%d.\n", i); + ret = 0; + goto fail; + } + } +fail: + return ret; +} + +MPP_RET h265d_parser(void *ctx, HalDecTask *task) +{ + MPP_RET ret; + H265dContext_t *h265dctx = (H265dContext_t *)ctx; + HEVCContext *s = h265dctx->priv_data; + s->got_frame = 0; + s->task = task; + + s->ref = NULL; + + ret = parser_nal_units(s); + if (ret < 0) { + if (ret == MPP_ERR_STREAM) { + mpp_log("current stream is no right skip it"); + ret = 0; + } + return ret; + } + mpp_err("decode poc = %d", s->poc); + if (s->ref) { + h265d_parser2_syntax(h265dctx); + s->task->syntax.data = s->hal_pic_private; + s->task->syntax.number = 1; + s->task->valid = 1; + } +#if 0 + for (i = 0; i < MPP_ARRAY_ELEMS(s->DPB); i++) { + HEVCFrame *frame = &s->DPB[i]; + if (frame->poc != INT_MAX) + mpp_err("poc[%d] = %d", i, frame->poc); + } +#endif + s->nb_frame++; + + if (s->is_decoded) { + h265d_dbg(H265D_DBG_GLOBAL, "Decoded frame with POC %d.\n", s->poc); + s->is_decoded = 0; + } + mpp_hevc_output_frame(ctx, 0); + return MPP_OK; +} + +MPP_RET h265d_deinit(void *ctx) +{ + H265dContext_t *h265dctx = (H265dContext_t *)ctx; + HEVCContext *s = h265dctx->priv_data; + SplitContext_t *sc = h265dctx->split_cxt; + + int i; + + for (i = 0; i < MAX_DPB_SIZE; i++) { + mpp_hevc_unref_frame(s, &s->DPB[i], ~0); + mpp_frame_deinit(&s->DPB[i].frame); + } + + for (i = 0; i < MAX_VPS_COUNT; i++) + mpp_free(s->vps_list[i]); + for (i = 0; i < MAX_SPS_COUNT; i++) + mpp_free(s->sps_list[i]); + for (i = 0; i < MAX_PPS_COUNT; i++) + mpp_hevc_pps_free(s->pps_list[i]); + + mpp_free(s->HEVClc); + + s->HEVClc = NULL; + + for (i = 0; i < s->nals_allocated; i++) + mpp_free(s->nals[i].rbsp_buffer); + + if (s->nals) { + mpp_free(s->nals); + } + + s->nals_allocated = 0; + + if (s->hal_pic_private) { + mpp_free(s->hal_pic_private); + } + + if (s) { + mpp_free(s); + } + + if (sc) { + h265d_split_deinit(sc); + } + return 0; +} + +static RK_S32 hevc_init_context(H265dContext_t *h265dctx) +{ + HEVCContext *s = h265dctx->priv_data; + RK_U32 i; + + s->h265dctx = h265dctx; + + s->HEVClc = (HEVCLocalContext*)mpp_calloc(HEVCLocalContext, 1); + if (!s->HEVClc) + goto fail; + + for (i = 0; i < MPP_ARRAY_ELEMS(s->DPB); i++) { + s->DPB[i].slot_index = 0xff; + s->DPB[i].poc = INT_MAX; + mpp_frame_init(&s->DPB[i].frame); + if (!s->DPB[i].frame) + goto fail; + } + + s->max_ra = INT_MAX; + + + s->temporal_layer_id = 8; + s->context_initialized = 1; + + return 0; + +fail: + h265d_deinit(h265dctx); + return MPP_ERR_NOMEM; +} + +static RK_S32 hevc_parser_extradata(HEVCContext *s) +{ + H265dContext_t *h265dctx = s->h265dctx; + RK_S32 ret = MPP_SUCCESS; + if (h265dctx->extradata_size > 3 && + (h265dctx->extradata[0] || h265dctx->extradata[1] || + h265dctx->extradata[2] > 1)) { + /* It seems the extradata is encoded as hvcC format. + * Temporarily, we support configurationVersion==0 until 14496-15 3rd + * is finalized. When finalized, configurationVersion will be 1 and we + * can recognize hvcC by checking if h265dctx->extradata[0]==1 or not. */ + mpp_err("extradata is encoded as hvcC format"); + s->is_nalff = 1; + } else { + s->is_nalff = 0; + ret = split_nal_units(s, h265dctx->extradata, h265dctx->extradata_size); + if (ret < 0) + return ret; + ret = parser_nal_units(s); + if (ret < 0) + return ret; + } + return ret; +} + +MPP_RET h265d_init(void *ctx, ParserCfg *parser_cfg) +{ + + H265dContext_t *h265dctx = (H265dContext_t *)ctx; + HEVCContext *s = (HEVCContext *)h265dctx->priv_data; + SplitContext_t *sc = (SplitContext_t*)h265dctx->split_cxt; + RK_S32 ret; + if (s == NULL) { + s = (HEVCContext*)mpp_calloc(HEVCContext, 1); + if (s == NULL) { + mpp_err("hevc contxt malloc fail"); + return MPP_ERR_NOMEM; + } + h265dctx->priv_data = s; + } + + h265dctx->need_split = 1; + + if (sc == NULL && h265dctx->need_split) { + h265d_split_init((void**)&sc); + if (sc == NULL) { + mpp_err("split contxt malloc fail"); + return MPP_ERR_NOMEM; + } + h265dctx->split_cxt = sc; + } + + // mpp_env_set_u32("h265d_debug", H265D_DBG_REF); + mpp_env_get_u32("h265d_debug", &h265d_debug, 0); + + ret = hevc_init_context(h265dctx); + + s->hal_pic_private = mpp_calloc(void, sizeof(h265d_dxva2_picture_context_t)); + + if (ret < 0) + return ret; + + s->picture_struct = 0; + + s->slots = parser_cfg->slots; + + + if (h265dctx->extradata_size > 0 && h265dctx->extradata) { + ret = hevc_parser_extradata(s); + if (ret < 0) { + h265d_deinit(h265dctx); + return ret; + } + } +// fp = fopen("dump1.bin", "wb+"); + return 0; +} + +MPP_RET h265d_flush(void *ctx) +{ + RK_S32 ret = 0; + do { + ret = mpp_hevc_output_frame(ctx, 1); + } while (ret); + + return MPP_OK; +} + +MPP_RET h265d_reset(void *ctx) +{ + H265dContext_t *h265dctx = (H265dContext_t *)ctx; + HEVCContext *s = (HEVCContext *)h265dctx->priv_data; + mpp_hevc_flush_dpb(s); + s->max_ra = INT_MAX; + return MPP_OK; +} + +MPP_RET h265d_control(void *ctx, RK_S32 cmd, void *param) +{ + (void)ctx; + (void)cmd; + (void)param; + return MPP_OK; +} + + +const ParserApi api_h265d_parser = { + "h265d_parse", + MPP_VIDEO_CodingHEVC, + sizeof(H265dContext_t), + 0, + h265d_init, + h265d_deinit, + NULL, + NULL, + h265d_reset, + h265d_flush, + h265d_control, +}; + + diff --git a/mpp/codec/dec/h265/h265d_parser.h b/mpp/codec/dec/h265/h265d_parser.h new file mode 100644 index 00000000..2fb80459 --- /dev/null +++ b/mpp/codec/dec/h265/h265d_parser.h @@ -0,0 +1,755 @@ +/* + * + * Copyright 2010 Rockchip Electronics Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * @file h265d_parser.h + * @brief + * @author csy(csy@rock-chips.com) + + * @version 1.0.0 + * @history + * 2015.7.15 : Create + */ + + +#ifndef __H265D_PARSER_H__ +#define __H265D_PARSER_H__ + +#include "mpp_bitread.h" +#include "mpp_common.h" +#include "h265d_codec.h" +#include "mpp_frame.h" +#include "limits.h" +#include +#include +#include "mpp_dec.h" + +extern RK_U32 h265d_debug; +#define H265D_DBG_FUNCTION (0x00000001) +#define H265D_DBG_VPS (0x00000002) +#define H265D_DBG_SPS (0x00000004) +#define H265D_DBG_PPS (0x00000008) +#define H265D_DBG_SLICE_HDR (0x00000010) +#define H265D_DBG_SEI (0x00000020) +#define H265D_DBG_GLOBAL (0x00000040) +#define H265D_DBG_REF (0x00000080) + + + + +#define h265d_dbg(flag, fmt, ...) _mpp_dbg(h265d_debug, flag, fmt, ## __VA_ARGS__) + + +#define MAX_DPB_SIZE 16 // A.4.1 +#define MAX_REFS 16 + +/** + * 7.4.2.1 + */ +#define MAX_SUB_LAYERS 7 +#define MAX_VPS_COUNT 16 +#define MAX_SPS_COUNT 16 +#define MAX_PPS_COUNT 64 +#define MAX_SHORT_TERM_RPS_COUNT 64 +#define MAX_CU_SIZE 128 + +//TODO: check if this is really the maximum +#define MAX_TRANSFORM_DEPTH 5 + +#define MAX_TB_SIZE 32 +#define MAX_PB_SIZE 64 +#define MAX_LOG2_CTB_SIZE 6 +#define MAX_QP 51 +#define DEFAULT_INTRA_TC_OFFSET 2 + +#define HEVC_CONTEXTS 183 + +#define MRG_MAX_NUM_CANDS 5 + +#define L0 0 +#define L1 1 + +#define EPEL_EXTRA_BEFORE 1 +#define EPEL_EXTRA_AFTER 2 +#define EPEL_EXTRA 3 +#define QPEL_EXTRA_BEFORE 3 +#define QPEL_EXTRA_AFTER 4 +#define QPEL_EXTRA 7 + +#define EDGE_EMU_BUFFER_STRIDE 80 + +#define MAX_FRAME_SIZE 2048000 +#define MPP_INPUT_BUFFER_PADDING_SIZE 8 + +#define MPP_PROFILE_HEVC_MAIN 1 +#define MPP_PROFILE_HEVC_MAIN_10 2 +#define MPP_PROFILE_HEVC_MAIN_STILL_PICTURE 3 + + +/** + * Value of the luma sample at position (x, y) in the 2D array tab. + */ +#define IS_IDR(s) (s->nal_unit_type == NAL_IDR_W_RADL || s->nal_unit_type == NAL_IDR_N_LP) +#define IS_BLA(s) (s->nal_unit_type == NAL_BLA_W_RADL || s->nal_unit_type == NAL_BLA_W_LP || \ + s->nal_unit_type == NAL_BLA_N_LP) +#define IS_IRAP(s) (s->nal_unit_type >= 16 && s->nal_unit_type <= 23) + +/** + * Table 7-3: NAL unit type codes + */ +enum NALUnitType { + NAL_TRAIL_N = 0, + NAL_TRAIL_R = 1, + NAL_TSA_N = 2, + NAL_TSA_R = 3, + NAL_STSA_N = 4, + NAL_STSA_R = 5, + NAL_RADL_N = 6, + NAL_RADL_R = 7, + NAL_RASL_N = 8, + NAL_RASL_R = 9, + NAL_BLA_W_LP = 16, + NAL_BLA_W_RADL = 17, + NAL_BLA_N_LP = 18, + NAL_IDR_W_RADL = 19, + NAL_IDR_N_LP = 20, + NAL_CRA_NUT = 21, + NAL_VPS = 32, + NAL_SPS = 33, + NAL_PPS = 34, + NAL_AUD = 35, + NAL_EOS_NUT = 36, + NAL_EOB_NUT = 37, + NAL_FD_NUT = 38, + NAL_SEI_PREFIX = 39, + NAL_SEI_SUFFIX = 40, +}; + +enum RPSType { + ST_CURR_BEF = 0, + ST_CURR_AFT, + ST_FOLL, + LT_CURR, + LT_FOLL, + NB_RPS_TYPE, +}; + +enum SliceType { + B_SLICE = 0, + P_SLICE = 1, + I_SLICE = 2, +}; + +typedef struct ShortTermRPS { + RK_U32 num_negative_pics; + RK_S32 num_delta_pocs; + RK_S32 rps_idx_num_delta_pocs; + RK_S32 delta_poc[32]; + RK_U8 used[32]; +} ShortTermRPS; + +typedef struct LongTermRPS { + RK_S32 poc[32]; + RK_U8 used[32]; + RK_U8 nb_refs; +} LongTermRPS; + +typedef struct RefPicList { + struct HEVCFrame *ref[MAX_REFS]; + RK_S32 list[MAX_REFS]; + RK_S32 isLongTerm[MAX_REFS]; + RK_S32 nb_refs; +} RefPicList; + +typedef struct RefPicListTab { + RefPicList refPicList[2]; +} RefPicListTab; + +typedef struct HEVCWindow { + RK_S32 left_offset; + RK_S32 right_offset; + RK_S32 top_offset; + RK_S32 bottom_offset; +} HEVCWindow; + +typedef struct VUI { + MppRational_t sar; + + RK_S32 overscan_info_present_flag; + RK_S32 overscan_appropriate_flag; + + RK_S32 video_signal_type_present_flag; + RK_S32 video_format; + RK_S32 video_full_range_flag; + RK_S32 colour_description_present_flag; + RK_U8 colour_primaries; + RK_U8 transfer_characteristic; + RK_U8 matrix_coeffs; + + RK_S32 chroma_loc_info_present_flag; + RK_S32 chroma_sample_loc_type_top_field; + RK_S32 chroma_sample_loc_type_bottom_field; + RK_S32 neutra_chroma_indication_flag; + + RK_S32 field_seq_flag; + RK_S32 frame_field_info_present_flag; + + RK_S32 default_display_window_flag; + HEVCWindow def_disp_win; + + RK_S32 vui_timing_info_present_flag; + RK_U32 vui_num_units_in_tick; + RK_U32 vui_time_scale; + RK_S32 vui_poc_proportional_to_timing_flag; + RK_S32 vui_num_ticks_poc_diff_one_minus1; + RK_S32 vui_hrd_parameters_present_flag; + + RK_S32 bitstream_restriction_flag; + RK_S32 tiles_fixed_structure_flag; + RK_S32 motion_vectors_over_pic_boundaries_flag; + RK_S32 restricted_ref_pic_lists_flag; + RK_S32 min_spatial_segmentation_idc; + RK_S32 max_bytes_per_pic_denom; + RK_S32 max_bits_per_min_cu_denom; + RK_S32 log2_max_mv_length_horizontal; + RK_S32 log2_max_mv_length_vertical; +} VUI; + +typedef struct PTLCommon { + RK_U8 profile_space; + RK_U8 tier_flag; + RK_U8 profile_idc; + RK_U8 profile_compatibility_flag[32]; + RK_U8 level_idc; + RK_U8 progressive_source_flag; + RK_U8 interlaced_source_flag; + RK_U8 non_packed_constraint_flag; + RK_U8 frame_only_constraint_flag; +} PTLCommon; + +typedef struct PTL { + PTLCommon general_ptl; + PTLCommon sub_layer_ptl[MAX_SUB_LAYERS]; + + RK_U8 sub_layer_profile_present_flag[MAX_SUB_LAYERS]; + RK_U8 sub_layer_level_present_flag[MAX_SUB_LAYERS]; + + RK_S32 sub_layer_profile_space[MAX_SUB_LAYERS]; + RK_U8 sub_layer_tier_flag[MAX_SUB_LAYERS]; + RK_S32 sub_layer_profile_idc[MAX_SUB_LAYERS]; + RK_U8 sub_layer_profile_compatibility_flags[MAX_SUB_LAYERS][32]; + RK_S32 sub_layer_level_idc[MAX_SUB_LAYERS]; +} PTL; + +typedef struct HEVCVPS { + RK_U8 vps_temporal_id_nesting_flag; + RK_S32 vps_max_layers; + RK_S32 vps_max_sub_layers; ///< vps_max_temporal_layers_minus1 + 1 + + PTL ptl; + RK_S32 vps_sub_layer_ordering_info_present_flag; + RK_U32 vps_max_dec_pic_buffering[MAX_SUB_LAYERS]; + RK_U32 vps_num_reorder_pics[MAX_SUB_LAYERS]; + RK_U32 vps_max_latency_increase[MAX_SUB_LAYERS]; + RK_S32 vps_max_layer_id; + RK_S32 vps_num_layer_sets; ///< vps_num_layer_sets_minus1 + 1 + RK_U8 vps_timing_info_present_flag; + RK_U32 vps_num_units_in_tick; + RK_U32 vps_time_scale; + RK_U8 vps_poc_proportional_to_timing_flag; + RK_S32 vps_num_ticks_poc_diff_one; ///< vps_num_ticks_poc_diff_one_minus1 + 1 + RK_S32 vps_num_hrd_parameters; + + RK_S32 vps_extension_flag; + +} HEVCVPS; + +typedef struct ScalingList { + /* This is a little wasteful, since sizeID 0 only needs 8 coeffs, + * and size ID 3 only has 2 arrays, not 6. */ + RK_U8 sl[4][6][64]; + RK_U8 sl_dc[2][6]; +} ScalingList; + +typedef struct HEVCSPS { + RK_U32 vps_id; + RK_S32 sps_id; + RK_S32 chroma_format_idc; + RK_U8 separate_colour_plane_flag; + + ///< output (i.e. cropped) values + RK_S32 output_width, output_height; + HEVCWindow output_window; + + HEVCWindow pic_conf_win; + + RK_S32 bit_depth; + RK_S32 bit_depth_chroma;///<- zrh add + RK_S32 pixel_shift; + RK_S32 pix_fmt; + + RK_U32 log2_max_poc_lsb; + RK_S32 pcm_enabled_flag; + + RK_S32 max_sub_layers; + struct { + int max_dec_pic_buffering; + int num_reorder_pics; + int max_latency_increase; + } temporal_layer[MAX_SUB_LAYERS]; + + VUI vui; + PTL ptl; + + RK_U8 scaling_list_enable_flag; + ScalingList scaling_list; + + RK_U32 nb_st_rps; + ShortTermRPS st_rps[MAX_SHORT_TERM_RPS_COUNT]; + + RK_U8 amp_enabled_flag; + RK_U8 sao_enabled; + + RK_U8 long_term_ref_pics_present_flag; + RK_U16 lt_ref_pic_poc_lsb_sps[32]; + RK_U8 used_by_curr_pic_lt_sps_flag[32]; + RK_U8 num_long_term_ref_pics_sps; + + struct { + RK_U8 bit_depth; + RK_U8 bit_depth_chroma; + RK_U32 log2_min_pcm_cb_size; + RK_U32 log2_max_pcm_cb_size; + RK_U8 loop_filter_disable_flag; + } pcm; + RK_U8 sps_temporal_mvp_enabled_flag; + RK_U8 sps_strong_intra_smoothing_enable_flag; + + RK_U32 log2_min_cb_size; + RK_U32 log2_diff_max_min_coding_block_size; + RK_U32 log2_min_tb_size; + RK_U32 log2_max_trafo_size; + RK_S32 log2_ctb_size; + RK_U32 log2_min_pu_size; + + RK_S32 max_transform_hierarchy_depth_inter; + RK_S32 max_transform_hierarchy_depth_intra; + + ///< coded frame dimension in various units + RK_S32 width; + RK_S32 height; + RK_S32 ctb_width; + RK_S32 ctb_height; + RK_S32 ctb_size; + RK_S32 min_cb_width; + RK_S32 min_cb_height; + RK_S32 min_tb_width; + RK_S32 min_tb_height; + RK_S32 min_pu_width; + RK_S32 min_pu_height; + + RK_S32 hshift[3]; + RK_S32 vshift[3]; + + RK_S32 qp_bd_offset; +#ifdef SCALED_REF_LAYER_OFFSETS + HEVCWindow scaled_ref_layer_window; +#endif +#ifdef REF_IDX_MFM + RK_S32 set_mfm_enabled_flag; +#endif +} HEVCSPS; + +typedef struct HEVCPPS { + RK_S32 sps_id; + RK_S32 pps_id; + + RK_U8 sign_data_hiding_flag; + + RK_U8 cabac_init_present_flag; + + RK_S32 num_ref_idx_l0_default_active; ///< num_ref_idx_l0_default_active_minus1 + 1 + RK_S32 num_ref_idx_l1_default_active; ///< num_ref_idx_l1_default_active_minus1 + 1 + RK_S32 pic_init_qp_minus26; + + RK_U8 constrained_intra_pred_flag; + RK_U8 transform_skip_enabled_flag; + + RK_U8 cu_qp_delta_enabled_flag; + RK_S32 diff_cu_qp_delta_depth; + + RK_S32 cb_qp_offset; + RK_S32 cr_qp_offset; + RK_U8 pic_slice_level_chroma_qp_offsets_present_flag; + RK_U8 weighted_pred_flag; + RK_U8 weighted_bipred_flag; + RK_U8 output_flag_present_flag; + RK_U8 transquant_bypass_enable_flag; + + RK_U8 dependent_slice_segments_enabled_flag; + RK_U8 tiles_enabled_flag; + RK_U8 entropy_coding_sync_enabled_flag; + + RK_S32 num_tile_columns; ///< num_tile_columns_minus1 + 1 + RK_S32 num_tile_rows; ///< num_tile_rows_minus1 + 1 + RK_U8 uniform_spacing_flag; + RK_U8 loop_filter_across_tiles_enabled_flag; + + RK_U8 seq_loop_filter_across_slices_enabled_flag; + + RK_U8 deblocking_filter_control_present_flag; + RK_U8 deblocking_filter_override_enabled_flag; + RK_U8 disable_dbf; + RK_S32 beta_offset; ///< beta_offset_div2 * 2 + RK_S32 tc_offset; ///< tc_offset_div2 * 2 + + RK_U8 scaling_list_data_present_flag; + ScalingList scaling_list; + + RK_U8 lists_modification_present_flag; + RK_S32 log2_parallel_merge_level; ///< log2_parallel_merge_level_minus2 + 2 + RK_S32 num_extra_slice_header_bits; + RK_U8 slice_header_extension_present_flag; + + RK_U8 pps_extension_flag; + RK_U8 pps_extension_data_flag; + // Inferred parameters + RK_U32 *column_width; ///< ColumnWidth + RK_U32 *row_height; ///< RowHeight + RK_U32 *col_bd; ///< ColBd + RK_U32 *row_bd; ///< RowBd + RK_S32 *col_idxX; + + RK_S32 *ctb_addr_rs_to_ts; ///< CtbAddrRSToTS + RK_S32 *ctb_addr_ts_to_rs; ///< CtbAddrTSToRS + RK_S32 *tile_id; ///< TileId + RK_S32 *tile_pos_rs; ///< TilePosRS + RK_S32 *min_cb_addr_zs; ///< MinCbAddrZS + RK_S32 *min_tb_addr_zs; ///< MinTbAddrZS +} HEVCPPS; + +typedef struct SliceHeader { + RK_U32 pps_id; + + ///< address (in raster order) of the first block in the current slice segment + RK_U32 slice_segment_addr; + ///< address (in raster order) of the first block in the current slice + RK_U32 slice_addr; + + enum SliceType slice_type; + + RK_S32 pic_order_cnt_lsb; + + RK_U8 first_slice_in_pic_flag; + RK_U8 dependent_slice_segment_flag; + RK_U8 pic_output_flag; + RK_U8 colour_plane_id; + + ///< RPS coded in the slice header itself is stored here + int short_term_ref_pic_set_sps_flag; + int short_term_ref_pic_set_size; + ShortTermRPS slice_rps; + const ShortTermRPS *short_term_rps; + LongTermRPS long_term_rps; + RK_U32 list_entry_lx[2][32]; + + RK_U8 rpl_modification_flag[2]; + RK_U8 no_output_of_prior_pics_flag; + RK_U8 slice_temporal_mvp_enabled_flag; + + RK_U32 nb_refs[2]; + + RK_U8 slice_sample_adaptive_offset_flag[3]; + RK_U8 mvd_l1_zero_flag; + + RK_U8 cabac_init_flag; + RK_U8 disable_deblocking_filter_flag; ///< slice_header_disable_deblocking_filter_flag + RK_U8 slice_loop_filter_across_slices_enabled_flag; + RK_U8 collocated_list; + + RK_U32 collocated_ref_idx; + + RK_S32 slice_qp_delta; + RK_S32 slice_cb_qp_offset; + RK_S32 slice_cr_qp_offset; + + RK_S32 beta_offset; ///< beta_offset_div2 * 2 + RK_S32 tc_offset; ///< tc_offset_div2 * 2 + + RK_U32 max_num_merge_cand; ///< 5 - 5_minus_max_num_merge_cand + + RK_S32 *entry_point_offset; + RK_S32 * offset; + RK_S32 * size; + RK_S32 num_entry_point_offsets; + + RK_S8 slice_qp; + + RK_U8 luma_log2_weight_denom; + RK_S16 chroma_log2_weight_denom; + + RK_S16 luma_weight_l0[16]; + RK_S16 chroma_weight_l0[16][2]; + RK_S16 chroma_weight_l1[16][2]; + RK_S16 luma_weight_l1[16]; + + RK_S16 luma_offset_l0[16]; + RK_S16 chroma_offset_l0[16][2]; + + RK_S16 luma_offset_l1[16]; + RK_S16 chroma_offset_l1[16][2]; + +#ifdef REF_IDX_FRAMEWORK + RK_S32 inter_layer_pred_enabled_flag; +#endif + +#ifdef JCTVC_M0458_INTERLAYER_RPS_SIG + RK_S32 active_num_ILR_ref_idx; //< Active inter-layer reference pictures + RK_S32 inter_layer_pred_layer_idc[MAX_VPS_LAYER_ID_PLUS1]; +#endif + + RK_S32 slice_ctb_addr_rs; +} SliceHeader; + +typedef struct CurrentFameInf { + HEVCVPS vps[MAX_VPS_COUNT]; + HEVCSPS sps[MAX_SPS_COUNT]; + HEVCPPS pps[MAX_PPS_COUNT]; + SliceHeader sh; +} CurrentFameInf_t; + +typedef struct DBParams { + RK_S32 beta_offset; + RK_S32 tc_offset; +} DBParams; + +#define HEVC_FRAME_FLAG_OUTPUT (1 << 0) +#define HEVC_FRAME_FLAG_SHORT_REF (1 << 1) +#define HEVC_FRAME_FLAG_LONG_REF (1 << 2) + +typedef struct HEVCFrame { + MppFrame frame; + RefPicList *refPicList; + RefPicListTab **rpl_tab; + RK_S32 ctb_count; + RK_S32 poc; + struct HEVCFrame *collocated_ref; + + HEVCWindow window; + + RK_U8 *rpl_tab_buf; + + RK_U8 *rpl_buf; + /** + * A sequence counter, so that old frames are output first + * after a POC reset + */ + RK_U16 sequence; + + /** + * A combination of HEVC_FRAME_FLAG_* + */ + RK_U8 flags; + RK_U32 slot_index; +} HEVCFrame; + +typedef struct HEVCNAL { + RK_U8 *rbsp_buffer; + RK_S32 rbsp_buffer_size; + RK_S32 size; + const RK_U8 *data; +} HEVCNAL; + +typedef struct HEVCLocalContext { + GetBitCxt_t gb; +} HEVCLocalContext; + + +typedef struct REF_PIC_DEC_INFO { + RK_U8 dbp_index; + RK_U8 is_long_term; +} REF_PIC_DEC_INFO; + +typedef struct HEVCContext { + H265dContext_t *h265dctx; + + HEVCLocalContext *HEVClc; + + MppFrame frame; + + const HEVCVPS *vps; + const HEVCSPS *sps; + const HEVCPPS *pps; + RK_U8 *vps_list[MAX_VPS_COUNT]; + RK_U8 *sps_list[MAX_SPS_COUNT]; + RK_U8 *pps_list[MAX_PPS_COUNT]; + + SliceHeader sh; + + ///< candidate references for the current frame + RefPicList rps[5]; + + enum NALUnitType nal_unit_type; + RK_S32 temporal_id; ///< temporal_id_plus1 - 1 + HEVCFrame *ref; + HEVCFrame DPB[32]; + RK_S32 poc; + RK_S32 pocTid0; + RK_S32 slice_idx; ///< number of the slice being currently decoded + RK_S32 eos; ///< current packet contains an EOS/EOB NAL + RK_S32 max_ra; + + RK_S32 is_decoded; + + + /** used on BE to byteswap the lines for checksumming */ + RK_U8 *checksum_buf; + RK_S32 checksum_buf_size; + + /** + * Sequence counters for decoded and output frames, so that old + * frames are output first after a POC reset + */ + RK_U16 seq_decode; + RK_U16 seq_output; + + RK_S32 wpp_err; + RK_S32 skipped_bytes; + + RK_U8 *data; + + HEVCNAL *nals; + RK_S32 nb_nals; + RK_S32 nals_allocated; + // type of the first VCL NAL of the current frame + enum NALUnitType first_nal_type; + + RK_U8 context_initialized; + RK_U8 is_nalff; ///< this flag is != 0 if bitstream is encapsulated + ///< as a format defined in 14496-15 + RK_S32 temporal_layer_id; + RK_S32 decoder_id; + RK_S32 apply_defdispwin; + + RK_S32 active_seq_parameter_set_id; + + RK_S32 nal_length_size; ///< Number of bytes used for nal length (1, 2 or 4) + RK_S32 nuh_layer_id; + + /** frame packing arrangement variables */ + RK_S32 sei_frame_packing_present; + RK_S32 frame_packing_arrangement_type; + RK_S32 content_interpretation_type; + RK_S32 quincunx_subsampling; + + RK_S32 picture_struct; + + /** 1 if the independent slice segment header was successfully parsed */ + RK_U8 slice_initialized; + + RK_S32 decode_checksum_sei; + + + RK_U8 scaling_list[81][1360]; + RK_U8 scaling_list_listen[81]; + RK_U8 sps_list_of_updated[MAX_SPS_COUNT];///< zrh add + RK_U8 pps_list_of_updated[MAX_PPS_COUNT];///< zrh add + + RK_S32 rps_used[16]; + RK_S32 nb_rps_used; + REF_PIC_DEC_INFO rps_pic_info[600][2][15]; // zrh add + RK_U8 lowdelay_flag[600]; + RK_U8 rps_bit_offset[600]; + RK_U8 rps_bit_offset_st[600]; + RK_U8 slice_nb_rps_poc[600]; + + RK_S32 frame_size; + + RK_S32 framestrid; + + RK_U32 nb_frame; + + RK_U8 output_frame_idx; + + RK_U32 got_frame; + + MppBufSlots slots; + + HalDecTask *task; + + void *hal_pic_private; + + RK_S64 pts; + + +} HEVCContext; + +RK_S32 mpp_hevc_decode_short_term_rps(HEVCContext *s, ShortTermRPS *rps, + const HEVCSPS *sps, RK_S32 is_slice_header); +RK_S32 mpp_hevc_decode_nal_vps(HEVCContext *s); +RK_S32 mpp_hevc_decode_nal_sps(HEVCContext *s); +RK_S32 mpp_hevc_decode_nal_pps(HEVCContext *s); +RK_S32 mpp_hevc_decode_nal_sei(HEVCContext *s); + +RK_S32 mpp_hevc_extract_rbsp(HEVCContext *s, const RK_U8 *src, RK_S32 length, + HEVCNAL *nal); + + +/** + * Mark all frames in DPB as unused for reference. + */ +void mpp_hevc_clear_refs(HEVCContext *s); + +/** + * Drop all frames currently in DPB. + */ +void mpp_hevc_flush_dpb(HEVCContext *s); + +/** + * Compute POC of the current frame and return it. + */ +int mpp_hevc_compute_poc(HEVCContext *s, RK_S32 poc_lsb); + + +/** + * Construct the reference picture sets for the current frame. + */ +RK_S32 mpp_hevc_frame_rps(HEVCContext *s); + +/** + * Construct the reference picture list(s) for the current slice. + */ +RK_S32 mpp_hevc_slice_rpl(HEVCContext *s); + +/** + * Get the number of candidate references for the current frame. + */ +RK_S32 mpp_hevc_frame_nb_refs(HEVCContext *s); +RK_S32 mpp_hevc_set_new_ref(HEVCContext *s, MppFrame *frame, RK_S32 poc); + +/** + * Find next frame in output order and put a reference to it in frame. + * @return 1 if a frame was output, 0 otherwise + */ +void mpp_hevc_unref_frame(HEVCContext *s, HEVCFrame *frame, RK_S32 flags); + +void mpp_hevc_pps_free(RK_U8 *data); + + + + +#endif /* __H265D_PAESER_H__ */ diff --git a/mpp/codec/dec/h265/h265d_parser2_syntax.c b/mpp/codec/dec/h265/h265d_parser2_syntax.c new file mode 100644 index 00000000..4de3f3e7 --- /dev/null +++ b/mpp/codec/dec/h265/h265d_parser2_syntax.c @@ -0,0 +1,311 @@ +/* + * + * Copyright 2010 Rockchip Electronics Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * @file h265d_parser2_syntax.c + * @brief + * @author csy(csy@rock-chips.com) + + * @version 1.0.0 + * @history + * 2015.7.15 : Create + */ + +#define MODULE_TAG "H265SYNATX" +#include "h265d_parser.h" +#include "h265d_syntax.h" + +static void fill_picture_entry(DXVA_PicEntry_HEVC *pic, + unsigned index, unsigned flag) +{ + mpp_assert((index & 0x7f) == index && (flag & 0x01) == flag); + pic->bPicEntry = index | (flag << 7); +} + +static RK_S32 get_refpic_index(const DXVA_PicParams_HEVC *pp, int surface_index) +{ + RK_U32 i; + for (i = 0; i < MPP_ARRAY_ELEMS(pp->RefPicList); i++) { + if ((pp->RefPicList[i].bPicEntry & 0x7f) == surface_index) { + //mpp_err("retun %d slot_index = %d",i,surface_index); + return i; + } + } + return 0xff; +} + +static void fill_picture_parameters(const HEVCContext *h, + DXVA_PicParams_HEVC *pp) +{ + const HEVCFrame *current_picture = h->ref; + const HEVCPPS *pps = (HEVCPPS *)h->pps_list[h->sh.pps_id]; + const HEVCSPS *sps = (HEVCSPS *)h->sps_list[pps->sps_id]; + + RK_U32 i, j; + + memset(pp, 0, sizeof(*pp)); + + pp->PicWidthInMinCbsY = sps->min_cb_width; + pp->PicHeightInMinCbsY = sps->min_cb_height; + pp->pps_id = h->sh.pps_id; + pp->sps_id = pps->sps_id; + pp->vps_id = sps->vps_id; + + pp->wFormatAndSequenceInfoFlags = (sps->chroma_format_idc << 0) | + (sps->separate_colour_plane_flag << 2) | + ((sps->bit_depth - 8) << 3) | + ((sps->bit_depth - 8) << 6) | + ((sps->log2_max_poc_lsb - 4) << 9) | + (0 << 13) | + (0 << 14) | + (0 << 15); + + fill_picture_entry(&pp->CurrPic, current_picture->slot_index, 0); + + pp->sps_max_dec_pic_buffering_minus1 = sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering - 1; + pp->log2_min_luma_coding_block_size_minus3 = sps->log2_min_cb_size - 3; + pp->log2_diff_max_min_luma_coding_block_size = sps->log2_diff_max_min_coding_block_size; + pp->log2_min_transform_block_size_minus2 = sps->log2_min_tb_size - 2; + pp->log2_diff_max_min_transform_block_size = sps->log2_max_trafo_size - sps->log2_min_tb_size; + pp->max_transform_hierarchy_depth_inter = sps->max_transform_hierarchy_depth_inter; + pp->max_transform_hierarchy_depth_intra = sps->max_transform_hierarchy_depth_intra; + pp->num_short_term_ref_pic_sets = sps->nb_st_rps; + pp->num_long_term_ref_pics_sps = sps->num_long_term_ref_pics_sps; + + pp->num_ref_idx_l0_default_active_minus1 = pps->num_ref_idx_l0_default_active - 1; + pp->num_ref_idx_l1_default_active_minus1 = pps->num_ref_idx_l1_default_active - 1; + pp->init_qp_minus26 = pps->pic_init_qp_minus26; + + if (h->sh.short_term_ref_pic_set_sps_flag == 0 && h->sh.short_term_rps) { + pp->ucNumDeltaPocsOfRefRpsIdx = h->sh.short_term_rps->rps_idx_num_delta_pocs; + pp->wNumBitsForShortTermRPSInSlice = h->sh.short_term_ref_pic_set_size; + } + + pp->dwCodingParamToolFlags = (sps->scaling_list_enable_flag << 0) | + (sps->amp_enabled_flag << 1) | + (sps->sao_enabled << 2) | + (sps->pcm_enabled_flag << 3) | + ((sps->pcm_enabled_flag ? (sps->pcm.bit_depth - 1) : 0) << 4) | + ((sps->pcm_enabled_flag ? (sps->pcm.bit_depth_chroma - 1) : 0) << 8) | + ((sps->pcm_enabled_flag ? (sps->pcm.log2_min_pcm_cb_size - 3) : 0) << 12) | + ((sps->pcm_enabled_flag ? (sps->pcm.log2_max_pcm_cb_size - sps->pcm.log2_min_pcm_cb_size) : 0) << 14) | + (sps->pcm.loop_filter_disable_flag << 16) | + (sps->long_term_ref_pics_present_flag << 17) | + (sps->sps_temporal_mvp_enabled_flag << 18) | + (sps->sps_strong_intra_smoothing_enable_flag << 19) | + (pps->dependent_slice_segments_enabled_flag << 20) | + (pps->output_flag_present_flag << 21) | + (pps->num_extra_slice_header_bits << 22) | + (pps->sign_data_hiding_flag << 25) | + (pps->cabac_init_present_flag << 26) | + (0 << 27); + + pp->dwCodingSettingPicturePropertyFlags = (pps->constrained_intra_pred_flag << 0) | + (pps->transform_skip_enabled_flag << 1) | + (pps->cu_qp_delta_enabled_flag << 2) | + (pps->pic_slice_level_chroma_qp_offsets_present_flag << 3) | + (pps->weighted_pred_flag << 4) | + (pps->weighted_bipred_flag << 5) | + (pps->transquant_bypass_enable_flag << 6) | + (pps->tiles_enabled_flag << 7) | + (pps->entropy_coding_sync_enabled_flag << 8) | + (pps->uniform_spacing_flag << 9) | + ((pps->tiles_enabled_flag ? pps->loop_filter_across_tiles_enabled_flag : 0) << 10) | + (pps->seq_loop_filter_across_slices_enabled_flag << 11) | + (pps->deblocking_filter_override_enabled_flag << 12) | + (pps->disable_dbf << 13) | + (pps->lists_modification_present_flag << 14) | + (pps->slice_header_extension_present_flag << 15) | + (IS_IRAP(h) << 16) | + (IS_IDR(h) << 17) | + /* IntraPicFlag */ + (IS_IRAP(h) << 18) | + (0 << 19); + pp->pps_cb_qp_offset = pps->cb_qp_offset; + pp->pps_cr_qp_offset = pps->cr_qp_offset; + if (pps->tiles_enabled_flag) { + pp->num_tile_columns_minus1 = pps->num_tile_columns - 1; + pp->num_tile_rows_minus1 = pps->num_tile_rows - 1; + + if (!pps->uniform_spacing_flag) { + for (i = 0; i < (RK_U32)pps->num_tile_columns; i++) + pp->column_width_minus1[i] = pps->column_width[i] - 1; + + for (i = 0; i < (RK_U32)pps->num_tile_rows; i++) + pp->row_height_minus1[i] = pps->row_height[i] - 1; + } + } + + pp->diff_cu_qp_delta_depth = pps->diff_cu_qp_delta_depth; + pp->pps_beta_offset_div2 = pps->beta_offset / 2; + pp->pps_tc_offset_div2 = pps->tc_offset / 2; + pp->log2_parallel_merge_level_minus2 = pps->log2_parallel_merge_level - 2; + pp->CurrPicOrderCntVal = h->poc; + + mpp_err("fill RefPicList from the DPB"); + // fill RefPicList from the DPB + for (i = 0, j = 0; i < MPP_ARRAY_ELEMS(pp->RefPicList); i++) { + const HEVCFrame *frame = NULL; + while (!frame && j < MPP_ARRAY_ELEMS(h->DPB)) { + if (&h->DPB[j] != current_picture && (h->DPB[j].flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF))) + frame = &h->DPB[j]; + j++; + } + + if (frame) { + fill_picture_entry(&pp->RefPicList[i], frame->slot_index, !!(frame->flags & HEVC_FRAME_FLAG_LONG_REF)); + pp->PicOrderCntValList[i] = frame->poc; + mpp_buf_slot_inc_hw_ref(h->slots, frame->slot_index); + h->task->refer[i] = frame->slot_index; + //mpp_err("ref[%d] = %d",i,frame->slot_index); + } else { + pp->RefPicList[i].bPicEntry = 0xff; + pp->PicOrderCntValList[i] = 0; + h->task->refer[i] = -1; + } + } + +#define DO_REF_LIST(ref_idx, ref_list) { \ + const RefPicList *rpl = &h->rps[ref_idx]; \ + for (i = 0, j = 0; i < MPP_ARRAY_ELEMS(pp->ref_list); i++) { \ + const HEVCFrame *frame = NULL; \ + while (!frame && j < (RK_U32)rpl->nb_refs) \ + frame = rpl->ref[j++]; \ + if (frame) \ + pp->ref_list[i] = get_refpic_index(pp, frame->slot_index); \ + else \ + pp->ref_list[i] = 0xff; \ + } \ + } + + // Fill short term and long term lists + DO_REF_LIST(ST_CURR_BEF, RefPicSetStCurrBefore); + DO_REF_LIST(ST_CURR_AFT, RefPicSetStCurrAfter); + DO_REF_LIST(LT_CURR, RefPicSetLtCurr); + +} +extern RK_U8 mpp_hevc_diag_scan4x4_x[16]; +extern RK_U8 mpp_hevc_diag_scan4x4_y[16]; +extern RK_U8 mpp_hevc_diag_scan8x8_x[64]; +extern RK_U8 mpp_hevc_diag_scan8x8_y[64]; + +static void fill_scaling_lists(const HEVCContext *h, DXVA_Qmatrix_HEVC *qm) +{ + RK_U32 i, j, pos; + const HEVCPPS *pps = (HEVCPPS *)h->pps_list[h->sh.pps_id]; + const HEVCSPS *sps = (HEVCSPS *)h->sps_list[pps->sps_id]; + const ScalingList *sl = pps->scaling_list_data_present_flag ? + &pps->scaling_list : &sps->scaling_list; + + memset(qm, 0, sizeof(*qm)); + for (i = 0; i < 6; i++) { + for (j = 0; j < 16; j++) { + pos = 4 * mpp_hevc_diag_scan4x4_y[j] + mpp_hevc_diag_scan4x4_x[j]; + qm->ucScalingLists0[i][j] = sl->sl[0][i][pos]; + } + + for (j = 0; j < 64; j++) { + pos = 8 * mpp_hevc_diag_scan8x8_y[j] + mpp_hevc_diag_scan8x8_x[j]; + qm->ucScalingLists1[i][j] = sl->sl[1][i][pos]; + qm->ucScalingLists2[i][j] = sl->sl[2][i][pos]; + + if (i < 2) + qm->ucScalingLists3[i][j] = sl->sl[3][i * 3][pos]; + } + + qm->ucScalingListDCCoefSizeID2[i] = sl->sl_dc[0][i]; + + if (i < 2) + qm->ucScalingListDCCoefSizeID3[i] = sl->sl_dc[1][i * 3]; + } +} + +static void fill_slice_short(DXVA_Slice_HEVC_Short *slice, + unsigned position, unsigned size) +{ + memset(slice, 0, sizeof(*slice)); + slice->BSNALunitDataLocation = position; + slice->SliceBytesInBuffer = size; + slice->wBadSliceChopping = 0; +} + +RK_S32 h265d_parser2_syntax(void *ctx) +{ + + H265dContext_t *h265dctx = (H265dContext_t *)ctx; + const HEVCContext *h = h265dctx->priv_data; + + h265d_dxva2_picture_context_t *ctx_pic = h->hal_pic_private; + + /* Fill up DXVA_PicParams_HEVC */ + fill_picture_parameters(h, &ctx_pic->pp); + + /* Fill up DXVA_Qmatrix_HEVC */ + fill_scaling_lists(h, &ctx_pic->qm); + + return 0; +} + +RK_S32 h265d_syntax_fill_slice(void *ctx, MppBuffer *streambuf) +{ + H265dContext_t *h265dctx = (H265dContext_t *)ctx; + const HEVCContext *h = h265dctx->priv_data; + h265d_dxva2_picture_context_t *ctx_pic = h->hal_pic_private; + RK_S32 i, count = 0; + RK_U32 position = 0; + RK_U8 *ptr = (RK_U8 *)mpp_buffer_get_ptr(streambuf); + RK_U8 *current = ptr; + if (current == NULL) { + return MPP_ERR_NULL_PTR; + } + for (i = 0; i < h->nb_nals; i++) { + static const RK_U8 start_code[] = {0, 0, 1 }; + static const RK_U32 start_code_size = sizeof(start_code); + GetBitCxt_t gb_cxt, *gb; + RK_S32 value; + RK_U32 nal_type; + + mpp_Init_Bits(&gb_cxt, (RK_U8 *)h->nals[i].data, + h->nals[i].size); + + gb = &gb_cxt; + + READ_BIT1(gb, &value); + + if ( value != 0) + return MPP_ERR_STREAM; + + READ_BITS(gb, 6, &nal_type); + + if (nal_type >= 32) { + continue; + } + memcpy(current, start_code, start_code_size); + current += start_code_size; + position += start_code_size; + memcpy(current, h->nals[i].data, h->nals[i].size); + mpp_err("h->nals[%d].size = %d", i, h->nals[i].size); + fill_slice_short(&ctx_pic->slice_short[i], position, h->nals[i].size); + current += h->nals[i].size; + position += h->nals[i].size; + count++; + } + ctx_pic->slice_count = count; + ctx_pic->bitstream_size = position; + ctx_pic->bitstream = (RK_U8*)ptr; + return MPP_OK; +} diff --git a/mpp/codec/dec/h265/h265d_ps.c b/mpp/codec/dec/h265/h265d_ps.c new file mode 100644 index 00000000..7261da1e --- /dev/null +++ b/mpp/codec/dec/h265/h265d_ps.c @@ -0,0 +1,2146 @@ +/* + * + * Copyright 2010 Rockchip Electronics Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * @file h265d_ps.c + * @brief + * @author csy(csy@rock-chips.com) + + * @version 1.0.0 + * @history + * 2015.7.15 : Create + */ +#define LOG_TAG "H265PARSER_PS" +#include "mpp_bitread.h" +#include "h265d_parser.h" +#include "mpp_mem.h" +#include "vpu_api.h" +static const RK_U8 default_scaling_list_intra[] = { + 16, 16, 16, 16, 17, 18, 21, 24, + 16, 16, 16, 16, 17, 19, 22, 25, + 16, 16, 17, 18, 20, 22, 25, 29, + 16, 16, 18, 21, 24, 27, 31, 36, + 17, 17, 20, 24, 30, 35, 41, 47, + 18, 19, 22, 27, 35, 44, 54, 65, + 21, 22, 25, 31, 41, 54, 70, 88, + 24, 25, 29, 36, 47, 65, 88, 115 +}; + +static const RK_U8 default_scaling_list_inter[] = { + 16, 16, 16, 16, 17, 18, 20, 24, + 16, 16, 16, 17, 18, 20, 24, 25, + 16, 16, 17, 18, 20, 24, 25, 28, + 16, 17, 18, 20, 24, 25, 28, 33, + 17, 18, 20, 24, 25, 28, 33, 41, + 18, 20, 24, 25, 28, 33, 41, 54, + 20, 24, 25, 28, 33, 41, 54, 71, + 24, 25, 28, 33, 41, 54, 71, 91 +}; + +static const MppRational_t vui_sar[] = { + { 0, 1 }, + { 1, 1 }, + { 12, 11 }, + { 10, 11 }, + { 16, 11 }, + { 40, 33 }, + { 24, 11 }, + { 20, 11 }, + { 32, 11 }, + { 80, 33 }, + { 18, 11 }, + { 15, 11 }, + { 64, 33 }, + { 160, 99 }, + { 4, 3 }, + { 3, 2 }, + { 2, 1 }, +}; + +const RK_U8 mpp_hevc_diag_scan4x4_x[16] = { + 0, 0, 1, 0, + 1, 2, 0, 1, + 2, 3, 1, 2, + 3, 2, 3, 3, +}; + +const RK_U8 mpp_hevc_diag_scan4x4_y[16] = { + 0, 1, 0, 2, + 1, 0, 3, 2, + 1, 0, 3, 2, + 1, 3, 2, 3, +}; + +const RK_U8 mpp_hevc_diag_scan8x8_x[64] = { + 0, 0, 1, 0, + 1, 2, 0, 1, + 2, 3, 0, 1, + 2, 3, 4, 0, + 1, 2, 3, 4, + 5, 0, 1, 2, + 3, 4, 5, 6, + 0, 1, 2, 3, + 4, 5, 6, 7, + 1, 2, 3, 4, + 5, 6, 7, 2, + 3, 4, 5, 6, + 7, 3, 4, 5, + 6, 7, 4, 5, + 6, 7, 5, 6, + 7, 6, 7, 7, +}; + +const RK_U8 mpp_hevc_diag_scan8x8_y[64] = { + 0, 1, 0, 2, + 1, 0, 3, 2, + 1, 0, 4, 3, + 2, 1, 0, 5, + 4, 3, 2, 1, + 0, 6, 5, 4, + 3, 2, 1, 0, + 7, 6, 5, 4, + 3, 2, 1, 0, + 7, 6, 5, 4, + 3, 2, 1, 7, + 6, 5, 4, 3, + 2, 7, 6, 5, + 4, 3, 7, 6, + 5, 4, 7, 6, + 5, 7, 6, 7, +}; + +int mpp_hevc_decode_short_term_rps(HEVCContext *s, ShortTermRPS *rps, + const HEVCSPS *sps, RK_S32 is_slice_header) +{ + HEVCLocalContext *lc = s->HEVClc; + RK_U8 rps_predict = 0; + RK_S32 delta_poc; + RK_S32 k0 = 0; + RK_S32 k1 = 0; + RK_S32 k = 0; + RK_S32 i; + + GetBitCxt_t *gb = &lc->gb; + + if (rps != sps->st_rps && sps->nb_st_rps) + READ_BIT1(gb, &rps_predict); + + if (rps_predict) { + const ShortTermRPS *rps_ridx; + RK_S32 delta_rps, abs_delta_rps; + RK_U8 use_delta_flag = 0; + RK_U8 delta_rps_sign; + + if (is_slice_header) { + RK_U32 delta_idx = 0; + READ_UE(gb, &delta_idx); + delta_idx = delta_idx + 1; + if (delta_idx > sps->nb_st_rps) { + mpp_err( + "Invalid value of delta_idx in slice header RPS: %d > %d.\n", + delta_idx, sps->nb_st_rps); + return MPP_ERR_STREAM; + } + rps_ridx = &sps->st_rps[sps->nb_st_rps - delta_idx]; + } else + rps_ridx = &sps->st_rps[rps - sps->st_rps - 1]; + + READ_BITS(gb, 1, &delta_rps_sign); + + READ_UE(gb, &abs_delta_rps); + + abs_delta_rps = abs_delta_rps + 1; + + delta_rps = (1 - (delta_rps_sign << 1)) * abs_delta_rps; + for (i = 0; i <= rps_ridx->num_delta_pocs; i++) { + RK_S32 used = 0; + READ_BIT1(gb, &used); + + rps->used[k] = used; + + if (!used) + READ_BIT1(gb, &use_delta_flag); + + if (used || use_delta_flag) { + if (i < rps_ridx->num_delta_pocs) + delta_poc = delta_rps + rps_ridx->delta_poc[i]; + else + delta_poc = delta_rps; + rps->delta_poc[k] = delta_poc; + if (delta_poc < 0) + k0++; + else + k1++; + k++; + } + } + + rps->num_delta_pocs = k; + rps->num_negative_pics = k0; + // sort in increasing order (smallest first) + if (rps->num_delta_pocs != 0) { + RK_S32 used, tmp; + for (i = 1; i < rps->num_delta_pocs; i++) { + delta_poc = rps->delta_poc[i]; + used = rps->used[i]; + for (k = i - 1; k >= 0; k--) { + tmp = rps->delta_poc[k]; + if (delta_poc < tmp) { + rps->delta_poc[k + 1] = tmp; + rps->used[k + 1] = rps->used[k]; + rps->delta_poc[k] = delta_poc; + rps->used[k] = used; + } + } + } + } + if ((rps->num_negative_pics >> 1) != 0) { + RK_S32 used; + k = rps->num_negative_pics - 1; + // flip the negative values to largest first + for (i = 0; (RK_U32)i < rps->num_negative_pics >> 1; i++) { + delta_poc = rps->delta_poc[i]; + used = rps->used[i]; + rps->delta_poc[i] = rps->delta_poc[k]; + rps->used[i] = rps->used[k]; + rps->delta_poc[k] = delta_poc; + rps->used[k] = used; + k--; + } + } + } else { + RK_U32 prev, nb_positive_pics; + + READ_UE(gb, &rps->num_negative_pics); + + READ_UE(gb, &nb_positive_pics); + + if (rps->num_negative_pics >= MAX_REFS || + nb_positive_pics >= MAX_REFS) { + mpp_err( "Too many refs in a short term RPS.\n"); + return MPP_ERR_STREAM; + } + + rps->num_delta_pocs = rps->num_negative_pics + nb_positive_pics; + if (rps->num_delta_pocs) { + prev = 0; + for (i = 0; (RK_U32)i < rps->num_negative_pics; i++) { + READ_UE(gb, &delta_poc); + delta_poc += 1; + prev -= delta_poc; + rps->delta_poc[i] = prev; + READ_BIT1(gb, &rps->used[i]); + } + prev = 0; + for (i = 0; (RK_U32)i < nb_positive_pics; i++) { + READ_UE(gb, &delta_poc); + delta_poc = delta_poc + 1; + prev += delta_poc; + rps->delta_poc[rps->num_negative_pics + i] = prev; + READ_BIT1(gb, &rps->used[rps->num_negative_pics + i]); + } + } + } + return 0; +} + + +static RK_S32 decode_profile_tier_level(HEVCContext *s, PTLCommon *ptl) +{ + int i; + HEVCLocalContext *lc = s->HEVClc; + GetBitCxt_t *gb = &lc->gb; + + READ_BITS(gb, 2, &ptl->profile_space); + READ_BIT1(gb, &ptl->tier_flag); + READ_BITS(gb, 5, &ptl->profile_idc); + + if (ptl->profile_idc == MPP_PROFILE_HEVC_MAIN) + h265d_dbg(H265D_DBG_GLOBAL, "Main profile bitstream\n"); + else if (ptl->profile_idc == MPP_PROFILE_HEVC_MAIN_10) + h265d_dbg(H265D_DBG_GLOBAL, "Main 10 profile bitstream\n"); + else if (ptl->profile_idc == MPP_PROFILE_HEVC_MAIN_STILL_PICTURE) + h265d_dbg(H265D_DBG_GLOBAL, "Main Still Picture profile bitstream\n"); + else + mpp_log("Unknown HEVC profile: %d\n", ptl->profile_idc); + + for (i = 0; i < 32; i++) + READ_BIT1(gb, & ptl->profile_compatibility_flag[i]); + READ_BIT1(gb, &ptl->progressive_source_flag); + READ_BIT1(gb, &ptl->interlaced_source_flag); + READ_BIT1(gb, &ptl->non_packed_constraint_flag); + READ_BIT1(gb, &ptl->frame_only_constraint_flag); + + READ_SKIPBITS(gb, 16); // XXX_reserved_zero_44bits[0..15] + READ_SKIPBITS(gb, 16); // XXX_reserved_zero_44bits[16..31] + READ_SKIPBITS(gb, 12); // XXX_reserved_zero_44bits[32..43] + return 0; +} + +static RK_S32 parse_ptl(HEVCContext *s, PTL *ptl, int max_num_sub_layers) +{ + RK_S32 i; + HEVCLocalContext *lc = s->HEVClc; + GetBitCxt_t *gb = &lc->gb; + decode_profile_tier_level(s, &ptl->general_ptl); + READ_BITS(gb, 8, &ptl->general_ptl.level_idc); + + for (i = 0; i < max_num_sub_layers - 1; i++) { + READ_BIT1(gb, &ptl->sub_layer_profile_present_flag[i]); + READ_BIT1(gb, &ptl->sub_layer_level_present_flag[i]); + } + if (max_num_sub_layers - 1 > 0) + for (i = max_num_sub_layers - 1; i < 8; i++) + READ_SKIPBITS(gb, 2); // reserved_zero_2bits[i] + for (i = 0; i < max_num_sub_layers - 1; i++) { + if (ptl->sub_layer_profile_present_flag[i]) + decode_profile_tier_level(s, &ptl->sub_layer_ptl[i]); + if (ptl->sub_layer_level_present_flag[i]) + READ_BITS(gb, 8, &ptl->sub_layer_ptl[i].level_idc); + } + + return 0; +} + +static RK_S32 decode_sublayer_hrd(HEVCContext *s, unsigned int nb_cpb, + int subpic_params_present) +{ + GetBitCxt_t *gb = &s->HEVClc->gb; + RK_U32 i, value; + + for (i = 0; i < nb_cpb; i++) { + READ_UE(gb, &value); // bit_rate_value_minus1 + READ_UE(gb, &value); // cpb_size_value_minus1 + + if (subpic_params_present) { + READ_UE(gb, &value); // cpb_size_du_value_minus1 + READ_UE(gb, &value); // bit_rate_du_value_minus1 + } + READ_SKIPBITS(gb, 1); // cbr_flag + } + return 0; +} + +static RK_S32 decode_hrd(HEVCContext *s, int common_inf_present, + int max_sublayers) +{ + GetBitCxt_t *gb = &s->HEVClc->gb; + int nal_params_present = 0, vcl_params_present = 0; + int subpic_params_present = 0; + int i; + + if (common_inf_present) { + READ_BIT1(gb, &nal_params_present); + READ_BIT1(gb, &vcl_params_present); + + if (nal_params_present || vcl_params_present) { + READ_BIT1(gb, &subpic_params_present); + + if (subpic_params_present) { + READ_SKIPBITS(gb, 8); // tick_divisor_minus2 + READ_SKIPBITS(gb, 5); // du_cpb_removal_delay_increment_length_minus1 + READ_SKIPBITS(gb, 1); // sub_pic_cpb_params_in_pic_timing_sei_flag + READ_SKIPBITS(gb, 5); // dpb_output_delay_du_length_minus1 + } + + READ_SKIPBITS(gb, 4); // bit_rate_scale + READ_SKIPBITS(gb, 4); // cpb_size_scale + + if (subpic_params_present) + READ_SKIPBITS(gb, 4); // cpb_size_du_scale + + READ_SKIPBITS(gb, 5); // initial_cpb_removal_delay_length_minus1 + READ_SKIPBITS(gb, 5); // au_cpb_removal_delay_length_minus1 + READ_SKIPBITS(gb, 5); // dpb_output_delay_length_minus1 + } + } + + for (i = 0; i < max_sublayers; i++) { + RK_S32 low_delay = 0; + RK_U32 nb_cpb = 1; + RK_S32 fixed_rate = 0; + RK_S32 value = 0; + + READ_BIT1(gb, &fixed_rate); + + if (!fixed_rate) + READ_BIT1(gb, &fixed_rate); + + if (fixed_rate) + READ_UE(gb, &value); // elemental_duration_in_tc_minus1 + else + READ_BIT1(gb, &low_delay); + + if (!low_delay) { + READ_UE(gb, &nb_cpb); + nb_cpb = nb_cpb + 1; + } + + if (nal_params_present) + decode_sublayer_hrd(s, nb_cpb, subpic_params_present); + if (vcl_params_present) + decode_sublayer_hrd(s, nb_cpb, subpic_params_present); + } + return 0; +} + + +#ifdef VPS_EXTENSION +static RK_S32 parse_vps_extension (HEVCContext *s, HEVCVPS *vps) +{ + RK_S32 i, j; + RK_S32 value = 0; + GetBitCxt_t *gb = &s->HEVClc->gb; +#ifdef VPS_EXTN_MASK_AND_DIM_INFO + RK_S32 numScalabilityTypes = 0; + READ_BIT1(gb, &vps->avc_base_layer_flag); + READ_BIT1(gb, &vps->splitting_flag); + + for (i = 0; i < MAX_VPS_NUM_SCALABILITY_TYPES; i++) { + READ_BIT1(gb, &vps->scalability_mask[i]); + numScalabilityTypes += vps->scalability_mask[i]; + if ( i != 1 && vps->scalability_mask[i] != 0) { + mpp_err( "Multiview and reserved masks are not used in this version of software \n"); + } + } + + vps->m_numScalabilityTypes = numScalabilityTypes; + for (i = 0; i < numScalabilityTypes; i++) { + READ_BITS(gb, 3, &vps->dimension_id_len[i]); + vps->dimension_id_len[i] = vps->dimension_id_len[i] + 1; + } + + if (vps->splitting_flag) { + int numBits = 0; + for (i = 0; i < numScalabilityTypes; i++) { + numBits += vps->dimension_id_len[i]; + } + if (numBits > 6) + mpp_err( "numBits>6 \n"); + } + + READ_BIT1(gb, &vps->nuh_layer_id_present_flag); + vps->layer_id_in_nuh[0] = 0; + vps->m_layerIdInVps[0] = 0; + + for (i = 1; i < vps->vps_max_layers; i++) { + if (vps->nuh_layer_id_present_flag ) { + READ_BITS(gb, 6, vps->layer_id_in_nuh[i]); + } else { + vps->layer_id_in_nuh[i] = i; + } + vps->m_layerIdInVps[vps->layer_id_in_nuh[i]] = i; + for (j = 0; j < numScalabilityTypes; j++) { + READ_BITS(gb, vps->dimension_id_len[j], &vps->dimension_id[i][j]); + } + } + +#endif +#ifdef VPS_MOVE_DIR_DEPENDENCY_FLAG +#ifdef VPS_EXTN_DIRECT_REF_LAYERS + vps->m_numDirectRefLayers[0] = 0; + for ( i = 1; i <= vps->vps_max_layers - 1; i++) { + RK_S32 numDirectRefLayers = 0; + for ( j = 0; j < i; j++) { + READ_BIT1(gb, &vps->direct_dependency_flag[i][j]); + if (vps->direct_dependency_flag[i][j]) { + vps->m_refLayerId[i][numDirectRefLayers] = j; + numDirectRefLayers++; + } + } + + vps->m_numDirectRefLayers[i] = numDirectRefLayers; + } +#endif +#endif +#ifdef VPS_EXTN_PROFILE_INFO +#ifdef VPS_PROFILE_OUTPUT_LAYERS + READ_BITS(gb, 10, value); + if ( value != (vps->vps_num_layer_sets - 1)) { //vps_number_layer_sets_minus1 + mpp_err( "Erro vps_number_layer_sets_minus1 != vps->vps_num_layer_sets-1 \n"); + } + READ_BITS(gb, 6, &vps->vps_num_profile_tier_level); + vps->vps_num_profile_tier_level = vps->vps_num_profile_tier_level + 1; + vps->PTLExt = mpp_malloc(PTL*, vps->vps_num_profile_tier_level); // TO DO add free + + for (i = 1; i <= vps->vps_num_profile_tier_level - 1; i++) +#else + vps->PTLExt = mpp_malloc(PTL*, vps->vps_num_layer_sets); // TO DO add free + for (i = 1; i <= vps->vps_num_layer_sets - 1; i++) +#endif + { + READ_BIT1(gb, &vps->vps_profile_present_flag[i]); + if ( !vps->vps_profile_present_flag[i] ) { +#ifdef VPS_PROFILE_OUTPUT_LAYERS + READ_BITS(gb, 6, &vps->profile_ref[i]) + + vps->profile_ref[i] = vps->profile_ref[i] + 1; + +#else + READ_UE(gb, &vps->profile_ref[i]); +#endif + vps->PTLExt[i] = mpp_malloc(PTL, 1); // TO DO add free + memcpy(vps->PTLExt[i], vps->PTLExt[vps->profile_ref[i]], sizeof(PTL)); + } + vps->PTLExt[i] = mpp_malloc(PTL, 1); // TO DO add free + parse_ptl(s, vps->PTLExt[i], vps->vps_max_sub_layers); + } +#endif + +#ifdef VPS_PROFILE_OUTPUT_LAYERS + READ_BIT1(gb, &vps->more_output_layer_sets_than_default_flag ); + RK_S32 numOutputLayerSets = 0; + if (! vps->more_output_layer_sets_than_default_flag ) { + numOutputLayerSets = vps->vps_num_layer_sets; + } else { + READ_BITS(gb, 10, &vps->num_add_output_layer_sets); + numOutputLayerSets = vps->vps_num_layer_sets + vps->num_add_output_layer_sets; + } + if (numOutputLayerSets > 1) { + READ_BIT1(gb, &vps->default_one_target_output_layer_flag); + } + vps->m_numOutputLayerSets = numOutputLayerSets; + for (i = 1; i < numOutputLayerSets; i++) { + if ( i > (vps->vps_num_layer_sets - 1) ) { + RK_S32 numBits = 1, lsIdx; + while ((1 << numBits) < (vps->vps_num_layer_sets - 1)) { + numBits++; + } + READ_BITS(gb, numBits, &vps->output_layer_set_idx[i]); + vps->output_layer_set_idx[i] = vps->output_layer_set_idx[i] + 1; + lsIdx = vps->output_layer_set_idx[i]; + for (j = 0; j < vps->m_numLayerInIdList[lsIdx] - 1; j++) { + READ_BIT1(gb, &vps->output_layer_flag[i][j]); + } + } else { + int lsIdx = i; + if ( vps->default_one_target_output_layer_flag ) { + for (j = 0; j < vps->m_numLayerInIdList[lsIdx]; j++) { + vps->output_layer_flag[i][j] = (j == (vps->m_numLayerInIdList[lsIdx] - 1)); + } + } else { + for (j = 0; j < vps->m_numLayerInIdList[lsIdx]; j++) { + vps->output_layer_flag[i][j] = 1; + } + } + } + int numBits = 1; + while ((1 << numBits) < (vps->vps_num_profile_tier_level)) { + numBits++; + } + READ_BITS(gb, numBits, &vps->profile_level_tier_idx[i]); + } +#endif +#ifdef JCTVC_M0458_INTERLAYER_RPS_SIG + READ_BIT1(gb, &vps->max_one_active_ref_layer_flag); +#endif +} +#endif +static RK_S32 compare_vps(HEVCVPS *openhevc_vps, HEVCVPS *vps) +{ + + if (openhevc_vps->vps_temporal_id_nesting_flag != + vps->vps_temporal_id_nesting_flag) { + mpp_log("vps_temporal_id_nesting_flag diff\n"); + return -1; + } + + if (openhevc_vps->vps_max_layers != vps->vps_max_layers) { + mpp_log("vps_max_layers diff\n"); + return -1; + } + + if (openhevc_vps->vps_max_sub_layers != vps->vps_max_sub_layers) { + mpp_log("vps_max_sub_layers diff\n"); + return -1; + } + if (openhevc_vps->vps_sub_layer_ordering_info_present_flag != + vps->vps_sub_layer_ordering_info_present_flag) { + mpp_log("vps_sub_layer_ordering_info_present_flag diff\n"); + return -1; + } + + if (openhevc_vps->vps_max_layer_id != vps->vps_max_layer_id) { + + mpp_log("vps_max_layer_id diff\n"); + return -1; + } + + if (openhevc_vps->vps_num_layer_sets != vps->vps_num_layer_sets) { + + mpp_log("vps_num_layer_sets diff\n"); + return -1; + } + if (openhevc_vps->vps_timing_info_present_flag != + vps->vps_timing_info_present_flag) { + + mpp_log("vps_timing_info_present_flag diff\n"); + return -1; + } + if (openhevc_vps->vps_num_units_in_tick != + vps->vps_num_units_in_tick) { + mpp_log("vps_num_units_in_tick diff\n"); + return -1; + } + + if ( openhevc_vps->vps_time_scale != + vps->vps_time_scale) { + mpp_log("vps_time_scale diff\n"); + return -1; + } + if (openhevc_vps->vps_poc_proportional_to_timing_flag != + vps->vps_poc_proportional_to_timing_flag) { + mpp_log("vps_poc_proportional_to_timing_flag \n"); + return -1; + } + if (openhevc_vps->vps_num_ticks_poc_diff_one != + openhevc_vps->vps_num_ticks_poc_diff_one) { + mpp_log("vps_poc_proportional_to_timing_flag \n"); + return -1; + } + + if (openhevc_vps->vps_num_hrd_parameters + != vps->vps_num_hrd_parameters) { + mpp_log("vps_num_hrd_parameters \n"); + return -1; + } + return 0; +} + +static RK_S32 compare_sps(HEVCSPS *openhevc_sps, HEVCSPS *sps) +{ + if (openhevc_sps->vps_id != sps->vps_id) { + mpp_log("vps_id diff\n"); + return -1; + } + if (openhevc_sps->sps_id != sps->sps_id) { + mpp_log("sps_id diff\n"); + return -1; + } + if (openhevc_sps->chroma_format_idc != sps->chroma_format_idc) { + mpp_log("chroma_format_idc diff\n"); + return -1; + } + if (openhevc_sps->separate_colour_plane_flag + != sps->separate_colour_plane_flag) { + mpp_log("separate_colour_plane_flag diff\n"); + return -1; + } + + if (openhevc_sps->output_width != sps->output_width) { + mpp_log("output_width diff\n"); + return -1; + } + if (openhevc_sps->output_height != sps->output_height) { + mpp_log("output_height diff\n"); + return -1; + } + + if (openhevc_sps->bit_depth != sps->bit_depth) { + mpp_log("bit_depth diff\n"); + return -1; + } + if (openhevc_sps->bit_depth_chroma != sps->bit_depth_chroma) { + mpp_log("bit_depth_chroma diff\n"); + return -1; + } + if (openhevc_sps->pixel_shift != sps->pixel_shift) { + mpp_log("pixel_shift diff\n"); + return -1; + } + // openhevc_sps->pix_fmt; + + if (openhevc_sps->log2_max_poc_lsb != sps->log2_max_poc_lsb) { + mpp_log("log2_max_poc_lsb diff\n"); + return -1; + } + if (openhevc_sps->pcm_enabled_flag != sps->pcm_enabled_flag) { + mpp_log("pcm_enabled_flag diff\n"); + return -1; + } + + if (openhevc_sps->max_sub_layers != sps->max_sub_layers) { + mpp_log("max_sub_layers diff\n"); + return -1; + } + + if (openhevc_sps->scaling_list_enable_flag != sps->scaling_list_enable_flag) { + mpp_log("scaling_list_enable_flag diff\n"); + return -1; + } + + if (openhevc_sps->nb_st_rps != sps->nb_st_rps) { + mpp_log("nb_st_rps diff\n"); + return -1; + } + + if (openhevc_sps->amp_enabled_flag != sps->amp_enabled_flag) { + mpp_log(" amp_enabled_flag diff openhevc %d != %d\n", openhevc_sps->amp_enabled_flag, sps->amp_enabled_flag); + return -1; + } + if (openhevc_sps->sao_enabled != sps->sao_enabled) { + mpp_log("sao_enabled diff\n"); + return -1; + } + + if (openhevc_sps->long_term_ref_pics_present_flag + != sps->long_term_ref_pics_present_flag) { + mpp_log("long_term_ref_pics_present_flag diff\n"); + return -1; + } + if (openhevc_sps->num_long_term_ref_pics_sps != + sps->num_long_term_ref_pics_sps) { + mpp_log("num_long_term_ref_pics_sps diff\n"); + return -1; + } + + if (openhevc_sps->sps_temporal_mvp_enabled_flag != + sps->sps_temporal_mvp_enabled_flag) { + mpp_log("sps_temporal_mvp_enabled_flag diff\n"); + return -1; + } + if (openhevc_sps->sps_strong_intra_smoothing_enable_flag != + sps->sps_strong_intra_smoothing_enable_flag) { + mpp_log("sps_strong_intra_smoothing_enable_flag diff\n"); + return -1; + } + + if (openhevc_sps->log2_min_cb_size != sps->log2_min_cb_size) { + mpp_log("log2_min_cb_size diff\n"); + return -1; + } + if (openhevc_sps->log2_diff_max_min_coding_block_size != + sps->log2_diff_max_min_coding_block_size) { + mpp_log("log2_diff_max_min_coding_block_size diff\n"); + return -1; + } + if (openhevc_sps->log2_min_tb_size != sps->log2_min_tb_size) { + mpp_log("log2_min_tb_size diff\n"); + return -1; + } + if (openhevc_sps->log2_max_trafo_size != sps->log2_max_trafo_size) { + mpp_log("log2_max_trafo_size diff\n"); + return -1; + } + if (openhevc_sps->log2_ctb_size != sps->log2_ctb_size) { + mpp_log("log2_ctb_size diff\n"); + return -1; + } + if (openhevc_sps->log2_min_pu_size != sps->log2_min_pu_size) { + mpp_log("log2_min_pu_size diff\n"); + return -1; + } + + if (openhevc_sps->max_transform_hierarchy_depth_inter != + sps->max_transform_hierarchy_depth_inter) { + mpp_log("max_transform_hierarchy_depth_inter diff\n"); + return -1; + } + if (openhevc_sps->max_transform_hierarchy_depth_intra != + sps->max_transform_hierarchy_depth_intra) { + mpp_log("max_transform_hierarchy_depth_intra diff\n"); + return -1; + } + + if (openhevc_sps->width != sps->width) { + mpp_log("width diff\n"); + return -1; + } + + if (openhevc_sps->height != sps->height) { + mpp_log("height diff\n"); + return -1; + } + + if (openhevc_sps->ctb_width != sps->ctb_width) { + mpp_log("ctb_width diff\n"); + return -1; + } + + if ( openhevc_sps->ctb_height != sps->ctb_height) { + mpp_log("ctb_height diff\n"); + return -1; + } + + if (openhevc_sps->ctb_size != sps->ctb_size) { + mpp_log("ctb_size diff\n"); + return -1; + } + + if (openhevc_sps->min_cb_width != sps->min_cb_width) { + mpp_log("min_cb_width diff\n"); + return -1; + } + + if (openhevc_sps->min_cb_height != sps->min_cb_height) { + mpp_log("min_cb_height diff\n"); + return -1; + } + + if (openhevc_sps->min_tb_width != sps->min_tb_width) { + mpp_log("min_tb_width diff\n"); + return -1; + } + + if (openhevc_sps->min_tb_height != sps->min_tb_height) { + mpp_log("min_tb_height diff\n"); + return -1; + } + + if (openhevc_sps->min_pu_width != sps->min_pu_width) { + mpp_log("min_pu_width diff\n"); + return -1; + } + + if (openhevc_sps->min_pu_height != sps->min_pu_height) { + mpp_log("min_pu_height diff\n"); + return -1; + } + + if (openhevc_sps->qp_bd_offset != sps->qp_bd_offset) { + mpp_log("qp_bd_offset diff \n"); + return -1; + } + return 0; +} + +static RK_S32 compare_pps(HEVCPPS *openhevc_pps, HEVCPPS *pps) +{ + + if (openhevc_pps->sps_id != pps->sps_id) { + mpp_log("sps_id diff \n"); + return -1; + } + + if (openhevc_pps->pps_id != pps->pps_id) { + mpp_log("pps_id diff \n"); + return -1; + } + + if (openhevc_pps->sign_data_hiding_flag != pps->sign_data_hiding_flag) { + mpp_log("sign_data_hiding_flag diff \n"); + return -1; + } + + if (openhevc_pps->cabac_init_present_flag != pps->cabac_init_present_flag) { + mpp_log("cabac_init_present_flag diff \n"); + return -1; + } + + if (openhevc_pps->num_ref_idx_l0_default_active != pps->num_ref_idx_l0_default_active) { + mpp_log("num_ref_idx_l0_default_active diff \n"); + return -1; + } + if (openhevc_pps->num_ref_idx_l1_default_active != pps->num_ref_idx_l1_default_active) { + mpp_log("num_ref_idx_l1_default_active diff \n"); + return -1; + } + if (openhevc_pps->pic_init_qp_minus26 != pps->pic_init_qp_minus26) { + mpp_log("pic_init_qp_minus26 diff \n"); + return -1; + } + + if (openhevc_pps->constrained_intra_pred_flag != pps->constrained_intra_pred_flag) { + mpp_log("constrained_intra_pred_flag diff \n"); + return -1; + } + if (openhevc_pps->transform_skip_enabled_flag != pps->transform_skip_enabled_flag) { + mpp_log("transform_skip_enabled_flag diff \n"); + return -1; + } + + if (openhevc_pps->cu_qp_delta_enabled_flag != pps->cu_qp_delta_enabled_flag) { + mpp_log("cu_qp_delta_enabled_flag diff \n"); + return -1; + } + if (openhevc_pps->diff_cu_qp_delta_depth != pps->diff_cu_qp_delta_depth) { + mpp_log("diff_cu_qp_delta_depth diff \n"); + return -1; + } + + if (openhevc_pps->cb_qp_offset != pps->cb_qp_offset) { + mpp_log("cb_qp_offset diff \n"); + return -1; + } + + if (openhevc_pps->cr_qp_offset != pps->cr_qp_offset) { + mpp_log("cr_qp_offset diff \n"); + return -1; + } + + if (openhevc_pps->pic_slice_level_chroma_qp_offsets_present_flag != + pps->pic_slice_level_chroma_qp_offsets_present_flag) { + mpp_log("pic_slice_level_chroma_qp_offsets_present_flag diff \n"); + return -1; + } + if (openhevc_pps->weighted_pred_flag != pps->weighted_pred_flag) { + mpp_log("weighted_pred_flag diff \n"); + return -1; + } + if (openhevc_pps->weighted_bipred_flag != pps->weighted_bipred_flag) { + mpp_log("weighted_bipred_flag diff \n"); + return -1; + } + if (openhevc_pps->output_flag_present_flag != pps->output_flag_present_flag) { + mpp_log("output_flag_present_flag diff \n"); + return -1; + } + if (openhevc_pps->transquant_bypass_enable_flag != + pps->transquant_bypass_enable_flag) { + mpp_log("transquant_bypass_enable_flag diff \n"); + return -1; + } + + if (openhevc_pps->dependent_slice_segments_enabled_flag != + pps->dependent_slice_segments_enabled_flag) { + mpp_log("dependent_slice_segments_enabled_flag diff \n"); + return -1; + } + if (openhevc_pps->tiles_enabled_flag != pps->tiles_enabled_flag) { + mpp_log("tiles_enabled_flag diff \n"); + return -1; + } + if (openhevc_pps->entropy_coding_sync_enabled_flag != + pps->entropy_coding_sync_enabled_flag) { + mpp_log("entropy_coding_sync_enabled_flag diff \n"); + return -1; + } + + if (openhevc_pps->num_tile_columns != pps->num_tile_columns) { + mpp_log("num_tile_columns diff \n"); + return -1; + } + if (openhevc_pps->num_tile_rows != pps->num_tile_rows) { + mpp_log("num_tile_rows diff \n"); + return -1; + } + if (openhevc_pps->uniform_spacing_flag != pps->uniform_spacing_flag) { + mpp_log("qp_bd_offset diff \n"); + return -1; + } + if (openhevc_pps->loop_filter_across_tiles_enabled_flag != + pps->loop_filter_across_tiles_enabled_flag) { + mpp_log("loop_filter_across_tiles_enabled_flag diff \n"); + return -1; + } + + if (openhevc_pps->seq_loop_filter_across_slices_enabled_flag != + pps->seq_loop_filter_across_slices_enabled_flag) { + mpp_log("seq_loop_filter_across_slices_enabled_flag diff \n"); + return -1; + } + + if (openhevc_pps->deblocking_filter_control_present_flag != + pps->deblocking_filter_control_present_flag) { + mpp_log("deblocking_filter_control_present_flag diff \n"); + return -1; + } + if (openhevc_pps->deblocking_filter_override_enabled_flag != + pps->deblocking_filter_override_enabled_flag) { + mpp_log("deblocking_filter_override_enabled_flag diff \n"); + return -1; + } + if (openhevc_pps->disable_dbf != pps->disable_dbf) { + mpp_log("disable_dbf diff \n"); + return -1; + } + if (openhevc_pps->beta_offset != pps->beta_offset) { + mpp_log("beta_offset diff \n"); + return -1; + } + if (openhevc_pps->tc_offset != pps->tc_offset) { + mpp_log("tc_offset diff \n"); + return -1; + } + + if (openhevc_pps->scaling_list_data_present_flag != + pps->scaling_list_data_present_flag) { + mpp_log("scaling_list_data_present_flag diff \n"); + return -1; + } + + if (openhevc_pps->lists_modification_present_flag != + pps->lists_modification_present_flag) { + mpp_log("lists_modification_present_flag diff \n"); + return -1; + } + if (openhevc_pps->log2_parallel_merge_level != pps->log2_parallel_merge_level) { + mpp_log("log2_parallel_merge_level diff \n"); + return -1; + } + if (openhevc_pps->num_extra_slice_header_bits != + pps->num_extra_slice_header_bits) { + mpp_log("num_extra_slice_header_bits diff \n"); + return -1; + } +#if 0 + if (openhevc_pps->slice_header_extension_present_flag != + pps->slice_header_extension_present_flag) { + mpp_log("slice_header_extension_present_flag diff \n"); + return -1; + } + + if (openhevc_pps->pps_extension_flag != pps->pps_extension_flag) { + mpp_log("pps_extension_flag diff \n"); + return -1; + } + if (openhevc_pps->pps_extension_data_flag != pps->pps_extension_data_flag) { + mpp_log("pps_extension_data_flag diff \n"); + return -1; + } +#endif + return 0; + +} + + + +int mpp_hevc_decode_nal_vps(HEVCContext *s) +{ + RK_S32 i, j; + GetBitCxt_t *gb = &s->HEVClc->gb; + RK_S32 vps_id = 0; + HEVCVPS *vps = NULL; + RK_U8 *vps_buf = mpp_calloc(RK_U8, sizeof(HEVCVPS)); + RK_S32 value = 0; + + if (!vps_buf) + return MPP_ERR_NOMEM; + vps = (HEVCVPS*)vps_buf; + + h265d_dbg(H265D_DBG_FUNCTION, "Decoding VPS\n"); + + READ_BITS(gb, 4, &vps_id); + + mpp_log("vps_id = 0x%x", vps_id); + + if (vps_id >= MAX_VPS_COUNT) { + mpp_err( "VPS id out of range: %d\n", vps_id); + goto err; + } + READ_BITS(gb, 2, &value); + if (value != 3) { // vps_reserved_three_2bits + mpp_err( "vps_reserved_three_2bits is not three\n"); + goto err; + } + + READ_BITS(gb, 6, &vps->vps_max_layers); + vps->vps_max_layers = vps->vps_max_layers + 1; + + READ_BITS(gb, 3, &vps->vps_max_sub_layers); + vps->vps_max_sub_layers = vps->vps_max_sub_layers + 1; + + READ_BIT1(gb, & vps->vps_temporal_id_nesting_flag); + READ_BITS(gb, 16, &value); + + if (value != 0xffff) { // vps_reserved_ffff_16bits + mpp_err( "vps_reserved_ffff_16bits is not 0xffff\n"); + goto err; + } + + if (vps->vps_max_sub_layers > MAX_SUB_LAYERS) { + mpp_err( "vps_max_sub_layers out of range: %d\n", + vps->vps_max_sub_layers); + goto err; + } + + parse_ptl(s, &vps->ptl, vps->vps_max_sub_layers); + + READ_BIT1(gb, &vps->vps_sub_layer_ordering_info_present_flag); + + i = vps->vps_sub_layer_ordering_info_present_flag ? 0 : vps->vps_max_sub_layers - 1; + for (; i < vps->vps_max_sub_layers; i++) { + READ_UE(gb, &vps->vps_max_dec_pic_buffering[i]); + vps->vps_max_dec_pic_buffering[i] = vps->vps_max_dec_pic_buffering[i] + 1; + READ_UE(gb, &vps->vps_num_reorder_pics[i]); + READ_UE(gb, &vps->vps_max_latency_increase[i]); + vps->vps_max_latency_increase[i] = vps->vps_max_latency_increase[i] - 1; + + if (vps->vps_max_dec_pic_buffering[i] > MAX_DPB_SIZE) { + mpp_err( "vps_max_dec_pic_buffering_minus1 out of range: %d\n", + vps->vps_max_dec_pic_buffering[i] - 1); + goto err; + } + if (vps->vps_num_reorder_pics[i] > vps->vps_max_dec_pic_buffering[i] - 1) { + mpp_err( "vps_max_num_reorder_pics out of range: %d\n", + vps->vps_num_reorder_pics[i]); + goto err; + } + } + + READ_BITS(gb, 6, &vps->vps_max_layer_id); + READ_UE(gb, &vps->vps_num_layer_sets); + vps->vps_num_layer_sets += 1; + for (i = 1; i < vps->vps_num_layer_sets; i++) + for (j = 0; j <= vps->vps_max_layer_id; j++) + READ_SKIPBITS(gb, 1); // layer_id_included_flag[i][j] + + READ_BIT1(gb, &vps->vps_timing_info_present_flag); + if (vps->vps_timing_info_present_flag) { + mpp_ReadLongBits(gb, 32, &vps->vps_num_units_in_tick); + mpp_ReadLongBits(gb, 32, &vps->vps_time_scale); + READ_BIT1(gb, &vps->vps_poc_proportional_to_timing_flag); + if (vps->vps_poc_proportional_to_timing_flag) { + READ_UE(gb, &vps->vps_num_ticks_poc_diff_one); + vps->vps_num_ticks_poc_diff_one += 1; + } + READ_UE(gb, &vps->vps_num_hrd_parameters); + for (i = 0; i < vps->vps_num_hrd_parameters; i++) { + RK_S32 common_inf_present = 1; + RK_S32 hrd_layer_set_idx = 0; + + READ_UE(gb, &hrd_layer_set_idx); // hrd_layer_set_idx + if (i) + READ_BIT1(gb, &common_inf_present); + decode_hrd(s, common_inf_present, vps->vps_max_sub_layers); + } + } + + // READ_BIT1(gb, &vps->vps_extension_flag); + +#ifdef VPS_EXTENSION + if (vps->vps_extension_flag) { // vps_extension_flag + parse_vps_extension(s, vps); + } +#endif + if (s->h265dctx->compare_info != NULL) { + CurrentFameInf_t *info = (CurrentFameInf_t *)s->h265dctx->compare_info; + HEVCVPS *openhevc_vps = (HEVCVPS*)&info->vps[vps_id]; + mpp_log("compare_vps in \n"); + if (compare_vps(openhevc_vps, (HEVCVPS*)vps_buf) < 0) { + mpp_err("compare_vps return error \n"); + mpp_assert(0); + return -1; + } + mpp_log("compare_vps ok \n"); + } + + if (s->vps_list[vps_id] && + !memcmp(s->vps_list[vps_id], vps_buf, sizeof(HEVCVPS))) { + mpp_free(vps_buf); + } else { + if (s->vps_list[vps_id] != NULL) { + mpp_free(s->vps_list[vps_id]); + } + s->vps_list[vps_id] = vps_buf; + } + + return 0; + +err: + mpp_free(vps_buf); + return MPP_ERR_STREAM; +} + + +static RK_S32 decode_vui(HEVCContext *s, HEVCSPS *sps) +{ + VUI *vui = &sps->vui; + GetBitCxt_t *gb = &s->HEVClc->gb; + RK_S32 sar_present; + + h265d_dbg(H265D_DBG_FUNCTION, "Decoding VUI\n"); + + READ_BIT1(gb, &sar_present); + if (sar_present) { + RK_U8 sar_idx = 0; + READ_BITS(gb, 8, &sar_idx); + if (sar_idx < MPP_ARRAY_ELEMS(vui_sar)) + vui->sar = vui_sar[sar_idx]; + else if (sar_idx == 255) { + READ_BITS(gb, 16, &vui->sar.num); + READ_BITS(gb, 16, &vui->sar.den); + } else + mpp_log("Unknown SAR index: %u.\n", sar_idx); + } + + READ_BIT1(gb, &vui->overscan_info_present_flag); + if (vui->overscan_info_present_flag) + READ_BIT1(gb, &vui->overscan_appropriate_flag); + + READ_BIT1(gb, &vui->video_signal_type_present_flag); + if (vui->video_signal_type_present_flag) { + READ_BITS(gb, 3, & vui->video_format); + READ_BIT1(gb, &vui->video_full_range_flag); + READ_BIT1(gb, &vui->colour_description_present_flag); + + if (vui->colour_description_present_flag) { + READ_BITS(gb, 8, &vui->colour_primaries); + READ_BITS(gb, 8, &vui->transfer_characteristic); + READ_BITS(gb, 8, &vui->matrix_coeffs); + + // Set invalid values to "unspecified" + // if (vui->colour_primaries >= RKCOL_PRI_NB) + // vui->colour_primaries = RKCOL_PRI_UNSPECIFIED; + // if (vui->transfer_characteristic >= RKCOL_TRC_NB) + // vui->transfer_characteristic = RKCOL_TRC_UNSPECIFIED; + if (vui->matrix_coeffs >= MPPCOL_SPC_NB) + vui->matrix_coeffs = MPPCOL_SPC_UNSPECIFIED; + } + } + + READ_BIT1(gb, &vui->chroma_loc_info_present_flag ); + if (vui->chroma_loc_info_present_flag) { + READ_UE(gb, &vui->chroma_sample_loc_type_top_field); + READ_UE(gb, &vui->chroma_sample_loc_type_bottom_field); + } + + READ_BIT1(gb, &vui->neutra_chroma_indication_flag); + READ_BIT1(gb, &vui->field_seq_flag); + READ_BIT1(gb, &vui->frame_field_info_present_flag); + + READ_BIT1(gb, &vui->default_display_window_flag); + if (vui->default_display_window_flag) { + //TODO: * 2 is only valid for 420 + READ_UE(gb, &vui->def_disp_win.left_offset); + vui->def_disp_win.left_offset = vui->def_disp_win.left_offset * 2; + + READ_UE(gb, &vui->def_disp_win.right_offset); + vui->def_disp_win.right_offset = vui->def_disp_win.right_offset * 2; + + READ_UE(gb, &vui->def_disp_win.right_offset); + vui->def_disp_win.top_offset = vui->def_disp_win.top_offset * 2; + + READ_UE(gb, &vui->def_disp_win.right_offset); + vui->def_disp_win.bottom_offset = vui->def_disp_win.bottom_offset * 2; + +#if 0 + if (s->apply_defdispwin && + s->h265dctx->flags2 & CODEC_FLAG2_IGNORE_CROP) { + h265d_dbg(H265D_DBG_SPS, + "discarding vui default display window, " + "original values are l:%u r:%u t:%u b:%u\n", + vui->def_disp_win.left_offset, + vui->def_disp_win.right_offset, + vui->def_disp_win.top_offset, + vui->def_disp_win.bottom_offset); + + vui->def_disp_win.left_offset = + vui->def_disp_win.right_offset = + vui->def_disp_win.top_offset = + vui->def_disp_win.bottom_offset = 0; + } +#endif + } + + READ_BIT1(gb, &vui->vui_timing_info_present_flag); + + if (vui->vui_timing_info_present_flag) { + mpp_ReadLongBits(gb, 32, &vui->vui_num_units_in_tick); + mpp_ReadLongBits(gb, 32, &vui->vui_time_scale); + READ_BIT1(gb, &vui->vui_poc_proportional_to_timing_flag); + if (vui->vui_poc_proportional_to_timing_flag) + READ_UE(gb, &vui->vui_num_ticks_poc_diff_one_minus1); + READ_BIT1(gb, &vui->vui_hrd_parameters_present_flag); + if (vui->vui_hrd_parameters_present_flag) + decode_hrd(s, 1, sps->max_sub_layers); + } + + READ_BIT1(gb, &vui->bitstream_restriction_flag); + if (vui->bitstream_restriction_flag) { + READ_BIT1(gb, &vui->tiles_fixed_structure_flag); + READ_BIT1(gb, &vui->motion_vectors_over_pic_boundaries_flag); + READ_BIT1(gb, &vui->restricted_ref_pic_lists_flag); + READ_UE(gb, &vui->min_spatial_segmentation_idc); + READ_UE(gb, &vui->max_bytes_per_pic_denom); + READ_UE(gb, &vui->max_bits_per_min_cu_denom); + READ_UE(gb, &vui->log2_max_mv_length_horizontal); + READ_UE(gb, &vui->log2_max_mv_length_vertical); + } + return 0; +} + +/*static */void set_default_scaling_list_data(ScalingList *sl)///<- zrh remove "static" +{ + int matrixId; + + for (matrixId = 0; matrixId < 6; matrixId++) { + // 4x4 default is 16 + memset(sl->sl[0][matrixId], 16, 16); + sl->sl_dc[0][matrixId] = 16; // default for 16x16 + sl->sl_dc[1][matrixId] = 16; // default for 32x32 + } + memcpy(sl->sl[1][0], default_scaling_list_intra, 64); + memcpy(sl->sl[1][1], default_scaling_list_intra, 64); + memcpy(sl->sl[1][2], default_scaling_list_intra, 64); + memcpy(sl->sl[1][3], default_scaling_list_inter, 64); + memcpy(sl->sl[1][4], default_scaling_list_inter, 64); + memcpy(sl->sl[1][5], default_scaling_list_inter, 64); + memcpy(sl->sl[2][0], default_scaling_list_intra, 64); + memcpy(sl->sl[2][1], default_scaling_list_intra, 64); + memcpy(sl->sl[2][2], default_scaling_list_intra, 64); + memcpy(sl->sl[2][3], default_scaling_list_inter, 64); + memcpy(sl->sl[2][4], default_scaling_list_inter, 64); + memcpy(sl->sl[2][5], default_scaling_list_inter, 64); + memcpy(sl->sl[3][0], default_scaling_list_intra, 64); + memcpy(sl->sl[3][1], default_scaling_list_inter, 64); +} + +static int scaling_list_data(HEVCContext *s, ScalingList *sl) +{ + GetBitCxt_t *gb = &s->HEVClc->gb; + RK_U8 scaling_list_pred_mode_flag[4][6]; + RK_S32 scaling_list_dc_coef[2][6]; + RK_S32 size_id, i, pos; + RK_U32 matrix_id; + + for (size_id = 0; size_id < 4; size_id++) + for (matrix_id = 0; matrix_id < (size_id == 3 ? 2 : 6); matrix_id++) { + READ_BIT1(gb, &scaling_list_pred_mode_flag[size_id][matrix_id]); + if (!scaling_list_pred_mode_flag[size_id][matrix_id]) { + RK_U32 delta = 0; + READ_UE(gb, &delta); + /* Only need to handle non-zero delta. Zero means default, + * which should already be in the arrays. */ + if (delta) { + // Copy from previous array. + if (matrix_id < delta) { + mpp_err( + "Invalid delta in scaling list data: %d.\n", delta); + return MPP_ERR_STREAM; + } + + memcpy(sl->sl[size_id][matrix_id], + sl->sl[size_id][matrix_id - delta], + size_id > 0 ? 64 : 16); + if (size_id > 1) + sl->sl_dc[size_id - 2][matrix_id] = sl->sl_dc[size_id - 2][matrix_id - delta]; + } + } else { + RK_S32 next_coef, coef_num; + RK_S32 scaling_list_delta_coef; + + next_coef = 8; + coef_num = MPP_MIN(64, 1 << (4 + (size_id << 1))); + if (size_id > 1) { + READ_SE(gb, &scaling_list_dc_coef[size_id - 2][matrix_id]); + scaling_list_dc_coef[size_id - 2][matrix_id] = scaling_list_dc_coef[size_id - 2][matrix_id] + 8; + next_coef = scaling_list_dc_coef[size_id - 2][matrix_id]; + sl->sl_dc[size_id - 2][matrix_id] = next_coef; + } + for (i = 0; i < coef_num; i++) { + if (size_id == 0) + pos = 4 * mpp_hevc_diag_scan4x4_y[i] + + mpp_hevc_diag_scan4x4_x[i]; + else + pos = 8 * mpp_hevc_diag_scan8x8_y[i] + + mpp_hevc_diag_scan8x8_x[i]; + + READ_SE(gb, &scaling_list_delta_coef); + next_coef = (next_coef + scaling_list_delta_coef + 256) % 256; + sl->sl[size_id][matrix_id][pos] = next_coef; + } + } + } + + return 0; +} + +RK_S32 mpp_hevc_decode_nal_sps(HEVCContext *s) +{ + // const AVPixFmtDescriptor *desc; + GetBitCxt_t *gb = &s->HEVClc->gb; + RK_S32 ret = 0; + RK_S32 sps_id = 0; + RK_S32 log2_diff_max_min_transform_block_size; + RK_S32 bit_depth_chroma, start, vui_present, sublayer_ordering_info; + RK_S32 i; + RK_S32 value = 0; + + HEVCSPS *sps; + RK_U8 *sps_buf = mpp_calloc(RK_U8, sizeof(*sps)); + + if (!sps_buf) + return MPP_ERR_NOMEM; + sps = (HEVCSPS*)sps_buf; + + h265d_dbg(H265D_DBG_FUNCTION, "Decoding SPS\n"); + + // Coded parameters + + READ_BITS(gb, 4, &sps->vps_id); + if (sps->vps_id >= MAX_VPS_COUNT) { + mpp_err( "VPS id out of range: %d\n", sps->vps_id); + ret = MPP_ERR_STREAM; + goto err; + } + + if (!s->vps_list[sps->vps_id]) { + mpp_err( "VPS %d does not exist\n", + sps->vps_id); + ret = MPP_ERR_STREAM; + goto err; + } + + READ_BITS(gb, 3, &sps->max_sub_layers); + sps->max_sub_layers += 1; + + if (sps->max_sub_layers > MAX_SUB_LAYERS) { + mpp_err( "sps_max_sub_layers out of range: %d\n", + sps->max_sub_layers); + ret = MPP_ERR_STREAM; + goto err; + } + + READ_SKIPBITS(gb, 1); // temporal_id_nesting_flag + + parse_ptl(s, &sps->ptl, sps->max_sub_layers); + + READ_UE(gb, &sps_id); + sps->sps_id = sps_id;///<- zrh add + if (sps_id >= MAX_SPS_COUNT) { + mpp_err( "SPS id out of range: %d\n", sps_id); + ret = MPP_ERR_STREAM; + goto err; + } + + READ_UE(gb, &sps->chroma_format_idc); + if (sps->chroma_format_idc != 1) { + mpp_err("chroma_format_idc != 1\n"); + ret = MPP_ERR_PROTOL; + goto err; + } + + if (sps->chroma_format_idc == 3) + READ_BIT1(gb, &sps->separate_colour_plane_flag); + + READ_UE(gb, &sps->width); + READ_UE(gb, &sps->height); +#if 0 + if ((ret = av_image_check_size(sps->width, + sps->height, 0, s->h265dctx)) < 0) + goto err; +#endif + + READ_BIT1(gb, &value); + + if (value) { // pic_conformance_flag + //TODO: * 2 is only valid for 420 + READ_UE(gb, &sps->pic_conf_win.left_offset); + sps->pic_conf_win.left_offset = sps->pic_conf_win.left_offset * 2; + READ_UE(gb, &sps->pic_conf_win.right_offset); + sps->pic_conf_win.right_offset = sps->pic_conf_win.right_offset * 2; + READ_UE(gb, &sps->pic_conf_win.top_offset); + sps->pic_conf_win.top_offset = sps->pic_conf_win.top_offset * 2; + READ_UE(gb, &sps->pic_conf_win.bottom_offset); + sps->pic_conf_win.bottom_offset = sps->pic_conf_win.bottom_offset * 2; +#if 0 + if (s->h265dctx->flags2 & CODEC_FLAG2_IGNORE_CROP) { + h265d_dbg(H265D_DBG_SPS, + "discarding sps conformance window, " + "original values are l:%u r:%u t:%u b:%u\n", + sps->pic_conf_win.left_offset, + sps->pic_conf_win.right_offset, + sps->pic_conf_win.top_offset, + sps->pic_conf_win.bottom_offset); + + sps->pic_conf_win.left_offset = + sps->pic_conf_win.right_offset = + sps->pic_conf_win.top_offset = + sps->pic_conf_win.bottom_offset = 0; + } + +#endif + sps->output_window = sps->pic_conf_win; + } + + READ_UE(gb, &sps->bit_depth); + + sps->bit_depth = sps->bit_depth + 8; + READ_UE(gb, &bit_depth_chroma); + bit_depth_chroma = bit_depth_chroma + 8; + sps->bit_depth_chroma = bit_depth_chroma;///<- zrh add + if (bit_depth_chroma != sps->bit_depth) { + mpp_err( + "Luma bit depth (%d) is different from chroma bit depth (%d), " + "this is unsupported.\n", + sps->bit_depth, bit_depth_chroma); + ret = MPP_ERR_STREAM; + goto err; + } + + if (sps->chroma_format_idc == 1) { + switch (sps->bit_depth) { + case 8: sps->pix_fmt = VPU_OUTPUT_FORMAT_YUV420_SEMIPLANAR | VPU_OUTPUT_FORMAT_BIT_8; break; + case 10: sps->pix_fmt = VPU_OUTPUT_FORMAT_YUV420_SEMIPLANAR | VPU_OUTPUT_FORMAT_BIT_10; break; + default: + mpp_err( "Unsupported bit depth: %d\n", + sps->bit_depth); + ret = MPP_ERR_PROTOL; + goto err; + } + } else { + mpp_err( + "non-4:2:0 support is currently unspecified.\n"); + return MPP_ERR_PROTOL; + } +#if 0 + desc = av_pix_fmt_desc_get(sps->pix_fmt); + if (!desc) { + goto err; + } + + sps->hshift[0] = sps->vshift[0] = 0; + sps->hshift[2] = sps->hshift[1] = desc->log2_chroma_w; + sps->vshift[2] = sps->vshift[1] = desc->log2_chroma_h; +#endif + sps->pixel_shift = sps->bit_depth > 8; + + READ_UE(gb, &sps->log2_max_poc_lsb); + sps->log2_max_poc_lsb += 4; + if (sps->log2_max_poc_lsb > 16) { + mpp_err( "log2_max_pic_order_cnt_lsb_minus4 out range: %d\n", + sps->log2_max_poc_lsb - 4); + ret = MPP_ERR_STREAM; + goto err; + } + + READ_BIT1(gb, &sublayer_ordering_info); + + start = sublayer_ordering_info ? 0 : sps->max_sub_layers - 1; + for (i = start; i < sps->max_sub_layers; i++) { + READ_UE(gb, &sps->temporal_layer[i].max_dec_pic_buffering) ; + sps->temporal_layer[i].max_dec_pic_buffering += 1; + READ_UE(gb, &sps->temporal_layer[i].num_reorder_pics); + READ_UE(gb, &sps->temporal_layer[i].max_latency_increase ); + sps->temporal_layer[i].max_latency_increase -= 1; + if (sps->temporal_layer[i].max_dec_pic_buffering > MAX_DPB_SIZE) { + mpp_err( "sps_max_dec_pic_buffering_minus1 out of range: %d\n", + sps->temporal_layer[i].max_dec_pic_buffering - 1); + ret = MPP_ERR_STREAM; + goto err; + } + if (sps->temporal_layer[i].num_reorder_pics > sps->temporal_layer[i].max_dec_pic_buffering - 1) { + mpp_err( "sps_max_num_reorder_pics out of range: %d\n", + sps->temporal_layer[i].num_reorder_pics); + if (sps->temporal_layer[i].num_reorder_pics > MAX_DPB_SIZE - 1) { + ret = MPP_ERR_STREAM; + goto err; + } + sps->temporal_layer[i].max_dec_pic_buffering = sps->temporal_layer[i].num_reorder_pics + 1; + } + } + + if (!sublayer_ordering_info) { + for (i = 0; i < start; i++) { + sps->temporal_layer[i].max_dec_pic_buffering = sps->temporal_layer[start].max_dec_pic_buffering; + sps->temporal_layer[i].num_reorder_pics = sps->temporal_layer[start].num_reorder_pics; + sps->temporal_layer[i].max_latency_increase = sps->temporal_layer[start].max_latency_increase; + } + } + + READ_UE(gb, &sps->log2_min_cb_size) ; + sps->log2_min_cb_size += 3; + READ_UE(gb, &sps->log2_diff_max_min_coding_block_size); + READ_UE(gb, &sps->log2_min_tb_size); + sps->log2_min_tb_size += 2; + READ_UE(gb, &log2_diff_max_min_transform_block_size); + sps->log2_max_trafo_size = log2_diff_max_min_transform_block_size + + sps->log2_min_tb_size; + + if (sps->log2_min_tb_size >= sps->log2_min_cb_size) { + mpp_err( "Invalid value for log2_min_tb_size"); + ret = MPP_ERR_STREAM; + goto err; + } + READ_UE(gb, &sps->max_transform_hierarchy_depth_inter); + READ_UE(gb, &sps->max_transform_hierarchy_depth_intra); + + + READ_BIT1(gb, &sps->scaling_list_enable_flag ); + + if (sps->scaling_list_enable_flag) { + value = 0; + set_default_scaling_list_data(&sps->scaling_list); + READ_BIT1(gb, &value); + if (value) { + ret = scaling_list_data(s, &sps->scaling_list); + if (ret < 0) + goto err; + } + + s->scaling_list_listen[sps_id] = 1; + } + READ_BIT1(gb, &sps->amp_enabled_flag); + READ_BIT1(gb, &sps->sao_enabled); + READ_BIT1(gb, &sps->pcm_enabled_flag); + + mpp_err("sps->amp_enabled_flag = %d", sps->amp_enabled_flag); + mpp_err("sps->sao_enabled = %d", sps->sao_enabled); + mpp_err("sps->pcm_enabled_flag = %d", sps->pcm_enabled_flag); + + if (sps->pcm_enabled_flag) { + READ_BITS(gb, 4, &sps->pcm.bit_depth); + sps->pcm.bit_depth += 1; + READ_BITS(gb, 4, &sps->pcm.bit_depth_chroma); + sps->pcm.bit_depth_chroma += 1; + READ_UE(gb, &sps->pcm.log2_min_pcm_cb_size ); + sps->pcm.log2_min_pcm_cb_size += 3; + READ_UE(gb, &value); + sps->pcm.log2_max_pcm_cb_size = sps->pcm.log2_min_pcm_cb_size + value; + + if (sps->pcm.bit_depth > sps->bit_depth) { + mpp_err( + "PCM bit depth (%d) is greater than normal bit depth (%d)\n", + sps->pcm.bit_depth, sps->bit_depth); + ret = MPP_ERR_STREAM; + goto err; + } + READ_BIT1(gb, &sps->pcm.loop_filter_disable_flag); + } + + READ_UE(gb, &sps->nb_st_rps); + if (sps->nb_st_rps > MAX_SHORT_TERM_RPS_COUNT) { + mpp_err( "Too many short term RPS: %d.\n", + sps->nb_st_rps); + ret = MPP_ERR_STREAM; + goto err; + } + for (i = 0; (RK_U32)i < sps->nb_st_rps; i++) { + if ((ret = mpp_hevc_decode_short_term_rps(s, &sps->st_rps[i], + sps, 0)) < 0) + goto err; + } + + READ_BIT1(gb, &sps->long_term_ref_pics_present_flag); + if (sps->long_term_ref_pics_present_flag) { + READ_UE(gb, &sps->num_long_term_ref_pics_sps); + for (i = 0; (RK_U8)i < sps->num_long_term_ref_pics_sps; i++) { + READ_BITS(gb, sps->log2_max_poc_lsb, &sps->lt_ref_pic_poc_lsb_sps[i]); + READ_BIT1(gb, &sps->used_by_curr_pic_lt_sps_flag[i]); + } + } + READ_BIT1(gb, &sps->sps_temporal_mvp_enabled_flag); +#ifdef REF_IDX_MFM + if (s->nuh_layer_id > 0) + READ_BIT1(gb, &sps->set_mfm_enabled_flag); +#endif + READ_BIT1(gb, &sps->sps_strong_intra_smoothing_enable_flag); + sps->vui.sar = (MppRational_t) {0, 1}; + READ_BIT1(gb, &vui_present); + if (vui_present) + decode_vui(s, sps); +#ifdef SCALED_REF_LAYER_OFFSETS + if ( s->nuh_layer_id > 0 ) { + READ_SE(gb, &value); + sps->scaled_ref_layer_window.left_offset = (value << 1); + READ_SE(gb, &value); + sps->scaled_ref_layer_window.top_offset = (value << 1); + READ_SE(gb, &value); + sps->scaled_ref_layer_window.right_offset = (value << 1); + READ_SE(gb, &value); + sps->scaled_ref_layer_window.bottom_offset = (value << 1); + } +#endif + + // READ_SKIPBITS(gb, 1); // sps_extension_flag + + if (s->apply_defdispwin) { + sps->output_window.left_offset += sps->vui.def_disp_win.left_offset; + sps->output_window.right_offset += sps->vui.def_disp_win.right_offset; + sps->output_window.top_offset += sps->vui.def_disp_win.top_offset; + sps->output_window.bottom_offset += sps->vui.def_disp_win.bottom_offset; + } +#if 1 + if (sps->output_window.left_offset & (0x1F >> (sps->pixel_shift))) { + sps->output_window.left_offset &= ~(0x1F >> (sps->pixel_shift)); + mpp_log("Reducing left output window to %d " + "chroma samples to preserve alignment.\n", + sps->output_window.left_offset); + } +#endif + sps->output_width = sps->width - + (sps->output_window.left_offset + sps->output_window.right_offset); + sps->output_height = sps->height - + (sps->output_window.top_offset + sps->output_window.bottom_offset); + if (sps->output_width <= 0 || sps->output_height <= 0) { + mpp_log("Invalid visible frame dimensions: %dx%d.\n", + sps->output_width, sps->output_height); +#if 0 + if (s->h265dctx->err_recognition & AV_EF_EXPLODE) { + ret = MPP_ERR_STREAM; + goto err; + } +#endif + mpp_log("Displaying the whole video surface.\n"); + sps->pic_conf_win.left_offset = + sps->pic_conf_win.right_offset = + sps->pic_conf_win.top_offset = + sps->pic_conf_win.bottom_offset = 0; + sps->output_width = sps->width; + sps->output_height = sps->height; + } + + s->h265dctx->width = sps->width; + s->h265dctx->height = sps->height; + // Inferred parameters + sps->log2_ctb_size = sps->log2_min_cb_size + + sps->log2_diff_max_min_coding_block_size; + sps->log2_min_pu_size = sps->log2_min_cb_size - 1; + + sps->ctb_width = (sps->width + (1 << sps->log2_ctb_size) - 1) >> sps->log2_ctb_size; + sps->ctb_height = (sps->height + (1 << sps->log2_ctb_size) - 1) >> sps->log2_ctb_size; + sps->ctb_size = sps->ctb_width * sps->ctb_height; + + sps->min_cb_width = sps->width >> sps->log2_min_cb_size; + sps->min_cb_height = sps->height >> sps->log2_min_cb_size; + sps->min_tb_width = sps->width >> sps->log2_min_tb_size; + sps->min_tb_height = sps->height >> sps->log2_min_tb_size; + sps->min_pu_width = sps->width >> sps->log2_min_pu_size; + sps->min_pu_height = sps->height >> sps->log2_min_pu_size; + + sps->qp_bd_offset = 6 * (sps->bit_depth - 8); + + if (sps->width & ((1 << sps->log2_min_cb_size) - 1) || + sps->height & ((1 << sps->log2_min_cb_size) - 1)) { + mpp_err( "Invalid coded frame dimensions.\n"); + goto err; + } + + if (sps->log2_ctb_size > MAX_LOG2_CTB_SIZE) { + mpp_err( "CTB size out of range: 2^%d\n", sps->log2_ctb_size); + goto err; + } + if (sps->max_transform_hierarchy_depth_inter > (RK_S32)(sps->log2_ctb_size - sps->log2_min_tb_size)) { + mpp_err( "max_transform_hierarchy_depth_inter out of range: %d\n", + sps->max_transform_hierarchy_depth_inter); + goto err; + } + if (sps->max_transform_hierarchy_depth_intra > (RK_S32)(sps->log2_ctb_size - sps->log2_min_tb_size)) { + mpp_err( "max_transform_hierarchy_depth_intra out of range: %d\n", + sps->max_transform_hierarchy_depth_intra); + goto err; + } + if (sps->log2_max_trafo_size > (RK_U32)MPP_MIN(sps->log2_ctb_size, 5)) { + mpp_err( + "max transform block size out of range: %d\n", + sps->log2_max_trafo_size); + goto err; + } +#if 0 + if (s->h265dctx->debug & FF_DEBUG_BITSTREAM) { + h265d_dbg(H265D_DBG_SPS, + "Parsed SPS: id %d; coded wxh: %dx%d; " + "cropped wxh: %dx%d; pix_fmt: %s.\n", + sps_id, sps->width, sps->height, + sps->output_width, sps->output_height, + av_get_pix_fmt_name(sps->pix_fmt)); + } +#endif + /* check if this is a repeat of an already parsed SPS, then keep the + * original one. + * otherwise drop all PPSes that depend on it */ + if (s->h265dctx->compare_info != NULL) { + CurrentFameInf_t *info = (CurrentFameInf_t *)s->h265dctx->compare_info; + HEVCSPS *openhevc_sps = (HEVCSPS *)&info->sps[sps_id]; + mpp_log("compare sps in"); + if (compare_sps(openhevc_sps, (HEVCSPS *)sps_buf) < 0) { + mpp_err("compare sps with openhevc error found"); + mpp_assert(0); + return -1; + } + mpp_log("compare sps ok"); + } + if (s->sps_list[sps_id] && + !memcmp(s->sps_list[sps_id], sps_buf, sizeof(HEVCSPS))) { + mpp_free(sps_buf); + } else { + for (i = 0; (RK_U32)i < MPP_ARRAY_ELEMS(s->pps_list); i++) { + if (s->pps_list[i] && ((HEVCPPS*)s->pps_list[i])->sps_id == sps_id) { + mpp_hevc_pps_free(s->pps_list[i]); + s->pps_list[i] = NULL; + } + } + if (s->sps_list[sps_id] != NULL) + mpp_free(s->sps_list[sps_id]); + s->sps_list[sps_id] = sps_buf; + } + + if (s->sps_list[sps_id]) + s->sps_list_of_updated[sps_id] = 1; + + return 0; + +err: + mpp_free(sps_buf); + return ret; +} + +void mpp_hevc_pps_free(RK_U8 *data) +{ + HEVCPPS *pps = (HEVCPPS*)data; + if (pps != NULL) { + mpp_free(pps->column_width); + mpp_free(pps->row_height); + mpp_free(pps->col_bd); + mpp_free(pps->row_bd); + mpp_free(pps->col_idxX); + mpp_free(pps->ctb_addr_rs_to_ts); + mpp_free(pps->ctb_addr_ts_to_rs); + mpp_free(pps->tile_pos_rs); + mpp_free(pps->tile_id); + mpp_free(pps->min_cb_addr_zs); + mpp_free(pps->min_tb_addr_zs); + mpp_free(pps); + } +} + +int mpp_hevc_decode_nal_pps(HEVCContext *s) +{ + + GetBitCxt_t *gb = &s->HEVClc->gb; + HEVCSPS *sps = NULL; + RK_S32 pic_area_in_ctbs, pic_area_in_min_cbs, pic_area_in_min_tbs; + RK_S32 i, j, x, y, ctb_addr_rs, tile_id; + RK_S32 ret = 0; + RK_S32 pps_id = 0; + + HEVCPPS *pps = NULL; + RK_U8 *pps_buf; + pps_buf = mpp_calloc(RK_U8, sizeof(*pps)); + + if (!pps_buf) + return MPP_ERR_NOMEM; + + pps = ( HEVCPPS *)pps_buf; + h265d_dbg(H265D_DBG_FUNCTION, "Decoding PPS\n"); + + // Default values + pps->loop_filter_across_tiles_enabled_flag = 1; + pps->num_tile_columns = 1; + pps->num_tile_rows = 1; + pps->uniform_spacing_flag = 1; + pps->disable_dbf = 0; + pps->beta_offset = 0; + pps->tc_offset = 0; + + // Coded parameters + READ_UE(gb, &pps_id); + pps->pps_id = pps_id;///<- zrh add + if (pps_id >= MAX_PPS_COUNT) { + mpp_err( "PPS id out of range: %d\n", pps_id); + ret = MPP_ERR_STREAM; + goto err; + } + READ_UE(gb, &pps->sps_id); + if (pps->sps_id >= MAX_SPS_COUNT) { + mpp_err( "SPS id out of range: %d\n", pps->sps_id); + ret = MPP_ERR_STREAM; + goto err; + } + if (!s->sps_list[pps->sps_id]) { + mpp_err( "SPS %u does not exist.\n", pps->sps_id); + ret = MPP_ERR_STREAM; + goto err; + } + sps = (HEVCSPS *)s->sps_list[pps->sps_id]; + + h265d_dbg(H265D_DBG_FUNCTION, "Decoding PPS 1\n"); + READ_BIT1(gb, &pps->dependent_slice_segments_enabled_flag); + READ_BIT1(gb, &pps->output_flag_present_flag ); + READ_BITS(gb, 3, &pps->num_extra_slice_header_bits); + + READ_BIT1(gb, &pps->sign_data_hiding_flag); + + READ_BIT1(gb, &pps->cabac_init_present_flag); + + READ_UE(gb, &pps->num_ref_idx_l0_default_active); + pps->num_ref_idx_l0_default_active += 1; + READ_UE(gb, &pps->num_ref_idx_l1_default_active); + pps->num_ref_idx_l1_default_active += 1; + + READ_SE(gb, &pps->pic_init_qp_minus26); + + READ_BIT1(gb, & pps->constrained_intra_pred_flag); + READ_BIT1(gb, &pps->transform_skip_enabled_flag); + + READ_BIT1(gb, &pps->cu_qp_delta_enabled_flag); + pps->diff_cu_qp_delta_depth = 0; + if (pps->cu_qp_delta_enabled_flag) + READ_UE(gb, &pps->diff_cu_qp_delta_depth); + + READ_SE(gb, &pps->cb_qp_offset); + if (pps->cb_qp_offset < -12 || pps->cb_qp_offset > 12) { + mpp_err( "pps_cb_qp_offset out of range: %d\n", + pps->cb_qp_offset); + ret = MPP_ERR_STREAM; + goto err; + } + READ_SE(gb, &pps->cr_qp_offset); + if (pps->cr_qp_offset < -12 || pps->cr_qp_offset > 12) { + mpp_err( "pps_cr_qp_offset out of range: %d\n", + pps->cr_qp_offset); + ret = MPP_ERR_STREAM; + goto err; + } + READ_BIT1(gb, & pps->pic_slice_level_chroma_qp_offsets_present_flag); + + READ_BIT1(gb, &pps->weighted_pred_flag); + + READ_BIT1(gb, &pps->weighted_bipred_flag); + + READ_BIT1(gb, &pps->transquant_bypass_enable_flag); + READ_BIT1(gb, &pps->tiles_enabled_flag); + READ_BIT1(gb, &pps->entropy_coding_sync_enabled_flag); + + if (pps->tiles_enabled_flag) { + READ_UE(gb, &pps->num_tile_columns); + pps->num_tile_columns += 1; + READ_UE(gb, &pps->num_tile_rows); + pps->num_tile_rows += 1; + if (pps->num_tile_columns == 0 || + pps->num_tile_columns >= sps->width) { + mpp_err( "num_tile_columns_minus1 out of range: %d\n", + pps->num_tile_columns - 1); + ret = MPP_ERR_STREAM; + goto err; + } + if (pps->num_tile_rows == 0 || + pps->num_tile_rows >= sps->height) { + mpp_err( "num_tile_rows_minus1 out of range: %d\n", + pps->num_tile_rows - 1); + ret = MPP_ERR_STREAM; + goto err; + } + + pps->column_width = mpp_malloc(RK_U32, pps->num_tile_columns); + pps->row_height = mpp_malloc(RK_U32, pps->num_tile_rows); + if (!pps->column_width || !pps->row_height) { + ret = MPP_ERR_NOMEM; + goto err; + } + + READ_BIT1(gb, &pps->uniform_spacing_flag ); + if (!pps->uniform_spacing_flag) { + RK_S32 sum = 0; + for (i = 0; i < pps->num_tile_columns - 1; i++) { + READ_UE(gb, &pps->column_width[i]); + pps->column_width[i] += 1; + sum += pps->column_width[i]; + } + if (sum >= sps->ctb_width) { + mpp_err( "Invalid tile widths.\n"); + ret = MPP_ERR_STREAM; + goto err; + } + pps->column_width[pps->num_tile_columns - 1] = sps->ctb_width - sum; + + sum = 0; + for (i = 0; i < pps->num_tile_rows - 1; i++) { + READ_UE(gb, &pps->row_height[i]); + pps->row_height[i] += 1; + sum += pps->row_height[i]; + } + if (sum >= sps->ctb_height) { + mpp_err( "Invalid tile heights.\n"); + ret = MPP_ERR_STREAM; + goto err; + } + pps->row_height[pps->num_tile_rows - 1] = sps->ctb_height - sum; + } + READ_BIT1(gb, &pps->loop_filter_across_tiles_enabled_flag); + } + + READ_BIT1(gb, &pps->seq_loop_filter_across_slices_enabled_flag); + READ_BIT1(gb, &pps->deblocking_filter_control_present_flag); + if (pps->deblocking_filter_control_present_flag) { + READ_BIT1(gb, &pps->deblocking_filter_override_enabled_flag); + READ_BIT1(gb, & pps->disable_dbf); + if (!pps->disable_dbf) { + READ_SE(gb, &pps->beta_offset); + pps->beta_offset = pps->beta_offset * 2; + READ_SE(gb, &pps->tc_offset); + pps->tc_offset = pps->tc_offset * 2; + if (pps->beta_offset / 2 < -6 || pps->beta_offset / 2 > 6) { + mpp_err( "pps_beta_offset_div2 out of range: %d\n", + pps->beta_offset / 2); + ret = MPP_ERR_STREAM; + goto err; + } + if (pps->tc_offset / 2 < -6 || pps->tc_offset / 2 > 6) { + mpp_err( "pps_tc_offset_div2 out of range: %d\n", + pps->tc_offset / 2); + ret = MPP_ERR_STREAM; + goto err; + } + } + } + + READ_BIT1(gb, &pps->scaling_list_data_present_flag); + if (pps->scaling_list_data_present_flag) { + set_default_scaling_list_data(&pps->scaling_list); + ret = scaling_list_data(s, &pps->scaling_list); + + if (ret < 0) + goto err; + s->scaling_list_listen[pps_id + 16] = 1; + } + + h265d_dbg(H265D_DBG_PPS, "num bit left %d", gb->num_remaining_bits_in_curr_byte_); + READ_BIT1(gb, & pps->lists_modification_present_flag); + + + h265d_dbg(H265D_DBG_PPS, "num bit left %d", gb->num_remaining_bits_in_curr_byte_); + READ_UE(gb, &pps->log2_parallel_merge_level); + + h265d_dbg(H265D_DBG_PPS, "num bit left %d", gb->num_remaining_bits_in_curr_byte_); + pps->log2_parallel_merge_level += 2; + if (pps->log2_parallel_merge_level > sps->log2_ctb_size) { + mpp_err( "log2_parallel_merge_level_minus2 out of range: %d\n", + pps->log2_parallel_merge_level - 2); + ret = MPP_ERR_STREAM; + goto err; + } + + if (s->h265dctx->compare_info != NULL) { + CurrentFameInf_t *info = (CurrentFameInf_t *)s->h265dctx->compare_info; + HEVCPPS *openhevc_pps = (HEVCPPS*)&info->pps[pps_id]; + mpp_log("compare pps in"); + if (compare_pps(openhevc_pps, (HEVCPPS*)pps_buf) < 0) { + mpp_err("compare pps with openhevc error found"); + mpp_assert(0); + return -1; + } + mpp_log("compare pps ok"); + } + + // Inferred parameters + pps->col_bd = mpp_malloc(RK_U32, (pps->num_tile_columns + 1)); + pps->row_bd = mpp_malloc(RK_U32, (pps->num_tile_rows + 1)); + pps->col_idxX = mpp_malloc(RK_S32, sps->ctb_width); + if (!pps->col_bd || !pps->row_bd || !pps->col_idxX) { + ret = MPP_ERR_NOMEM; + goto err; + } + + if (pps->uniform_spacing_flag) { + if (!pps->column_width) { + pps->column_width = mpp_malloc(RK_U32, pps->num_tile_columns ); + pps->row_height = mpp_malloc(RK_U32, pps->num_tile_rows); + } + if (!pps->column_width || !pps->row_height) { + ret = MPP_ERR_NOMEM; + goto err; + } + + for (i = 0; i < pps->num_tile_columns; i++) { + pps->column_width[i] = ((i + 1) * sps->ctb_width) / pps->num_tile_columns - + (i * sps->ctb_width) / pps->num_tile_columns; + } + + for (i = 0; i < pps->num_tile_rows; i++) { + pps->row_height[i] = ((i + 1) * sps->ctb_height) / pps->num_tile_rows - + (i * sps->ctb_height) / pps->num_tile_rows; + } + } + + pps->col_bd[0] = 0; + for (i = 0; i < pps->num_tile_columns; i++) + pps->col_bd[i + 1] = pps->col_bd[i] + pps->column_width[i]; + + pps->row_bd[0] = 0; + for (i = 0; i < pps->num_tile_rows; i++) + pps->row_bd[i + 1] = pps->row_bd[i] + pps->row_height[i]; + + for (i = 0, j = 0; i < sps->ctb_width; i++) { + if ((RK_U32)i > pps->col_bd[j]) + j++; + pps->col_idxX[i] = j; + } + + /** + * 6.5 + */ + pic_area_in_ctbs = sps->ctb_width * sps->ctb_height; + pic_area_in_min_cbs = sps->min_cb_width * sps->min_cb_height; + pic_area_in_min_tbs = sps->min_tb_width * sps->min_tb_height; + + pps->ctb_addr_rs_to_ts = mpp_malloc(RK_S32, pic_area_in_ctbs); + pps->ctb_addr_ts_to_rs = mpp_malloc(RK_S32, pic_area_in_ctbs); + pps->tile_id = mpp_malloc(RK_S32, pic_area_in_ctbs ); + pps->min_cb_addr_zs = mpp_malloc(RK_S32, pic_area_in_min_cbs); + pps->min_tb_addr_zs = mpp_malloc(RK_S32, pic_area_in_min_tbs); + if (!pps->ctb_addr_rs_to_ts || !pps->ctb_addr_ts_to_rs || + !pps->tile_id || !pps->min_cb_addr_zs || !pps->min_tb_addr_zs) { + ret = MPP_ERR_NOMEM; + goto err; + } + + for (ctb_addr_rs = 0; ctb_addr_rs < pic_area_in_ctbs; ctb_addr_rs++) { + RK_U32 tb_x = ctb_addr_rs % sps->ctb_width; + RK_U32 tb_y = ctb_addr_rs / sps->ctb_width; + RK_S32 tile_x = 0; + RK_S32 tile_y = 0; + int val = 0; + + for (i = 0; i < pps->num_tile_columns; i++) { + if (tb_x < pps->col_bd[i + 1]) { + tile_x = i; + break; + } + } + + for (i = 0; i < pps->num_tile_rows; i++) { + if (tb_y < pps->row_bd[i + 1]) { + tile_y = i; + break; + } + } + + for (i = 0; i < tile_x; i++) + val += pps->row_height[tile_y] * pps->column_width[i]; + for (i = 0; i < tile_y; i++) + val += sps->ctb_width * pps->row_height[i]; + + val += (tb_y - pps->row_bd[tile_y]) * pps->column_width[tile_x] + + tb_x - pps->col_bd[tile_x]; + + pps->ctb_addr_rs_to_ts[ctb_addr_rs] = val; + pps->ctb_addr_ts_to_rs[val] = ctb_addr_rs; + } + + for (j = 0, tile_id = 0; j < pps->num_tile_rows; j++) + for (i = 0; i < pps->num_tile_columns; i++, tile_id++) + for (y = pps->row_bd[j]; (RK_U32)y < pps->row_bd[j + 1]; y++) + for (x = pps->col_bd[i]; (RK_U32)x < pps->col_bd[i + 1]; x++) + pps->tile_id[pps->ctb_addr_rs_to_ts[y * sps->ctb_width + x]] = tile_id; + + pps->tile_pos_rs = mpp_malloc(RK_S32, tile_id); + if (!pps->tile_pos_rs) { + ret = MPP_ERR_NOMEM; + goto err; + } + + for (j = 0; j < pps->num_tile_rows; j++) + for (i = 0; i < pps->num_tile_columns; i++) + pps->tile_pos_rs[j * pps->num_tile_columns + i] = pps->row_bd[j] * sps->ctb_width + pps->col_bd[i]; + + if (s->pps_list[pps_id] != NULL) { + mpp_hevc_pps_free(s->pps_list[pps_id]); + s->pps_list[pps_id] = NULL; + } + s->pps_list[pps_id] = pps_buf; + + if (s->pps_list[pps_id]) + s->pps_list_of_updated[pps_id] = 1; + + return 0; + +err: + mpp_hevc_pps_free(pps_buf); + return ret; +} diff --git a/mpp/codec/dec/h265/h265d_refs.c b/mpp/codec/dec/h265/h265d_refs.c new file mode 100644 index 00000000..97bfa532 --- /dev/null +++ b/mpp/codec/dec/h265/h265d_refs.c @@ -0,0 +1,450 @@ +/* + * + * Copyright 2010 Rockchip Electronics Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * @file h265_refs.c + * @brief + * @author csy(csy@rock-chips.com) + + * @version 1.0.0 + * @history + * 2015.7.15 : Create + */ +#define LOG_TAG "H265_PARSER_REF" +#include "h265d_parser.h" +#define HEVC_ALIGN(value, x) ((value + (x-1)) & (~(x-1))) + +void mpp_hevc_unref_frame(HEVCContext *s, HEVCFrame *frame, int flags) +{ + /* frame->frame can be NULL if context init failed */ + if (!frame->frame || (frame->slot_index == 0xff)) + return; + + frame->flags &= ~flags; + if (!frame->flags) { + mpp_free(frame->rpl_buf); + mpp_free(frame->rpl_tab_buf); + frame->rpl_tab = NULL; + frame->refPicList = NULL; + frame->collocated_ref = NULL; + if (frame->slot_index <= 0x7f) { + h265d_dbg(H265D_DBG_REF, "poc %d clr ref index %d", frame->poc, frame->slot_index); + mpp_buf_slot_clr_dpb_ref(s->slots, frame->slot_index); + } + h265d_dbg(H265D_DBG_REF, "unref_frame poc %d frame->slot_index %d \n", frame->poc, frame->slot_index); + frame->poc = INT_MAX; + frame->slot_index = 0xff; + } +} + + +void mpp_hevc_clear_refs(HEVCContext *s) +{ + RK_U32 i; + for (i = 0; i < MPP_ARRAY_ELEMS(s->DPB); i++) { + mpp_hevc_unref_frame(s, &s->DPB[i], + HEVC_FRAME_FLAG_SHORT_REF | + HEVC_FRAME_FLAG_LONG_REF); + } +} + +void mpp_hevc_flush_dpb(HEVCContext *s) +{ + RK_U32 i; + for (i = 0; i < MPP_ARRAY_ELEMS(s->DPB); i++) { + mpp_hevc_unref_frame(s, &s->DPB[i], ~0); + } +} + +static HEVCFrame *alloc_frame(HEVCContext *s) +{ + + RK_S32 j; + RK_U32 i; + MPP_RET ret = MPP_OK; + for (i = 0; i < MPP_ARRAY_ELEMS(s->DPB); i++) { + HEVCFrame *frame = &s->DPB[i]; + if (frame->slot_index != 0xff) { + continue; + } + + if (ret != MPP_OK) { + goto fail; + } + mpp_err("width = %d height = %d", s->h265dctx->width, s->h265dctx->height); + mpp_frame_set_width(frame->frame, s->h265dctx->width); + mpp_frame_set_height(frame->frame, s->h265dctx->height); + + mpp_frame_set_hor_stride(frame->frame, HEVC_ALIGN(s->h265dctx->coded_width, 256) | 256); + mpp_frame_set_ver_stride(frame->frame, HEVC_ALIGN(s->h265dctx->coded_height, 8)); + + // frame->frame->color_type = s->h265dctx->pix_fmt; + // if (!frame->frame->sample_aspect_ratio.num) + // frame->frame->sample_aspect_ratio = s->h265dctx->sample_aspect_ratio; + mpp_frame_set_pts(frame->frame, s->pts); + + frame->rpl_buf = mpp_calloc(RK_U8, s->nb_nals * sizeof(RefPicListTab)); + if (!frame->rpl_buf) + goto fail; + + frame->ctb_count = s->sps->ctb_width * s->sps->ctb_height; + frame->rpl_tab_buf = mpp_calloc(RK_U8, frame->ctb_count * sizeof(RefPicListTab)); + + if (!frame->rpl_tab_buf) + goto fail; + + frame->rpl_tab = (RefPicListTab **)frame->rpl_tab_buf; + + for (j = 0; j < frame->ctb_count; j++) + frame->rpl_tab[j] = (RefPicListTab *)frame->rpl_buf; + +// frame->frame->top_field_first = s->picture_struct; + ret = mpp_buf_slot_get_unused(s->slots, &frame->slot_index); + return frame; + fail: + mpp_hevc_unref_frame(s, frame, ~0); + return NULL; + } + mpp_err( "Error allocating frame, DPB full.\n"); + return NULL; +} + +int mpp_hevc_set_new_ref(HEVCContext *s, MppFrame *mframe, int poc) +{ + + HEVCFrame *ref = NULL; + RK_U32 i; + + /* check that this POC doesn't already exist */ + for (i = 0; i < MPP_ARRAY_ELEMS(s->DPB); i++) { + HEVCFrame *frame = &s->DPB[i]; + + if ((frame->slot_index != 0xff) && frame->sequence == s->seq_decode && + frame->poc == poc && !s->nuh_layer_id) { + mpp_err( "Duplicate POC in a sequence: %d.\n", + poc); + return MPP_ERR_STREAM; + } + } + + ref = alloc_frame(s); + if (!ref) + return MPP_ERR_NOMEM; + + *mframe = ref->frame; + s->ref = ref; + + ref->poc = poc; + h265d_dbg(H265D_DBG_REF, "alloc frame poc %d slot_index %d", poc, ref->slot_index); + ref->flags = HEVC_FRAME_FLAG_OUTPUT | HEVC_FRAME_FLAG_SHORT_REF; + + mpp_buf_slot_set_dpb_ref(s->slots, ref->slot_index); + mpp_buf_slot_set_hw_dst(s->slots, ref->slot_index, ref->frame); + s->task->output = ref->slot_index; + + ref->sequence = s->seq_decode; + ref->window = s->sps->output_window; + return 0; +} + +static int init_slice_rpl(HEVCContext *s) +{ + HEVCFrame *frame = s->ref; + RK_S32 ctb_count = frame->ctb_count; + RK_S32 ctb_addr_ts = s->pps->ctb_addr_rs_to_ts[s->sh.slice_segment_addr]; + RK_S32 i; + + if (s->slice_idx >= s->nb_nals) + return MPP_ERR_STREAM; + + for (i = ctb_addr_ts; i < ctb_count; i++) + frame->rpl_tab[i] = (RefPicListTab *)frame->rpl_buf + s->slice_idx; + + frame->refPicList = (RefPicList *)frame->rpl_tab[ctb_addr_ts]; + + return 0; +} + +static HEVCFrame *find_ref_idx(HEVCContext *s, int poc) +{ + RK_U32 i; + RK_S32 LtMask = (1 << s->sps->log2_max_poc_lsb) - 1; + + for (i = 0; i < MPP_ARRAY_ELEMS(s->DPB); i++) { + HEVCFrame *ref = &s->DPB[i]; + if ((ref->slot_index != 0xff) && (ref->sequence == s->seq_decode)) { + if ((ref->poc & LtMask) == poc) + return ref; + } + } + + for (i = 0; i < MPP_ARRAY_ELEMS(s->DPB); i++) { + HEVCFrame *ref = &s->DPB[i]; + if ((ref->slot_index != 0xff) && ref->sequence == s->seq_decode) { + if (ref->poc == poc || (ref->poc & LtMask) == poc) + return ref; + } + } + + mpp_err( + "Could not find ref with POC %d\n", poc); + return NULL; +} + +int mpp_hevc_slice_rpl(HEVCContext *s) +{ + + SliceHeader *sh = &s->sh; + + RK_U8 nb_list = sh->slice_type == B_SLICE ? 2 : 1; + RK_U8 list_idx; + RK_U32 i; + RK_S32 j, ret; + + ret = init_slice_rpl(s); + if (ret < 0) + return ret; + + if (!(s->rps[ST_CURR_BEF].nb_refs + s->rps[ST_CURR_AFT].nb_refs + + s->rps[LT_CURR].nb_refs)) { + mpp_err( "Zero refs in the frame RPS.\n"); + return MPP_ERR_STREAM; + } + + for (list_idx = 0; list_idx < nb_list; list_idx++) { + RefPicList rpl_tmp; + memset(&rpl_tmp, 0, sizeof(rpl_tmp)); + RefPicList *rpl = &s->ref->refPicList[list_idx]; + + /* The order of the elements is + * ST_CURR_BEF - ST_CURR_AFT - LT_CURR for the L0 and + * ST_CURR_AFT - ST_CURR_BEF - LT_CURR for the L1 */ + RK_S32 cand_lists[3] = { list_idx ? ST_CURR_AFT : ST_CURR_BEF, + list_idx ? ST_CURR_BEF : ST_CURR_AFT, + LT_CURR + }; + + /* concatenate the candidate lists for the current frame */ + while ((RK_U32)rpl_tmp.nb_refs < sh->nb_refs[list_idx]) { + for (i = 0; i < MPP_ARRAY_ELEMS(cand_lists); i++) { + RefPicList *rps = &s->rps[cand_lists[i]]; + for (j = 0; j < rps->nb_refs && rpl_tmp.nb_refs < MAX_REFS; j++) { + rpl_tmp.list[rpl_tmp.nb_refs] = rps->list[j]; + rpl_tmp.ref[rpl_tmp.nb_refs] = rps->ref[j]; + rpl_tmp.isLongTerm[rpl_tmp.nb_refs] = i == 2; + rpl_tmp.nb_refs++; + } + } + } + + /* reorder the references if necessary */ + if (sh->rpl_modification_flag[list_idx]) { + for (i = 0; i < sh->nb_refs[list_idx]; i++) { + int idx = sh->list_entry_lx[list_idx][i]; + + if (!s->decoder_id && idx >= rpl_tmp.nb_refs) { + mpp_err( "Invalid reference index.\n"); + return MPP_ERR_STREAM; + } + + rpl->list[i] = rpl_tmp.list[idx]; + rpl->ref[i] = rpl_tmp.ref[idx]; + rpl->isLongTerm[i] = rpl_tmp.isLongTerm[idx]; + rpl->nb_refs++; + } + } else { + memcpy(rpl, &rpl_tmp, sizeof(*rpl)); + rpl->nb_refs = MPP_MIN((RK_U32)rpl->nb_refs, sh->nb_refs[list_idx]); + } + + if (sh->collocated_list == list_idx && + sh->collocated_ref_idx < (RK_U32)rpl->nb_refs) + s->ref->collocated_ref = rpl->ref[sh->collocated_ref_idx]; + } + return 0; +} + +static void mark_ref(HEVCFrame *frame, int flag) +{ + frame->flags &= ~(HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF); + frame->flags |= flag; +} + +static HEVCFrame *generate_missing_ref(HEVCContext *s, int poc) +{ + HEVCFrame *frame; + mpp_log("generate_missing_ref in \n"); + frame = alloc_frame(s); + if (!frame) + return NULL; +#if 0 + if (!s->sps->pixel_shift) { + for (i = 0; frame->frame->buf[i]; i++) + memset(frame->frame->buf[i]->data, 1 << (s->sps->bit_depth - 1), + frame->frame->buf[i]->size); + } else { + for (i = 0; frame->frame->data[i]; i++) + for (y = 0; y < (s->sps->height >> s->sps->vshift[i]); y++) + for (x = 0; x < (s->sps->width >> s->sps->hshift[i]); x++) { + AV_WN16(frame->frame->data[i] + y * frame->frame->linesize[i] + 2 * x, + 1 << (s->sps->bit_depth - 1)); + } + } +#endif + frame->poc = poc; + + mpp_err("generate_missing_ref frame poc %d slot_index %d", poc, frame->slot_index); + frame->sequence = s->seq_decode; + frame->flags = 0; + + return frame; +} + +/* add a reference with the given poc to the list and mark it as used in DPB */ +static int add_candidate_ref(HEVCContext *s, RefPicList *list, + int poc, int ref_flag) +{ + HEVCFrame *ref = find_ref_idx(s, poc); + + if (ref == s->ref) + return MPP_ERR_STREAM; + + if (!ref) { + ref = generate_missing_ref(s, poc); + if (!ref) + return MPP_ERR_NOMEM; + } + + list->list[list->nb_refs] = ref->poc; + list->ref[list->nb_refs] = ref; + list->nb_refs++; + if (ref_flag) { + h265d_dbg(H265D_DBG_REF, "set ref poc = %d ref->slot_index %d", ref->poc, ref->slot_index); + mpp_buf_slot_set_dpb_ref(s->slots, ref->slot_index); + } + mark_ref(ref, ref_flag); + + return 0; +} + +RK_S32 mpp_hevc_frame_rps(HEVCContext *s) +{ + + const ShortTermRPS *short_rps = s->sh.short_term_rps; + const LongTermRPS *long_rps = &s->sh.long_term_rps; + RefPicList *rps = s->rps; + RK_S32 ret; + RK_U32 i; + + if (!short_rps) { + rps[0].nb_refs = rps[1].nb_refs = 0; + if (!long_rps) + return 0; + } + + /* clear the reference flags on all frames except the current one */ + for (i = 0; i < MPP_ARRAY_ELEMS(s->DPB); i++) { + HEVCFrame *frame = &s->DPB[i]; + if (frame == s->ref) + continue; + mark_ref(frame, 0); + } + + for (i = 0; i < NB_RPS_TYPE; i++) + rps[i].nb_refs = 0; + + /* add the short refs */ + for (i = 0; short_rps && (RK_S32)i < short_rps->num_delta_pocs; i++) { + int poc = s->poc + short_rps->delta_poc[i]; + int list; + + if (!short_rps->used[i]) + list = ST_FOLL; + else if (i < short_rps->num_negative_pics) + list = ST_CURR_BEF; + else + list = ST_CURR_AFT; + + ret = add_candidate_ref(s, &rps[list], poc, HEVC_FRAME_FLAG_SHORT_REF); + if (ret < 0) + return ret; + } + + /* add the long refs */ + for (i = 0; long_rps && i < long_rps->nb_refs; i++) { + int poc = long_rps->poc[i]; + int list = long_rps->used[i] ? LT_CURR : LT_FOLL; + + ret = add_candidate_ref(s, &rps[list], poc, HEVC_FRAME_FLAG_LONG_REF); + if (ret < 0) + return ret; + } + /* release any frames that are now unused */ + for (i = 0; i < MPP_ARRAY_ELEMS(s->DPB); i++) { + mpp_hevc_unref_frame(s, &s->DPB[i], 0); + } + + return 0; +} + +int mpp_hevc_compute_poc(HEVCContext *s, int poc_lsb) +{ + RK_S32 max_poc_lsb = 1 << s->sps->log2_max_poc_lsb; + RK_S32 prev_poc_lsb = s->pocTid0 % max_poc_lsb; + RK_S32 prev_poc_msb = s->pocTid0 - prev_poc_lsb; + RK_S32 poc_msb; + + if (poc_lsb < prev_poc_lsb && prev_poc_lsb - poc_lsb >= max_poc_lsb / 2) + poc_msb = prev_poc_msb + max_poc_lsb; + else if (poc_lsb > prev_poc_lsb && poc_lsb - prev_poc_lsb > max_poc_lsb / 2) + poc_msb = prev_poc_msb - max_poc_lsb; + else + poc_msb = prev_poc_msb; + + // For BLA picture types, POCmsb is set to 0. + if (s->nal_unit_type == NAL_BLA_W_LP || + s->nal_unit_type == NAL_BLA_W_RADL || + s->nal_unit_type == NAL_BLA_N_LP) + poc_msb = 0; + + return poc_msb + poc_lsb; +} + +int mpp_hevc_frame_nb_refs(HEVCContext *s) +{ + RK_S32 ret = 0; + RK_S32 i; + const ShortTermRPS *rps = s->sh.short_term_rps; + LongTermRPS *long_rps = &s->sh.long_term_rps; + + if (s->sh.slice_type == I_SLICE) { + return 0; + } + if (rps) { + for (i = 0; (RK_U32)i < rps->num_negative_pics; i++) + ret += !!rps->used[i]; + for (; i < rps->num_delta_pocs; i++) + ret += !!rps->used[i]; + } + + if (long_rps) { + for (i = 0; i < long_rps->nb_refs; i++) + ret += !!long_rps->used[i]; + } + return ret; +} + diff --git a/mpp/codec/dec/h265/h265d_sei.c b/mpp/codec/dec/h265/h265d_sei.c new file mode 100644 index 00000000..9d5e8a54 --- /dev/null +++ b/mpp/codec/dec/h265/h265d_sei.c @@ -0,0 +1,203 @@ +/* + * + * Copyright 2010 Rockchip Electronics Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * @file h265d_sei.c + * @brief + * @author csy(csy@rock-chips.com) + + * @version 1.0.0 + * @history + * 2015.7.15 : Create + */ + +#include "h265d_parser.h" + +static RK_S32 decode_nal_sei_decoded_picture_hash(HEVCContext *s) +{ + RK_S32 cIdx, i; + RK_U8 hash_type; + //uint16_t picture_crc; + //RK_U32 picture_checksum; + GetBitCxt_t*gb = &s->HEVClc->gb; + READ_BITS(gb, 8, &hash_type); + + for (cIdx = 0; cIdx < 3/*((s->sps->chroma_format_idc == 0) ? 1 : 3)*/; cIdx++) { + if (hash_type == 0) { + //s->is_md5 = 1; + for (i = 0; i < 16; i++) + READ_SKIPBITS(gb, 8); + } else if (hash_type == 1) { + READ_SKIPBITS(gb, 16); + } else if (hash_type == 2) { + READ_SKIPBITS(gb, 32); + } + } + return 0; +} + +static RK_S32 decode_nal_sei_frame_packing_arrangement(HEVCContext *s) +{ + GetBitCxt_t *gb = &s->HEVClc->gb; + RK_S32 value = 0; + + READ_UE(gb, &value); // frame_packing_arrangement_id + READ_BIT1(gb, &value); + s->sei_frame_packing_present = !value; + + if (s->sei_frame_packing_present) { + READ_BITS(gb, 7, &s->frame_packing_arrangement_type); + READ_BIT1(gb, &s->quincunx_subsampling); + READ_BITS(gb, 6, &s->content_interpretation_type); + + // the following skips spatial_flipping_flag frame0_flipped_flag + // field_views_flag current_frame_is_frame0_flag + // frame0_self_contained_flag frame1_self_contained_flag + READ_SKIPBITS(gb, 6); + + if (!s->quincunx_subsampling && s->frame_packing_arrangement_type != 5) + READ_SKIPBITS(gb, 16); // frame[01]_grid_position_[xy] + READ_SKIPBITS(gb, 8); // frame_packing_arrangement_reserved_byte + READ_SKIPBITS(gb, 1); // frame_packing_arrangement_persistance_flag + } + READ_SKIPBITS(gb, 1); // upsampled_aspect_ratio_flag + return 0; +} + +static RK_S32 decode_pic_timing(HEVCContext *s) +{ + GetBitCxt_t *gb = &s->HEVClc->gb; + HEVCSPS *sps; + + if (!s->sps_list[s->active_seq_parameter_set_id]) + return MPP_ERR_NOMEM; + sps = (HEVCSPS*)s->sps_list[s->active_seq_parameter_set_id]; + s->picture_struct = MPP_PICTURE_STRUCTURE_UNKNOWN; + if (sps->vui.frame_field_info_present_flag) { + READ_BITS(gb, 4, &s->picture_struct); + switch (s->picture_struct) { + case 0 : s->picture_struct = MPP_PICTURE_STRUCTURE_FRAME; h265d_dbg(H265D_DBG_SEI, "(progressive) frame \n"); break; + case 1 : s->picture_struct = MPP_PICTURE_STRUCTURE_TOP_FIELD; h265d_dbg(H265D_DBG_SEI, "top field\n"); break; + case 2 : s->picture_struct = MPP_PICTURE_STRUCTURE_BOTTOM_FIELD; h265d_dbg(H265D_DBG_SEI, "bottom field\n"); break; + case 3 : s->picture_struct = MPP_PICTURE_STRUCTURE_FRAME; h265d_dbg(H265D_DBG_SEI, "top field, bottom field, in that order\n"); break; + case 4 : s->picture_struct = MPP_PICTURE_STRUCTURE_FRAME; h265d_dbg(H265D_DBG_SEI, "bottom field, top field, in that order\n"); break; + case 5 : s->picture_struct = MPP_PICTURE_STRUCTURE_FRAME; h265d_dbg(H265D_DBG_SEI, "top field, bottom field, top field repeated, in that order\n"); break; + case 6 : s->picture_struct = MPP_PICTURE_STRUCTURE_FRAME; h265d_dbg(H265D_DBG_SEI, "bottom field, top field, bottom field repeated, in that order\n"); break; + case 7 : s->picture_struct = MPP_PICTURE_STRUCTURE_FRAME; h265d_dbg(H265D_DBG_SEI, "frame doubling\n"); break; + case 8 : s->picture_struct = MPP_PICTURE_STRUCTURE_FRAME; h265d_dbg(H265D_DBG_SEI, "frame tripling\n"); break; + case 9 : s->picture_struct = MPP_PICTURE_STRUCTURE_TOP_FIELD; h265d_dbg(H265D_DBG_SEI, "top field paired with previous bottom field in output order\n"); break; + case 10 : s->picture_struct = MPP_PICTURE_STRUCTURE_BOTTOM_FIELD; h265d_dbg(H265D_DBG_SEI, "bottom field paired with previous top field in output order\n"); break; + case 11 : s->picture_struct = MPP_PICTURE_STRUCTURE_TOP_FIELD; h265d_dbg(H265D_DBG_SEI, "top field paired with next bottom field in output order\n"); break; + case 12 : s->picture_struct = MPP_PICTURE_STRUCTURE_BOTTOM_FIELD; h265d_dbg(H265D_DBG_SEI, "bottom field paired with next top field in output order\n"); break; + } + READ_SKIPBITS(gb, 2); // source_scan_type + READ_SKIPBITS(gb, 1); // duplicate_flag + } + return 1; +} + +static RK_S32 active_parameter_sets(HEVCContext *s) +{ + GetBitCxt_t *gb = &s->HEVClc->gb; + RK_S32 num_sps_ids_minus1; + RK_S32 i, value; + RK_U32 active_seq_parameter_set_id; + + READ_SKIPBITS(gb, 4); // active_video_parameter_set_id + READ_SKIPBITS(gb, 1); // self_contained_cvs_flag + READ_SKIPBITS(gb, 1); // num_sps_ids_minus1 + READ_UE(gb, &num_sps_ids_minus1); // num_sps_ids_minus1 + + READ_UE(gb, &active_seq_parameter_set_id); + if (active_seq_parameter_set_id >= MAX_SPS_COUNT) { + mpp_err( "active_parameter_set_id %d invalid\n", active_seq_parameter_set_id); + return MPP_ERR_STREAM; + } + s->active_seq_parameter_set_id = active_seq_parameter_set_id; + + for (i = 1; i <= num_sps_ids_minus1; i++) + READ_UE(gb, &value); // active_seq_parameter_set_id[i] + + return 0; +} + +static RK_S32 decode_nal_sei_message(HEVCContext *s) +{ + GetBitCxt_t *gb = &s->HEVClc->gb; + + int payload_type = 0; + int payload_size = 0; + int byte = 0xFF; + h265d_dbg(H265D_DBG_SEI, "Decoding SEI\n"); + + while (byte == 0xFF) { + READ_BITS(gb, 8, &byte); + payload_type += byte; + } + byte = 0xFF; + while (byte == 0xFF) { + READ_BITS(gb, 8, &byte); + payload_size += byte; + } + if (s->nal_unit_type == NAL_SEI_PREFIX) { + if (payload_type == 256 /*&& s->decode_checksum_sei*/) { + decode_nal_sei_decoded_picture_hash(s); + return 1; + } else if (payload_type == 45) { + decode_nal_sei_frame_packing_arrangement(s); + return 1; + } else if (payload_type == 1) { + int ret = decode_pic_timing(s); + h265d_dbg(H265D_DBG_SEI, "Skipped PREFIX SEI %d\n", payload_type); + READ_SKIPBITS(gb, 8 * payload_size); + return ret; + } else if (payload_type == 129) { + active_parameter_sets(s); + h265d_dbg(H265D_DBG_SEI, "Skipped PREFIX SEI %d\n", payload_type); + return 1; + } else { + h265d_dbg(H265D_DBG_SEI, "Skipped PREFIX SEI %d\n", payload_type); + READ_SKIPBITS(gb, 8 * payload_size); + return 1; + } + } else { /* nal_unit_type == NAL_SEI_SUFFIX */ + if (payload_type == 132 /* && s->decode_checksum_sei */) + decode_nal_sei_decoded_picture_hash(s); + else { + h265d_dbg(H265D_DBG_SEI, "Skipped SUFFIX SEI %d\n", payload_type); + READ_SKIPBITS(gb, 8 * payload_size); + } + return 1; + } +} + +static RK_S32 more_rbsp_data(GetBitCxt_t *gb) +{ + return gb->bytes_left_ > 1 && gb->data_[0] != 0x80; +} + +RK_S32 mpp_hevc_decode_nal_sei(HEVCContext *s) +{ + RK_S32 ret; + + do { + ret = decode_nal_sei_message(s); + if (ret < 0) + return MPP_ERR_NOMEM; + } while (more_rbsp_data(&s->HEVClc->gb)); + return 1; +} diff --git a/mpp/codec/dec/h265/test/CMakeLists.txt b/mpp/codec/dec/h265/test/CMakeLists.txt new file mode 100644 index 00000000..f2f3f259 --- /dev/null +++ b/mpp/codec/dec/h265/test/CMakeLists.txt @@ -0,0 +1,24 @@ +# vim: syntax=cmake +# ---------------------------------------------------------------------------- +# codec h265 built-in unit test case +# ---------------------------------------------------------------------------- +# log system unit test +option(H265D_TEST "Build codec h265d_parser unit test" ON) +if(H265D_TEST) + add_executable(h265d_parser_test h265d_parser_test.c) + include_directories(.) + link_directories(.) + if(ANDROID) + target_link_libraries(h265d_parser_test m h265d_parser osal h265d_hal mpp_codec mpp vpu) + else() + set(OPENHEVCSO "${CMAKE_SOURCE_DIR}/mpp/codec/dec/h265/test") + add_library(openhevcwrapper SHARED IMPORTED) + set_target_properties(openhevcwrapper PROPERTIES + IMPORTED_LOCATION + "${OPENHEVCSO}/libLibOpenHevcWrapper.so") + target_link_libraries(h265d_parser_test openhevcwrapper m h265d_parser osal h265d_hal mpp_codec mpp) + endif() + +endif() + + diff --git a/mpp/codec/dec/h265/test/h265d_parser_test.c b/mpp/codec/dec/h265/test/h265d_parser_test.c new file mode 100644 index 00000000..287ed563 --- /dev/null +++ b/mpp/codec/dec/h265/test/h265d_parser_test.c @@ -0,0 +1,520 @@ +/* + * Copyright 2010 Rockchip Electronics S.LSI Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* +* @file h265d_parser_test.c +* @brief +* @author csy(csy@rock-chips.com) + +* @version 1.0.0 +* @history +* 2015.7.15 : Create +*/ + +#define MODULE_TAG "H265TEST" +#include "h265d_api.h" +#include "hal_h265d_api.h" + +#include "mpp_log.h" +#include +#include +#include "mpp_err.h" +#include "mpp_mem.h" +#include "mpp_frame.h" +#include "openHevcWrapper.h" +#include "mpp_buf_slot.h" +#include "rk_type.h" +#include "mpp_common.h" +#include "mpp_dec.h" +#include "h265d_api.h" +#include "hal_h265d_api.h" + + +typedef enum VPU_API_DEMO_RET { + PARSER_DEMO_OK = 0, + PARSER_DEMO_PARSE_HELP_OK = 1, + + PARSER_DEMO_ERROR_BASE = -100, + ERROR_INVALID_PARAM = PARSER_DEMO_ERROR_BASE - 1, + ERROR_INVALID_STREAM = PARSER_DEMO_ERROR_BASE - 2, + ERROR_IO = PARSER_DEMO_ERROR_BASE - 3, + ERROR_MEMORY = PARSER_DEMO_ERROR_BASE - 4, + ERROR_INIT_VPU = PARSER_DEMO_ERROR_BASE - 5, + + ERROR_VPU_DECODE = PARSER_DEMO_ERROR_BASE - 90, +} PARSER_API_DEMO_RET; + +typedef struct ParserCmd { + RK_U8* name; + RK_U8* argname; + RK_U8* help; +} ParserCmd_t; + +typedef struct parserDemoCmdContext { + RK_U32 width; + RK_U32 height; + RK_U8 input_file[200]; + RK_U8 output_file[200]; + RK_U8 have_input; + RK_U8 have_output; + RK_U8 disable_debug; + RK_U32 record_frames; + RK_S64 record_start_ms; +} ParserDemoCmdContext_t; + + +static ParserCmd_t parserCmd[] = { + {(RK_U8*)"i", (RK_U8*)"input_file", (RK_U8*)"input bitstream file"}, + {(RK_U8*)"o", (RK_U8*)"output_file", (RK_U8*)"output bitstream file, "}, + {(RK_U8*)"w", (RK_U8*)"width", (RK_U8*)"the width of input bitstream"}, + {(RK_U8*)"h", (RK_U8*)"height", (RK_U8*)"the height of input bitstream"}, + {(RK_U8*)"vframes", (RK_U8*)"number", (RK_U8*)"set the number of video frames to record"}, + {(RK_U8*)"ss", (RK_U8*)"time_off", (RK_U8*)"set the start time offset, use Ms as the unit."}, + {(RK_U8*)"d", (RK_U8*)"disable", (RK_U8*)"disable the debug output info."}, +}; + +static void show_usage() +{ + mpp_log("usage: parserDemo [options] input_file, \n\n"); + + mpp_log("Getting help:\n"); + mpp_log("-help --print options of vpu api demo\n"); +} + +static RK_S32 show_help() +{ + mpp_log("usage: parserDemo [options] input_file, \n\n"); + + RK_U32 i = 0; + RK_U32 n = sizeof(parserCmd) / sizeof(ParserCmd_t); + for (i = 0; i < n; i++) { + mpp_log("-%s %s\t\t%s\n", + parserCmd[i].name, parserCmd[i].argname, parserCmd[i].help); + } + + return 0; +} + +static RK_S32 parse_options(int argc, char **argv, ParserDemoCmdContext_t* cmdCxt) +{ + const char *opt; + RK_S32 optindex, handleoptions = 1, ret = 0; + + if ((argc < 2) || (cmdCxt == NULL)) { + mpp_log("parser demo, input parameter invalid\n"); + show_usage(); + return MPP_ERR_STREAM; + } + + /* parse options */ + optindex = 1; + while (optindex < argc) { + opt = (const char*)argv[optindex++]; + + if (handleoptions && opt[0] == '-' && opt[1] != '\0') { + if (opt[1] == '-') { + if (opt[2] != '\0') { + opt++; + } else { + handleoptions = 0; + continue; + } + } + + opt++; + + switch (*opt) { + case 'i': + if (argv[optindex]) { + memcpy(cmdCxt->input_file, argv[optindex], strlen(argv[optindex])); + cmdCxt->input_file[strlen(argv[optindex])] = '\0'; + cmdCxt->have_input = 1; + } else { + mpp_log("input file is invalid\n"); + ret = -1; + goto PARSE_OPINIONS_OUT; + } + break; + case 'o': + if (argv[optindex]) { + memcpy(cmdCxt->output_file, argv[optindex], strlen(argv[optindex])); + cmdCxt->output_file[strlen(argv[optindex])] = '\0'; + cmdCxt->have_output = 1; + break; + } else { + mpp_log("out file is invalid\n"); + ret = -1; + goto PARSE_OPINIONS_OUT; + } + case 'd': + cmdCxt->disable_debug = 1; + break; + case 'w': + if (argv[optindex]) { + cmdCxt->width = atoi(argv[optindex]); + break; + } else { + mpp_log("input width is invalid\n"); + ret = -1; + goto PARSE_OPINIONS_OUT; + } + case 'h': + if ((*(opt + 1) != '\0') && !strncmp(opt, "help", 4)) { + show_help(); + ret = PARSER_DEMO_PARSE_HELP_OK; + goto PARSE_OPINIONS_OUT; + } else if (argv[optindex]) { + cmdCxt->height = atoi(argv[optindex]); + } else { + mpp_log("input height is invalid\n"); + ret = -1; + goto PARSE_OPINIONS_OUT; + } + break; + + default: + if ((*(opt + 1) != '\0') && argv[optindex]) { + if (!strncmp(opt, "vframes", 7)) { + cmdCxt->record_frames = atoi(argv[optindex]); + } else if (!strncmp(opt, "ss", 2)) { + cmdCxt->record_start_ms = atoi(argv[optindex]); + } else { + ret = -1; + goto PARSE_OPINIONS_OUT; + } + } else { + ret = -1; + goto PARSE_OPINIONS_OUT; + } + break; + } + + optindex += ret; + } + } + +PARSE_OPINIONS_OUT: + if (ret < 0) { + mpp_log("vpu api demo, input parameter invalid\n"); + show_usage(); + return MPP_ERR_STREAM; + } + return ret; +} + + +RK_S32 find_start_code (RK_U8 *Buf, RK_S32 zeros_in_startcode) +{ + RK_S32 i; + for (i = 0; i < zeros_in_startcode; i++) + if (Buf[i] != 0) + return 0; + return Buf[i]; +} + +RK_S32 get_next_nal(FILE* inpf, unsigned char* Buf) +{ + RK_S32 pos = 0; + RK_S32 StartCodeFound = 0; + RK_S32 info2 = 0; + RK_S32 info3 = 0; + + while (!feof(inpf) && (Buf[pos++] = fgetc(inpf)) == 0); + + while (pos < 3) Buf[pos++] = fgetc(inpf); + while (!StartCodeFound) { + if (feof (inpf)) { + return pos - 1; + } + Buf[pos++] = fgetc(inpf); + info3 = find_start_code(&Buf[pos - 4], 3); + if (info3 != 1) + info2 = find_start_code(&Buf[pos - 3], 2); + StartCodeFound = (info2 == 1 || info3 == 1); + } + fseek(inpf, - 4 + info2, SEEK_CUR); + return pos - 4 + info2; +} + + +static RK_S32 poll_task(void *hal, MppBufSlots slots, HalDecTask *dec) +{ + HalTask syn; + RK_U32 i; + syn.dec = *dec; + hal_h265d_wait(hal, &syn); + mpp_err("dec->output = %d", dec->output); + mpp_buf_slot_clr_hw_dst(slots, dec->output); + for (i = 0; i < MPP_ARRAY_ELEMS(dec->refer); i++) { + RK_S32 id; + id = dec->refer[i]; + if (id >= 0) + mpp_buf_slot_dec_hw_ref(slots, id); + } + + return MPP_OK; +} + + +RK_S32 hevc_parser_test(ParserDemoCmdContext_t *cmd) +{ + FILE* pInFile = NULL; + RK_U8 * buf = NULL; + RK_S32 nal_len = 0; + void *mpp_codex_ctx = NULL; + void *hal = NULL; +// void *openHevcHandle = NULL; + MppBufSlots slots; + ParserCfg parser_cfg; + MppHalCfg hal_cfg; + MppBufferGroup mFrameGroup = NULL; + MppBufferGroup mStreamGroup = NULL; + MppPacket rkpkt = NULL; + MppFrame frame = NULL; + + MppBuffer prestrem = NULL; + MppBuffer currentstrem = NULL; + + HalDecTask *cutask = NULL; + HalDecTask *pretask = NULL; + + FILE * fp = NULL; + RK_U32 wait_task = 0; + MPP_RET ret = MPP_OK; + + if (fp == NULL) { + fp = fopen("data/dump.yuv", "wb"); + } + if (cmd->width == 0 || cmd->height == 0) { + cmd->width = 4096; + cmd->height = 2160; + } + + cutask = mpp_calloc(HalDecTask, 1); + pretask = mpp_calloc(HalDecTask, 1); + + mpp_codex_ctx = mpp_calloc(void, api_h265d_parser.ctx_size); + mpp_err("api_h265d_parser.ctx_size = %d", api_h265d_parser.ctx_size); + hal = mpp_calloc(void, hal_api_h265d.ctx_size); + if (cmd->have_input) { + mpp_log("input bitstream w: %d, h: %d, path: %s\n", + cmd->width, cmd->height, + cmd->input_file); + + mpp_log("fopen in \n"); + pInFile = fopen((const char*)cmd->input_file, "rb"); + if (pInFile == NULL) { + mpp_log("input file not exsist\n"); + return ERROR_INVALID_PARAM; + } + + mpp_log("fopen out \n"); + } else { + mpp_log("please set input bitstream file\n"); + return -1; + } + mpp_log("mallc in void * value %d \n", sizeof(void *)); + buf = mpp_malloc(RK_U8, 2048000); + mpp_buf_slot_init(&slots); + mpp_buf_slot_setup(slots, 20, cmd->width * cmd->height * 2, 0); + if (NULL == slots) { + mpp_err("could not init buffer slot\n"); + return MPP_ERR_UNKNOW; + } + if (mFrameGroup == NULL) { + ret = mpp_buffer_group_normal_get(&mFrameGroup, MPP_BUFFER_TYPE_ION); + if (MPP_OK != ret) { + mpp_err("h265d mpp_buffer_group_get failed\n"); + return ret; + } + //mpp_buffer_group_limit_config(mFrameGroup,cmd->width*cmd->height*2,20); + } + + if (mStreamGroup == NULL) { + ret = mpp_buffer_group_normal_get(&mStreamGroup, MPP_BUFFER_TYPE_ION); + if (MPP_OK != ret) { + mpp_err("h265d mpp_buffer_group_get failed\n"); + return ret; + } + } + + mpp_buffer_get(mStreamGroup, ¤tstrem, 1024 * 1024); + mpp_buffer_get(mStreamGroup, &prestrem, 2 * 1024 * 1024); + + parser_cfg.slots = slots; + hal_cfg.slots = slots; + h265d_init(mpp_codex_ctx, &parser_cfg); + hal_h265d_init(hal, &hal_cfg); + mpp_log("mallc out \n"); + if (buf == NULL) { + mpp_log("malloc fail for input buf"); + } + //buf[0] = 0; + while (!feof(pInFile)) { + nal_len = get_next_nal(pInFile, buf); + RK_U32 index; + RK_U8 *tmpbuf = buf; + void *pos = NULL; + mpp_err("get nal len from file %d", nal_len); + do { + mpp_packet_init(&rkpkt, tmpbuf, nal_len); + memset(cutask, 0, sizeof(HalDecTask)); + memset(&cutask->refer, -1, sizeof(cutask->refer)); + cutask->stmbuf = currentstrem; + h265d_prepare(mpp_codex_ctx, rkpkt, cutask); + pos = mpp_packet_get_pos(rkpkt); + if (pos < (void*)(tmpbuf + nal_len)) { + tmpbuf = pos; + nal_len = (void*)(tmpbuf + nal_len) - pos; + mpp_err("nal_len = %d", nal_len); + } else { + nal_len = 0; + } + if (cutask->valid) { + if (wait_task) { + poll_task(hal, slots, pretask); + wait_task = 0; + } + cutask->valid = 0; + h265d_parser(mpp_codex_ctx, cutask); + } + if (cutask->valid) { + HalTask syn; + syn.dec = *cutask; + mpp_buf_slot_get_hw_dst(slots, &index); + + if (NULL == mpp_buf_slot_get_buffer(slots, index)) { + MppBuffer buffer = NULL; + RK_U32 size = mpp_buf_slot_get_size(slots); + mpp_err("size = %d", size); + mpp_buffer_get(mFrameGroup, &buffer, size); + if (buffer) + mpp_buf_slot_set_buffer(slots, index, buffer); + } + + hal_h265d_gen_regs(hal, &syn); + + hal_h265d_start(hal, &syn); + { + MppBuffer tmp = NULL; + HalDecTask *task = NULL; + + tmp = currentstrem; + currentstrem = prestrem; + prestrem = tmp; + + task = cutask; + cutask = pretask; + pretask = task; + } + wait_task = 1; + } + + do { + ret = mpp_buf_slot_get_display(slots, &frame); + if (ret == MPP_OK) { + mpp_log("get_display for "); + } + if (frame) { +#if 1//def DUMP + RK_U32 stride_w, stride_h; + void *ptr = NULL; + stride_w = mpp_frame_get_hor_stride(frame); + stride_h = mpp_frame_get_ver_stride(frame); + MppBuffer framebuf = mpp_frame_get_buffer(frame); + ptr = mpp_buffer_get_ptr(framebuf); + fwrite(ptr, 1, stride_w * stride_h * 3 / 2, fp); + fflush(fp); +#endif + mpp_frame_deinit(&frame); + frame = NULL; + } + } while (ret == MPP_OK); + mpp_packet_deinit(&rkpkt); + } while ( nal_len ); + } + + if (wait_task) { + poll_task(hal, slots, pretask); + wait_task = 0; + } + h265d_flush((void*)mpp_codex_ctx); + do { + ret = mpp_buf_slot_get_display(slots, &frame); + if (ret == MPP_OK) { + mpp_log("get_display for "); + } + if (frame) { + mpp_frame_deinit(&frame); + } + } while (ret == MPP_OK); + + if (mpp_codex_ctx != NULL) { + h265d_deinit(mpp_codex_ctx); + mpp_codex_ctx = NULL; + } + + if (hal != NULL) { + mpp_err("hal_h265d_deinit in"); + hal_h265d_deinit(hal); + } + if (slots != NULL) + mpp_buf_slot_deinit(slots); + + if (mFrameGroup != NULL) { + mpp_buffer_group_put(mFrameGroup); + } + if (currentstrem) + mpp_buffer_put(currentstrem); + if (prestrem) + mpp_buffer_put(prestrem); + + if (mStreamGroup != NULL) { + mpp_buffer_group_put(mStreamGroup); + } + + mpp_free(buf); + mpp_free(mpp_codex_ctx); + mpp_free(hal); + return 0; +} + +int main(int argc, char **argv) +{ + ParserDemoCmdContext_t demoCmdCtx; + RK_S32 ret = 0; + + if (argc == 1) { + show_usage(); + mpp_log("vpu api demo complete directly\n"); + return 0; + } + + //mpp_env_set_u32("buf_slot_debug", 0x10000010, 0); + + ParserDemoCmdContext_t* cmd = &demoCmdCtx; + memset((void*)cmd, 0, sizeof(ParserDemoCmdContext_t)); + if ((ret = parse_options(argc, argv, cmd)) != 0) { + if (ret == PARSER_DEMO_PARSE_HELP_OK) { + return 0; + } + + mpp_log("parse_options fail\n\n"); + show_usage(); + return 0; + } + hevc_parser_test(cmd); + return 0; +} diff --git a/mpp/codec/dec/h265/test/openHevcWrapper.h b/mpp/codec/dec/h265/test/openHevcWrapper.h new file mode 100644 index 00000000..5777c2c3 --- /dev/null +++ b/mpp/codec/dec/h265/test/openHevcWrapper.h @@ -0,0 +1,100 @@ +/* + * openhevc.h wrapper to openhevc or ffmpeg + * Copyright (c) 2012-2013 Raulet, Wassim Hamidouche, Gildas Cocherel, Pierre Edouard Lepere + * + * This file is part of openhevc. + * + * openHevc is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * openhevc 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with openhevc; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef OPEN_HEVC_WRAPPER_H +#define OPEN_HEVC_WRAPPER_H + +#define NV_VERSION "1.2" ///< Current software version + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +typedef void* OpenHevc_Handle; + +typedef struct OpenHevc_Rational { + int num; ///< numerator + int den; ///< denominator +} OpenHevc_Rational; + +typedef struct OpenHevc_FrameInfo { + int nYPitch; + int nUPitch; + int nVPitch; + int nBitDepth; + int nWidth; + int nHeight; + int nDisplayWidth; + int nDisplayHeight; + OpenHevc_Rational sample_aspect_ratio; + OpenHevc_Rational frameRate; + int display_picture_number; + int flag; //progressive, interlaced, interlaced top field first, interlaced bottom field first. + int64_t nTimeStamp; +} OpenHevc_FrameInfo; + +typedef struct OpenHevc_Frame { + void** pvY; + void** pvU; + void** pvV; + OpenHevc_FrameInfo frameInfo; +} OpenHevc_Frame; + +typedef struct OpenHevc_Frame_cpy { + void* pvY; + void* pvU; + void* pvV; + OpenHevc_FrameInfo frameInfo; +} OpenHevc_Frame_cpy; + +OpenHevc_Handle libOpenHevcInit(int nb_pthreads, int thread_type); +int libOpenHevcStartDecoder(OpenHevc_Handle openHevcHandle); +int libOpenHevcDecode(OpenHevc_Handle openHevcHandle, const unsigned char *buff, int nal_len, int64_t pts); +void libOpenHevcGetPictureInfo(OpenHevc_Handle openHevcHandle, OpenHevc_FrameInfo *openHevcFrameInfo); +void libOpenHevcCopyExtraData(OpenHevc_Handle openHevcHandle, unsigned char *extra_data, int extra_size_alloc); + +void libOpenHevcGetPictureSize2(OpenHevc_Handle openHevcHandle, OpenHevc_FrameInfo *openHevcFrameInfo); +int libOpenHevcGetOutput(OpenHevc_Handle openHevcHandle, int got_picture, OpenHevc_Frame *openHevcFrame); +int libOpenHevcGetOutputCpy(OpenHevc_Handle openHevcHandle, int got_picture, OpenHevc_Frame_cpy *openHevcFrame); +void libOpenHevcSetCheckMD5(OpenHevc_Handle openHevcHandle, int val); +void libOpenHevcSetDebugMode(OpenHevc_Handle openHevcHandle, int val); +void libOpenHevcSetTemporalLayer_id(OpenHevc_Handle openHevcHandle, int val); +void libOpenHevcSetNoCropping(OpenHevc_Handle openHevcHandle, int val); +void libOpenHevcSetActiveDecoders(OpenHevc_Handle openHevcHandle, int val); + +void libOpenHevcClose(OpenHevc_Handle openHevcHandle); +void libOpenHevcFlush(OpenHevc_Handle openHevcHandle); +const char *libOpenHevcVersion(OpenHevc_Handle openHevcHandle); +int libOpenHevcControl(OpenHevc_Handle openHevcHandle, int cmd, void* parm); +OpenHevc_Handle libHevcParserInit(); +int libHevcParser(OpenHevc_Handle openHevcHandle, void* vpacket, void *vparsepacket); +void libHevcParserClose(OpenHevc_Handle openHevcHandle); +void libHevcParserflush(OpenHevc_Handle openHevcHandle); +void* libOpenHevcGetSliceInfo(OpenHevc_Handle openHevcHandle); + + +#ifdef __cplusplus +} +#endif + +#endif // OPEN_HEVC_WRAPPER_H diff --git a/mpp/codec/inc/h265d_api.h b/mpp/codec/inc/h265d_api.h index 33c90074..c4f6a1d2 100644 --- a/mpp/codec/inc/h265d_api.h +++ b/mpp/codec/inc/h265d_api.h @@ -16,7 +16,19 @@ #ifndef __H265D_API_H__ #define __H265D_API_H__ +#include "parser_api.h" +extern const ParserApi api_h265d_parser; +MPP_RET h265d_prepare(void *ctx, MppPacket pkt, HalDecTask *task); +MPP_RET h265d_init(void *ctx, ParserCfg *parser_cfg); +MPP_RET h265d_parser(void *ctx, HalDecTask *task); +MPP_RET h265d_deinit(void *ctx); +MPP_RET h265d_flush(void *ctx); +MPP_RET h265d_reset(void *ctx); +MPP_RET h265d_control(void *ctx, RK_S32 cmd, void *param); +RK_S32 mpp_hevc_split_frame(void *sc, + const RK_U8 **poutbuf, RK_S32 *poutbuf_size, + const RK_U8 *buf, RK_S32 buf_size); -#endif /*__H265D_API_H__*/ \ No newline at end of file +#endif /*__H265D_API_H__*/ diff --git a/mpp/codec/mpp_buf_slot.cpp b/mpp/codec/mpp_buf_slot.cpp index 2aa215a8..e89d7f18 100644 --- a/mpp/codec/mpp_buf_slot.cpp +++ b/mpp/codec/mpp_buf_slot.cpp @@ -211,7 +211,7 @@ static void slot_ops_with_log(mpp_list *logs, MppBufSlotEntry *slot, MppBufSlotO mpp_err("found invalid operation code %d\n", op); } break; } - mpp_assert((RK_S16)(status&MPP_SLOT_HW_REF_MASK) >= 0); + mpp_assert((RK_S16)(status & MPP_SLOT_HW_REF_MASK) >= 0); slot->status = status; buf_slot_dbg(BUF_SLOT_DBG_OPS_RUNTIME, "index %2d op: %s status in %08x out %08x", index, op_string[op], before, status); diff --git a/mpp/common/h265d_syntax.h b/mpp/common/h265d_syntax.h new file mode 100644 index 00000000..709fe22f --- /dev/null +++ b/mpp/common/h265d_syntax.h @@ -0,0 +1,193 @@ +/* + * + * Copyright 2010 Rockchip Electronics Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * @file h265d_syntax.h + * @brief + * @author csy(csy@rock-chips.com) + + * @version 1.0.0 + * @history + * 2015.7.15 : Create + */ +#ifndef __H265D_SYNTAX__ +#define __H265D_SYNTAX__ +typedef unsigned long DWORD; +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef unsigned long ULONG; +typedef unsigned short USHORT; +typedef unsigned char UCHAR; +typedef unsigned int UINT; +typedef unsigned int UINT32; + +typedef signed int BOOL; +typedef signed int INT; +typedef signed char CHAR; +typedef signed short SHORT; +typedef signed long LONG; +typedef void *PVOID; + +/* HEVC Picture Entry structure */ +#define MAX_SLICES 600 +typedef struct _DXVA_PicEntry_HEVC { + union { + struct { + UCHAR Index7Bits : 7; + UCHAR AssociatedFlag : 1; + }; + UCHAR bPicEntry; + }; +} DXVA_PicEntry_HEVC, *LPDXVA_PicEntry_HEVC; + +/* HEVC Picture Parameter structure */ +typedef struct _DXVA_PicParams_HEVC { + USHORT PicWidthInMinCbsY; + USHORT PicHeightInMinCbsY; + union { + struct { + USHORT chroma_format_idc : 2; + USHORT separate_colour_plane_flag : 1; + USHORT bit_depth_luma_minus8 : 3; + USHORT bit_depth_chroma_minus8 : 3; + USHORT log2_max_pic_order_cnt_lsb_minus4 : 4; + USHORT NoPicReorderingFlag : 1; + USHORT NoBiPredFlag : 1; + USHORT ReservedBits1 : 1; + }; + USHORT wFormatAndSequenceInfoFlags; + }; + DXVA_PicEntry_HEVC CurrPic; + UCHAR sps_max_dec_pic_buffering_minus1; + UCHAR log2_min_luma_coding_block_size_minus3; + UCHAR log2_diff_max_min_luma_coding_block_size; + UCHAR log2_min_transform_block_size_minus2; + UCHAR log2_diff_max_min_transform_block_size; + UCHAR max_transform_hierarchy_depth_inter; + UCHAR max_transform_hierarchy_depth_intra; + UCHAR num_short_term_ref_pic_sets; + UCHAR num_long_term_ref_pics_sps; + UCHAR num_ref_idx_l0_default_active_minus1; + UCHAR num_ref_idx_l1_default_active_minus1; + CHAR init_qp_minus26; + UCHAR ucNumDeltaPocsOfRefRpsIdx; + USHORT wNumBitsForShortTermRPSInSlice; + USHORT ReservedBits2; + + union { + struct { + UINT32 scaling_list_enabled_flag : 1; + UINT32 amp_enabled_flag : 1; + UINT32 sample_adaptive_offset_enabled_flag : 1; + UINT32 pcm_enabled_flag : 1; + UINT32 pcm_sample_bit_depth_luma_minus1 : 4; + UINT32 pcm_sample_bit_depth_chroma_minus1 : 4; + UINT32 log2_min_pcm_luma_coding_block_size_minus3 : 2; + UINT32 log2_diff_max_min_pcm_luma_coding_block_size : 2; + UINT32 pcm_loop_filter_disabled_flag : 1; + UINT32 long_term_ref_pics_present_flag : 1; + UINT32 sps_temporal_mvp_enabled_flag : 1; + UINT32 strong_intra_smoothing_enabled_flag : 1; + UINT32 dependent_slice_segments_enabled_flag : 1; + UINT32 output_flag_present_flag : 1; + UINT32 num_extra_slice_header_bits : 3; + UINT32 sign_data_hiding_enabled_flag : 1; + UINT32 cabac_init_present_flag : 1; + UINT32 ReservedBits3 : 5; + }; + UINT32 dwCodingParamToolFlags; + }; + + union { + struct { + UINT32 constrained_intra_pred_flag : 1; + UINT32 transform_skip_enabled_flag : 1; + UINT32 cu_qp_delta_enabled_flag : 1; + UINT32 pps_slice_chroma_qp_offsets_present_flag : 1; + UINT32 weighted_pred_flag : 1; + UINT32 weighted_bipred_flag : 1; + UINT32 transquant_bypass_enabled_flag : 1; + UINT32 tiles_enabled_flag : 1; + UINT32 entropy_coding_sync_enabled_flag : 1; + UINT32 uniform_spacing_flag : 1; + UINT32 loop_filter_across_tiles_enabled_flag : 1; + UINT32 pps_loop_filter_across_slices_enabled_flag : 1; + UINT32 deblocking_filter_override_enabled_flag : 1; + UINT32 pps_deblocking_filter_disabled_flag : 1; + UINT32 lists_modification_present_flag : 1; + UINT32 slice_segment_header_extension_present_flag : 1; + UINT32 IrapPicFlag : 1; + UINT32 IdrPicFlag : 1; + UINT32 IntraPicFlag : 1; + UINT32 ReservedBits4 : 13; + }; + UINT32 dwCodingSettingPicturePropertyFlags; + }; + CHAR pps_cb_qp_offset; + CHAR pps_cr_qp_offset; + UCHAR num_tile_columns_minus1; + UCHAR num_tile_rows_minus1; + USHORT column_width_minus1[19]; + USHORT row_height_minus1[21]; + UCHAR diff_cu_qp_delta_depth; + CHAR pps_beta_offset_div2; + CHAR pps_tc_offset_div2; + UCHAR log2_parallel_merge_level_minus2; + INT CurrPicOrderCntVal; + DXVA_PicEntry_HEVC RefPicList[15]; + UCHAR ReservedBits5; + INT PicOrderCntValList[15]; + UCHAR RefPicSetStCurrBefore[8]; + UCHAR RefPicSetStCurrAfter[8]; + UCHAR RefPicSetLtCurr[8]; + USHORT ReservedBits6; + USHORT ReservedBits7; + UINT StatusReportFeedbackNumber; + UINT32 vps_id; + UINT32 pps_id; + UINT32 sps_id; + UCHAR scaling_list_data_present_flag; +} DXVA_PicParams_HEVC, *LPDXVA_PicParams_HEVC; + +/* HEVC Quantizatiuon Matrix structure */ +typedef struct _DXVA_Qmatrix_HEVC { + UCHAR ucScalingLists0[6][16]; + UCHAR ucScalingLists1[6][64]; + UCHAR ucScalingLists2[6][64]; + UCHAR ucScalingLists3[2][64]; + UCHAR ucScalingListDCCoefSizeID2[6]; + UCHAR ucScalingListDCCoefSizeID3[2]; +} DXVA_Qmatrix_HEVC, *LPDXVA_Qmatrix_HEVC; + + +/* HEVC Slice Control Structure */ +typedef struct _DXVA_Slice_HEVC_Short { + UINT BSNALunitDataLocation; + UINT SliceBytesInBuffer; + USHORT wBadSliceChopping; +} DXVA_Slice_HEVC_Short, *LPDXVA_Slice_HEVC_Short; + +typedef struct h265d_dxva2_picture_context { + DXVA_PicParams_HEVC pp; + DXVA_Qmatrix_HEVC qm; + UINT32 slice_count; + DXVA_Slice_HEVC_Short slice_short[MAX_SLICES]; + const UCHAR *bitstream; + UINT32 bitstream_size; +} h265d_dxva2_picture_context_t; + +#endif /*__H265D_SYNTAX__*/ \ No newline at end of file diff --git a/mpp/hal/inc/hal_h265d_api.h b/mpp/hal/inc/hal_h265d_api.h new file mode 100644 index 00000000..2b7cd76d --- /dev/null +++ b/mpp/hal/inc/hal_h265d_api.h @@ -0,0 +1,47 @@ +/* +* +* Copyright 2015 Rockchip Electronics Co. LTD +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +#ifndef __HAL_H265D_API_H__ +#define __HAL_H265D_API_H__ + +#include "rk_type.h" +#include "mpp_err.h" +#include "mpp_hal.h" + + + +#ifdef __cplusplus +extern "C" { +#endif + +extern const MppHalApi hal_api_h265d; + +RK_S32 hal_h265d_init(void *hal, MppHalCfg *cfg); +RK_S32 hal_h265d_gen_regs(void *hal, HalTask *syn); +RK_S32 hal_h265d_deinit(void *hal); +MPP_RET hal_h265d_start(void *hal, HalTask *task); +MPP_RET hal_h265d_wait(void *hal, HalTask *task); +MPP_RET hal_h265d_reset(void *hal); +MPP_RET hal_h265d_flush(void *hal); +MPP_RET hal_h265d_control(void *hal, RK_S32 cmd_type, void *param); + +#ifdef __cplusplus +} +#endif + +#endif /*__HAL_H265D_API_H__*/ diff --git a/mpp/hal/inc/hal_task.h b/mpp/hal/inc/hal_task.h index 1abd7305..ac69f617 100644 --- a/mpp/hal/inc/hal_task.h +++ b/mpp/hal/inc/hal_task.h @@ -71,6 +71,8 @@ typedef struct HalDecTask_t { // current tesk protocol syntax information MppSyntax syntax; + MppBuffer stmbuf; + // for test purpose // current tesk output slot index RK_S32 output; diff --git a/mpp/hal/inc/vpu.h b/mpp/hal/inc/vpu.h new file mode 100644 index 00000000..1f217a5c --- /dev/null +++ b/mpp/hal/inc/vpu.h @@ -0,0 +1,129 @@ +/* + * + * Copyright 2010 Rockchip Electronics S.LSI Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __VPU_H__ +#define __VPU_H__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rk_type.h" + +#define VPU_SUCCESS (0) +#define VPU_FAILURE (-1) + +#define VPU_HW_WAIT_OK VPU_SUCCESS +#define VPU_HW_WAIT_ERROR VPU_FAILURE +#define VPU_HW_WAIT_TIMEOUT 1 + +// ½âÂëÆ÷£º60 ¸ö¼Ä´æÆ÷£¬´óС 240B +#define VPU_REG_NUM_DEC (60) +// ºó´¦Àí£º41 ¸ö¼Ä´æÆ÷£¬´óС 164B +#define VPU_REG_NUM_PP (41) +// ½âÂëÆ÷¼Óºó´¦Àí£º101 ¸ö¼Ä´æÆ÷£¬´óС 404B +#define VPU_REG_NUM_DEC_PP (VPU_REG_NUM_DEC+VPU_REG_NUM_PP) +// ±àÂëÆ÷£º96 ¸ö¼Ä´æÆ÷£¬´óС 384B +#define VPU_REG_NUM_ENC (96) + +typedef enum +{ + + VPU_ENC = 0x0, + VPU_DEC = 0x1, + VPU_PP = 0x2, + VPU_DEC_PP = 0x3, + VPU_DEC_HEVC = 0x4, + VPU_TYPE_BUTT , + +} VPU_CLIENT_TYPE; + +/* Hardware decoder configuration description */ + +typedef struct VPUHwDecConfig { + RK_U32 maxDecPicWidth; /* Maximum video decoding width supported */ + RK_U32 maxPpOutPicWidth; /* Maximum output width of Post-Processor */ + RK_U32 h264Support; /* HW supports h.264 */ + RK_U32 jpegSupport; /* HW supports JPEG */ + RK_U32 mpeg4Support; /* HW supports MPEG-4 */ + RK_U32 customMpeg4Support; /* HW supports custom MPEG-4 features */ + RK_U32 vc1Support; /* HW supports VC-1 Simple */ + RK_U32 mpeg2Support; /* HW supports MPEG-2 */ + RK_U32 ppSupport; /* HW supports post-processor */ + RK_U32 ppConfig; /* HW post-processor functions bitmask */ + RK_U32 sorensonSparkSupport; /* HW supports Sorenson Spark */ + RK_U32 refBufSupport; /* HW supports reference picture buffering */ + RK_U32 vp6Support; /* HW supports VP6 */ + RK_U32 vp7Support; /* HW supports VP7 */ + RK_U32 vp8Support; /* HW supports VP8 */ + RK_U32 avsSupport; /* HW supports AVS */ + RK_U32 jpegESupport; /* HW supports JPEG extensions */ + RK_U32 rvSupport; /* HW supports REAL */ + RK_U32 mvcSupport; /* HW supports H264 MVC extension */ +} VPUHwDecConfig_t; + +/* Hardware encoder configuration description */ + +typedef struct VPUHwEndConfig { + RK_U32 maxEncodedWidth; /* Maximum supported width for video encoding (not JPEG) */ + RK_U32 h264Enabled; /* HW supports H.264 */ + RK_U32 jpegEnabled; /* HW supports JPEG */ + RK_U32 mpeg4Enabled; /* HW supports MPEG-4 */ + RK_U32 vsEnabled; /* HW supports video stabilization */ + RK_U32 rgbEnabled; /* HW supports RGB input */ + RK_U32 reg_size; /* HW bus type in use */ + RK_U32 reserv[2]; +} VPUHwEncConfig_t; + +typedef enum { + + // common command + VPU_CMD_REGISTER , + VPU_CMD_REGISTER_ACK_OK , + VPU_CMD_REGISTER_ACK_FAIL , + VPU_CMD_UNREGISTER , + + VPU_SEND_CONFIG , + VPU_SEND_CONFIG_ACK_OK , // ËÍÅäÖóɹ¦£¬Ó²¼þ×Ô¶¯¸´Î» + VPU_SEND_CONFIG_ACK_FAIL , // ËÍÅäÖÃʧ°Ü£¬Ó²¼þ·µ»Ø´íÎó£¬Ó²¼þ×Ô¶¯¸´Î» + + VPU_GET_HW_INFO , + VPU_GET_HW_INFO_ACK_OK , + VPU_GET_HW_INFO_ACK_FAIL , + + VPU_CMD_BUTT , +} VPU_CMD_TYPE; + +int VPUClientInit(VPU_CLIENT_TYPE type); +RK_S32 VPUClientRelease(int socket); +RK_S32 VPUClientSendReg(int socket, RK_U32 *regs, RK_U32 nregs); +RK_S32 VPUClientWaitResult(int socket, RK_U32 *regs, RK_U32 nregs, VPU_CMD_TYPE *cmd, RK_S32 *len); +RK_S32 VPUClientGetHwCfg(int socket, RK_U32 *cfg, RK_U32 cfg_size); +RK_S32 VPUClientGetIOMMUStatus(); +RK_U32 VPUCheckSupportWidth(); + +void *vpu_service(void *); + +#ifdef __cplusplus +} + +#endif + +#endif /* __VPU_H__ */ + + diff --git a/mpp/hal/rkdec/h265d/CMakeLists.txt b/mpp/hal/rkdec/h265d/CMakeLists.txt index b66fe4ac..2f1ab2e5 100644 --- a/mpp/hal/rkdec/h265d/CMakeLists.txt +++ b/mpp/hal/rkdec/h265d/CMakeLists.txt @@ -1 +1,23 @@ # vim: syntax=cmake +# hal h265 reg + +set(HAL_H265D_HDR + hal_h265d_reg.h + cabac.h + ../../../common/h265d_syntax.h + ) + +set(HAL_H265D_SRC + hal_h265d_reg.c + ../../../mpp_bitread.c + ) + +set_target_properties(mpp_hal PROPERTIES FOLDER "mpp/hal") + +add_library(h265d_hal STATIC + ${HAL_H265D_SRC} ${HAL_H265D_HDR} + ) + +target_link_libraries(h265d_hal osal) + +#add_subdirectory(test) diff --git a/mpp/hal/rkdec/h265d/cabac.h b/mpp/hal/rkdec/h265d/cabac.h new file mode 100644 index 00000000..1c79a79f --- /dev/null +++ b/mpp/hal/rkdec/h265d/cabac.h @@ -0,0 +1,1751 @@ +/* + * + * Copyright 2010 Rockchip Electronics Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * @file cabac.h + * @brief + * @author csy(csy@rock-chips.com) + + * @version 1.0.0 + * @history + * 2015.7.15 : Create + */ + + +#ifndef CABAC_H +#define CABAC_H + +static RK_U8 cabac_table[27456] = { + 0x07, 0x0f, 0x48, 0x58, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0f, 0x40, 0x40, 0x40, 0x0f, 0x68, + 0x48, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x40, 0x40, 0x68, + 0x58, 0x60, 0x40, 0x1f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x48, 0x48, 0x60, 0x60, 0x50, 0x58, + 0x50, 0x07, 0x58, 0x68, 0x50, 0x58, 0x68, 0x68, 0x68, 0x68, 0x68, 0x50, 0x48, 0x68, 0x60, 0x60, + 0x50, 0x58, 0x50, 0x07, 0x58, 0x68, 0x50, 0x58, 0x68, 0x68, 0x68, 0x68, 0x68, 0x50, 0x48, 0x68, + 0x48, 0x48, 0x1f, 0x58, 0x68, 0x68, 0x58, 0x60, 0x60, 0x60, 0x50, 0x50, 0x50, 0x48, 0x58, 0x58, + 0x37, 0x07, 0x58, 0x48, 0x58, 0x58, 0x37, 0x07, 0x58, 0x48, 0x58, 0x58, 0x37, 0x07, 0x58, 0x50, + 0x48, 0x1f, 0x1f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x0f, 0x48, 0x68, 0x0f, 0x48, 0x68, 0x40, 0x40, + 0x50, 0x50, 0x07, 0x40, 0x50, 0x0f, 0x40, 0x48, 0x07, 0x40, 0x27, 0x50, 0x48, 0x48, 0x40, 0x0f, + 0x50, 0x37, 0x1f, 0x1f, 0x50, 0x37, 0x40, 0x27, 0x40, 0x07, 0x0f, 0x17, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x0f, 0x47, 0x57, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0f, 0x40, 0x40, 0x40, 0x0f, 0x66, + 0x47, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x00, 0x00, 0x67, + 0x57, 0x5e, 0x00, 0x1f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x47, 0x47, 0x5f, 0x5f, 0x4f, 0x57, + 0x4f, 0x07, 0x57, 0x67, 0x4f, 0x57, 0x67, 0x67, 0x67, 0x67, 0x66, 0x4f, 0x47, 0x66, 0x5f, 0x5f, + 0x4f, 0x57, 0x4f, 0x07, 0x57, 0x67, 0x4f, 0x57, 0x67, 0x67, 0x67, 0x67, 0x66, 0x4f, 0x47, 0x66, + 0x46, 0x48, 0x20, 0x57, 0x67, 0x67, 0x57, 0x5f, 0x5f, 0x5e, 0x4f, 0x4f, 0x4f, 0x47, 0x57, 0x57, + 0x37, 0x07, 0x57, 0x47, 0x57, 0x57, 0x37, 0x07, 0x57, 0x47, 0x57, 0x57, 0x37, 0x07, 0x57, 0x4f, + 0x47, 0x1f, 0x1f, 0x0f, 0x10, 0x0f, 0x10, 0x07, 0x10, 0x47, 0x67, 0x10, 0x47, 0x67, 0x40, 0x40, + 0x4f, 0x4e, 0x08, 0x00, 0x4f, 0x0f, 0x00, 0x47, 0x07, 0x01, 0x27, 0x4e, 0x47, 0x47, 0x00, 0x0f, + 0x4f, 0x37, 0x1f, 0x1f, 0x4f, 0x36, 0x00, 0x27, 0x00, 0x07, 0x10, 0x17, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x0e, 0x47, 0x57, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0e, 0x40, 0x40, 0x40, 0x0e, 0x64, + 0x47, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x00, 0x00, 0x66, + 0x57, 0x5d, 0x00, 0x1e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x47, 0x47, 0x5e, 0x5e, 0x4e, 0x56, + 0x4f, 0x07, 0x56, 0x66, 0x4f, 0x56, 0x66, 0x67, 0x66, 0x66, 0x64, 0x4e, 0x46, 0x64, 0x5e, 0x5e, + 0x4e, 0x56, 0x4f, 0x07, 0x56, 0x66, 0x4f, 0x56, 0x66, 0x67, 0x66, 0x66, 0x64, 0x4e, 0x46, 0x64, + 0x45, 0x48, 0x20, 0x57, 0x66, 0x66, 0x56, 0x5e, 0x5e, 0x5d, 0x4e, 0x4e, 0x4e, 0x46, 0x56, 0x57, + 0x36, 0x07, 0x56, 0x46, 0x56, 0x57, 0x36, 0x07, 0x56, 0x46, 0x56, 0x57, 0x36, 0x07, 0x56, 0x4f, + 0x47, 0x1e, 0x1e, 0x0f, 0x10, 0x0f, 0x10, 0x07, 0x10, 0x47, 0x66, 0x10, 0x47, 0x66, 0x40, 0x40, + 0x4f, 0x4d, 0x08, 0x00, 0x4f, 0x0f, 0x00, 0x47, 0x07, 0x03, 0x27, 0x4d, 0x47, 0x46, 0x01, 0x0f, + 0x4f, 0x36, 0x1f, 0x1e, 0x4f, 0x34, 0x01, 0x26, 0x00, 0x07, 0x10, 0x17, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x0d, 0x47, 0x57, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0e, 0x40, 0x40, 0x40, 0x0e, 0x62, + 0x47, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x00, 0x00, 0x65, + 0x57, 0x5c, 0x00, 0x1e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x47, 0x47, 0x5d, 0x5d, 0x4e, 0x56, + 0x4f, 0x07, 0x56, 0x66, 0x4f, 0x55, 0x65, 0x67, 0x66, 0x65, 0x63, 0x4d, 0x46, 0x62, 0x5d, 0x5d, + 0x4e, 0x56, 0x4f, 0x07, 0x56, 0x66, 0x4f, 0x55, 0x65, 0x67, 0x66, 0x65, 0x63, 0x4d, 0x46, 0x62, + 0x44, 0x48, 0x20, 0x57, 0x65, 0x65, 0x56, 0x5d, 0x5d, 0x5c, 0x4e, 0x4d, 0x4e, 0x45, 0x56, 0x57, + 0x36, 0x07, 0x56, 0x45, 0x56, 0x57, 0x36, 0x07, 0x56, 0x45, 0x56, 0x57, 0x36, 0x07, 0x56, 0x4f, + 0x47, 0x1e, 0x1e, 0x0f, 0x10, 0x0f, 0x10, 0x07, 0x10, 0x47, 0x65, 0x10, 0x47, 0x65, 0x40, 0x40, + 0x4f, 0x4c, 0x08, 0x00, 0x4f, 0x0f, 0x00, 0x47, 0x07, 0x04, 0x27, 0x4c, 0x47, 0x45, 0x01, 0x0f, + 0x4f, 0x36, 0x1f, 0x1e, 0x4f, 0x33, 0x01, 0x25, 0x00, 0x07, 0x10, 0x17, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x0c, 0x46, 0x56, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0d, 0x40, 0x40, 0x40, 0x0d, 0x60, + 0x46, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x01, 0x01, 0x64, + 0x56, 0x5b, 0x01, 0x1d, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x46, 0x46, 0x5c, 0x5c, 0x4d, 0x55, + 0x4e, 0x07, 0x55, 0x65, 0x4e, 0x54, 0x64, 0x66, 0x65, 0x64, 0x61, 0x4c, 0x45, 0x60, 0x5c, 0x5c, + 0x4d, 0x55, 0x4e, 0x07, 0x55, 0x65, 0x4e, 0x54, 0x64, 0x66, 0x65, 0x64, 0x61, 0x4c, 0x45, 0x60, + 0x43, 0x49, 0x21, 0x56, 0x64, 0x64, 0x55, 0x5c, 0x5c, 0x5b, 0x4d, 0x4c, 0x4d, 0x44, 0x55, 0x56, + 0x35, 0x07, 0x55, 0x44, 0x55, 0x56, 0x35, 0x07, 0x55, 0x44, 0x55, 0x56, 0x35, 0x07, 0x55, 0x4e, + 0x46, 0x1d, 0x1d, 0x0f, 0x11, 0x0f, 0x11, 0x07, 0x11, 0x46, 0x64, 0x11, 0x46, 0x64, 0x40, 0x40, + 0x4e, 0x4b, 0x09, 0x01, 0x4e, 0x0f, 0x01, 0x46, 0x07, 0x06, 0x27, 0x4b, 0x46, 0x44, 0x02, 0x0f, + 0x4e, 0x35, 0x1e, 0x1d, 0x4e, 0x31, 0x02, 0x24, 0x01, 0x07, 0x11, 0x16, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x0b, 0x46, 0x56, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0c, 0x40, 0x40, 0x40, 0x0c, 0x5e, + 0x46, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x01, 0x01, 0x63, + 0x56, 0x59, 0x01, 0x1c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x46, 0x46, 0x5b, 0x5b, 0x4c, 0x54, + 0x4e, 0x07, 0x54, 0x64, 0x4e, 0x53, 0x63, 0x66, 0x64, 0x63, 0x60, 0x4b, 0x44, 0x5e, 0x5b, 0x5b, + 0x4c, 0x54, 0x4e, 0x07, 0x54, 0x64, 0x4e, 0x53, 0x63, 0x66, 0x64, 0x63, 0x60, 0x4b, 0x44, 0x5e, + 0x41, 0x49, 0x21, 0x56, 0x63, 0x63, 0x54, 0x5b, 0x5b, 0x59, 0x4c, 0x4b, 0x4c, 0x43, 0x54, 0x56, + 0x34, 0x07, 0x54, 0x43, 0x54, 0x56, 0x34, 0x07, 0x54, 0x43, 0x54, 0x56, 0x34, 0x07, 0x54, 0x4e, + 0x46, 0x1c, 0x1c, 0x0f, 0x11, 0x0f, 0x11, 0x07, 0x11, 0x46, 0x63, 0x11, 0x46, 0x63, 0x40, 0x40, + 0x4e, 0x49, 0x09, 0x01, 0x4e, 0x0f, 0x01, 0x46, 0x07, 0x07, 0x27, 0x49, 0x46, 0x43, 0x03, 0x0f, + 0x4e, 0x34, 0x1e, 0x1c, 0x4e, 0x30, 0x03, 0x23, 0x01, 0x07, 0x11, 0x16, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x0a, 0x46, 0x56, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0c, 0x40, 0x40, 0x40, 0x0c, 0x5c, + 0x46, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x01, 0x01, 0x62, + 0x56, 0x58, 0x01, 0x1c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x46, 0x46, 0x5a, 0x5a, 0x4c, 0x54, + 0x4e, 0x07, 0x54, 0x64, 0x4e, 0x52, 0x62, 0x66, 0x64, 0x62, 0x5e, 0x4a, 0x44, 0x5c, 0x5a, 0x5a, + 0x4c, 0x54, 0x4e, 0x07, 0x54, 0x64, 0x4e, 0x52, 0x62, 0x66, 0x64, 0x62, 0x5e, 0x4a, 0x44, 0x5c, + 0x40, 0x49, 0x21, 0x56, 0x62, 0x62, 0x54, 0x5a, 0x5a, 0x58, 0x4c, 0x4a, 0x4c, 0x42, 0x54, 0x56, + 0x34, 0x07, 0x54, 0x42, 0x54, 0x56, 0x34, 0x07, 0x54, 0x42, 0x54, 0x56, 0x34, 0x07, 0x54, 0x4e, + 0x46, 0x1c, 0x1c, 0x0f, 0x11, 0x0f, 0x11, 0x07, 0x11, 0x46, 0x62, 0x11, 0x46, 0x62, 0x40, 0x40, + 0x4e, 0x48, 0x09, 0x01, 0x4e, 0x0f, 0x01, 0x46, 0x07, 0x09, 0x27, 0x48, 0x46, 0x42, 0x03, 0x0f, + 0x4e, 0x34, 0x1e, 0x1c, 0x4e, 0x2e, 0x03, 0x22, 0x01, 0x07, 0x11, 0x16, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x09, 0x45, 0x55, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0b, 0x40, 0x40, 0x40, 0x0b, 0x5a, + 0x45, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x02, 0x02, 0x61, + 0x55, 0x57, 0x02, 0x1b, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x45, 0x45, 0x59, 0x59, 0x4b, 0x53, + 0x4d, 0x07, 0x53, 0x63, 0x4d, 0x51, 0x61, 0x65, 0x63, 0x61, 0x5d, 0x49, 0x43, 0x5a, 0x59, 0x59, + 0x4b, 0x53, 0x4d, 0x07, 0x53, 0x63, 0x4d, 0x51, 0x61, 0x65, 0x63, 0x61, 0x5d, 0x49, 0x43, 0x5a, + 0x00, 0x4a, 0x22, 0x55, 0x61, 0x61, 0x53, 0x59, 0x59, 0x57, 0x4b, 0x49, 0x4b, 0x41, 0x53, 0x55, + 0x33, 0x07, 0x53, 0x41, 0x53, 0x55, 0x33, 0x07, 0x53, 0x41, 0x53, 0x55, 0x33, 0x07, 0x53, 0x4d, + 0x45, 0x1b, 0x1b, 0x0f, 0x12, 0x0f, 0x12, 0x07, 0x12, 0x45, 0x61, 0x12, 0x45, 0x61, 0x40, 0x40, + 0x4d, 0x47, 0x0a, 0x02, 0x4d, 0x0f, 0x02, 0x45, 0x07, 0x0a, 0x27, 0x47, 0x45, 0x41, 0x04, 0x0f, + 0x4d, 0x33, 0x1d, 0x1b, 0x4d, 0x2d, 0x04, 0x21, 0x02, 0x07, 0x12, 0x15, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x08, 0x45, 0x55, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0a, 0x40, 0x40, 0x40, 0x0a, 0x59, + 0x45, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x02, 0x02, 0x60, + 0x55, 0x56, 0x02, 0x1a, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x45, 0x45, 0x58, 0x58, 0x4b, 0x53, + 0x4d, 0x07, 0x53, 0x63, 0x4d, 0x50, 0x60, 0x65, 0x63, 0x60, 0x5b, 0x48, 0x43, 0x59, 0x58, 0x58, + 0x4b, 0x53, 0x4d, 0x07, 0x53, 0x63, 0x4d, 0x50, 0x60, 0x65, 0x63, 0x60, 0x5b, 0x48, 0x43, 0x59, + 0x01, 0x4a, 0x22, 0x55, 0x60, 0x60, 0x53, 0x58, 0x58, 0x56, 0x4b, 0x48, 0x4b, 0x40, 0x53, 0x55, + 0x32, 0x07, 0x53, 0x40, 0x53, 0x55, 0x32, 0x07, 0x53, 0x40, 0x53, 0x55, 0x32, 0x07, 0x53, 0x4d, + 0x45, 0x1a, 0x1a, 0x0f, 0x12, 0x0f, 0x12, 0x07, 0x12, 0x45, 0x60, 0x12, 0x45, 0x60, 0x40, 0x40, + 0x4d, 0x46, 0x0a, 0x02, 0x4d, 0x0f, 0x02, 0x45, 0x07, 0x0c, 0x27, 0x46, 0x45, 0x40, 0x04, 0x0f, + 0x4d, 0x32, 0x1d, 0x1a, 0x4d, 0x2b, 0x04, 0x20, 0x02, 0x07, 0x12, 0x15, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x07, 0x45, 0x55, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0a, 0x40, 0x40, 0x40, 0x0a, 0x57, + 0x45, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x02, 0x02, 0x5f, + 0x55, 0x54, 0x02, 0x1a, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x45, 0x45, 0x57, 0x57, 0x4a, 0x52, + 0x4d, 0x07, 0x52, 0x62, 0x4d, 0x4f, 0x5f, 0x65, 0x62, 0x5f, 0x59, 0x47, 0x42, 0x57, 0x57, 0x57, + 0x4a, 0x52, 0x4d, 0x07, 0x52, 0x62, 0x4d, 0x4f, 0x5f, 0x65, 0x62, 0x5f, 0x59, 0x47, 0x42, 0x57, + 0x03, 0x4a, 0x22, 0x55, 0x5f, 0x5f, 0x52, 0x57, 0x57, 0x54, 0x4a, 0x47, 0x4a, 0x00, 0x52, 0x55, + 0x32, 0x07, 0x52, 0x00, 0x52, 0x55, 0x32, 0x07, 0x52, 0x00, 0x52, 0x55, 0x32, 0x07, 0x52, 0x4d, + 0x45, 0x1a, 0x1a, 0x0f, 0x12, 0x0f, 0x12, 0x07, 0x12, 0x45, 0x5f, 0x12, 0x45, 0x5f, 0x40, 0x40, + 0x4d, 0x44, 0x0a, 0x02, 0x4d, 0x0f, 0x02, 0x45, 0x07, 0x0e, 0x27, 0x44, 0x45, 0x00, 0x05, 0x0f, + 0x4d, 0x32, 0x1d, 0x1a, 0x4d, 0x29, 0x05, 0x1f, 0x02, 0x07, 0x12, 0x15, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x06, 0x44, 0x54, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x09, 0x40, 0x40, 0x40, 0x09, 0x55, + 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x03, 0x03, 0x5e, + 0x54, 0x53, 0x03, 0x19, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x56, 0x56, 0x49, 0x51, + 0x4c, 0x07, 0x51, 0x61, 0x4c, 0x4e, 0x5e, 0x64, 0x61, 0x5e, 0x58, 0x46, 0x41, 0x55, 0x56, 0x56, + 0x49, 0x51, 0x4c, 0x07, 0x51, 0x61, 0x4c, 0x4e, 0x5e, 0x64, 0x61, 0x5e, 0x58, 0x46, 0x41, 0x55, + 0x04, 0x4b, 0x23, 0x54, 0x5e, 0x5e, 0x51, 0x56, 0x56, 0x53, 0x49, 0x46, 0x49, 0x01, 0x51, 0x54, + 0x31, 0x07, 0x51, 0x01, 0x51, 0x54, 0x31, 0x07, 0x51, 0x01, 0x51, 0x54, 0x31, 0x07, 0x51, 0x4c, + 0x44, 0x19, 0x19, 0x0f, 0x13, 0x0f, 0x13, 0x07, 0x13, 0x44, 0x5e, 0x13, 0x44, 0x5e, 0x40, 0x40, + 0x4c, 0x43, 0x0b, 0x03, 0x4c, 0x0f, 0x03, 0x44, 0x07, 0x0f, 0x27, 0x43, 0x44, 0x01, 0x06, 0x0f, + 0x4c, 0x31, 0x1c, 0x19, 0x4c, 0x28, 0x06, 0x1e, 0x03, 0x07, 0x13, 0x14, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x05, 0x44, 0x54, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x09, 0x40, 0x40, 0x40, 0x09, 0x53, + 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x03, 0x03, 0x5d, + 0x54, 0x52, 0x03, 0x19, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x55, 0x55, 0x49, 0x51, + 0x4c, 0x07, 0x51, 0x61, 0x4c, 0x4d, 0x5d, 0x64, 0x61, 0x5d, 0x56, 0x45, 0x41, 0x53, 0x55, 0x55, + 0x49, 0x51, 0x4c, 0x07, 0x51, 0x61, 0x4c, 0x4d, 0x5d, 0x64, 0x61, 0x5d, 0x56, 0x45, 0x41, 0x53, + 0x05, 0x4b, 0x23, 0x54, 0x5d, 0x5d, 0x51, 0x55, 0x55, 0x52, 0x49, 0x45, 0x49, 0x02, 0x51, 0x54, + 0x31, 0x07, 0x51, 0x02, 0x51, 0x54, 0x31, 0x07, 0x51, 0x02, 0x51, 0x54, 0x31, 0x07, 0x51, 0x4c, + 0x44, 0x19, 0x19, 0x0f, 0x13, 0x0f, 0x13, 0x07, 0x13, 0x44, 0x5d, 0x13, 0x44, 0x5d, 0x40, 0x40, + 0x4c, 0x42, 0x0b, 0x03, 0x4c, 0x0f, 0x03, 0x44, 0x07, 0x11, 0x27, 0x42, 0x44, 0x02, 0x06, 0x0f, + 0x4c, 0x31, 0x1c, 0x19, 0x4c, 0x26, 0x06, 0x1d, 0x03, 0x07, 0x13, 0x14, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x04, 0x44, 0x54, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x08, 0x40, 0x40, 0x40, 0x08, 0x51, + 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x03, 0x03, 0x5c, + 0x54, 0x51, 0x03, 0x18, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x54, 0x54, 0x48, 0x50, + 0x4c, 0x07, 0x50, 0x60, 0x4c, 0x4c, 0x5c, 0x64, 0x60, 0x5c, 0x55, 0x44, 0x40, 0x51, 0x54, 0x54, + 0x48, 0x50, 0x4c, 0x07, 0x50, 0x60, 0x4c, 0x4c, 0x5c, 0x64, 0x60, 0x5c, 0x55, 0x44, 0x40, 0x51, + 0x06, 0x4b, 0x23, 0x54, 0x5c, 0x5c, 0x50, 0x54, 0x54, 0x51, 0x48, 0x44, 0x48, 0x03, 0x50, 0x54, + 0x30, 0x07, 0x50, 0x03, 0x50, 0x54, 0x30, 0x07, 0x50, 0x03, 0x50, 0x54, 0x30, 0x07, 0x50, 0x4c, + 0x44, 0x18, 0x18, 0x0f, 0x13, 0x0f, 0x13, 0x07, 0x13, 0x44, 0x5c, 0x13, 0x44, 0x5c, 0x40, 0x40, + 0x4c, 0x41, 0x0b, 0x03, 0x4c, 0x0f, 0x03, 0x44, 0x07, 0x12, 0x27, 0x41, 0x44, 0x03, 0x07, 0x0f, + 0x4c, 0x30, 0x1c, 0x18, 0x4c, 0x25, 0x07, 0x1c, 0x03, 0x07, 0x13, 0x14, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x03, 0x43, 0x53, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x40, 0x40, 0x40, 0x07, 0x4f, + 0x43, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x04, 0x04, 0x5b, + 0x53, 0x4f, 0x04, 0x17, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x43, 0x43, 0x53, 0x53, 0x47, 0x4f, + 0x4b, 0x07, 0x4f, 0x5f, 0x4b, 0x4b, 0x5b, 0x63, 0x5f, 0x5b, 0x53, 0x43, 0x00, 0x4f, 0x53, 0x53, + 0x47, 0x4f, 0x4b, 0x07, 0x4f, 0x5f, 0x4b, 0x4b, 0x5b, 0x63, 0x5f, 0x5b, 0x53, 0x43, 0x00, 0x4f, + 0x08, 0x4c, 0x24, 0x53, 0x5b, 0x5b, 0x4f, 0x53, 0x53, 0x4f, 0x47, 0x43, 0x47, 0x04, 0x4f, 0x53, + 0x2f, 0x07, 0x4f, 0x04, 0x4f, 0x53, 0x2f, 0x07, 0x4f, 0x04, 0x4f, 0x53, 0x2f, 0x07, 0x4f, 0x4b, + 0x43, 0x17, 0x17, 0x0f, 0x14, 0x0f, 0x14, 0x07, 0x14, 0x43, 0x5b, 0x14, 0x43, 0x5b, 0x40, 0x40, + 0x4b, 0x00, 0x0c, 0x04, 0x4b, 0x0f, 0x04, 0x43, 0x07, 0x14, 0x27, 0x00, 0x43, 0x04, 0x08, 0x0f, + 0x4b, 0x2f, 0x1b, 0x17, 0x4b, 0x23, 0x08, 0x1b, 0x04, 0x07, 0x14, 0x13, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x02, 0x43, 0x53, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x40, 0x40, 0x40, 0x07, 0x4d, + 0x43, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x04, 0x04, 0x5a, + 0x53, 0x4e, 0x04, 0x17, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x43, 0x43, 0x52, 0x52, 0x47, 0x4f, + 0x4b, 0x07, 0x4f, 0x5f, 0x4b, 0x4a, 0x5a, 0x63, 0x5f, 0x5a, 0x52, 0x42, 0x00, 0x4d, 0x52, 0x52, + 0x47, 0x4f, 0x4b, 0x07, 0x4f, 0x5f, 0x4b, 0x4a, 0x5a, 0x63, 0x5f, 0x5a, 0x52, 0x42, 0x00, 0x4d, + 0x09, 0x4c, 0x24, 0x53, 0x5a, 0x5a, 0x4f, 0x52, 0x52, 0x4e, 0x47, 0x42, 0x47, 0x05, 0x4f, 0x53, + 0x2f, 0x07, 0x4f, 0x05, 0x4f, 0x53, 0x2f, 0x07, 0x4f, 0x05, 0x4f, 0x53, 0x2f, 0x07, 0x4f, 0x4b, + 0x43, 0x17, 0x17, 0x0f, 0x14, 0x0f, 0x14, 0x07, 0x14, 0x43, 0x5a, 0x14, 0x43, 0x5a, 0x40, 0x40, + 0x4b, 0x01, 0x0c, 0x04, 0x4b, 0x0f, 0x04, 0x43, 0x07, 0x15, 0x27, 0x01, 0x43, 0x05, 0x08, 0x0f, + 0x4b, 0x2f, 0x1b, 0x17, 0x4b, 0x22, 0x08, 0x1a, 0x04, 0x07, 0x14, 0x13, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x01, 0x43, 0x53, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x06, 0x40, 0x40, 0x40, 0x06, 0x4b, + 0x43, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x04, 0x04, 0x59, + 0x53, 0x4d, 0x04, 0x16, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x43, 0x43, 0x51, 0x51, 0x46, 0x4e, + 0x4b, 0x07, 0x4e, 0x5e, 0x4b, 0x49, 0x59, 0x63, 0x5e, 0x59, 0x50, 0x41, 0x01, 0x4b, 0x51, 0x51, + 0x46, 0x4e, 0x4b, 0x07, 0x4e, 0x5e, 0x4b, 0x49, 0x59, 0x63, 0x5e, 0x59, 0x50, 0x41, 0x01, 0x4b, + 0x0a, 0x4c, 0x24, 0x53, 0x59, 0x59, 0x4e, 0x51, 0x51, 0x4d, 0x46, 0x41, 0x46, 0x06, 0x4e, 0x53, + 0x2e, 0x07, 0x4e, 0x06, 0x4e, 0x53, 0x2e, 0x07, 0x4e, 0x06, 0x4e, 0x53, 0x2e, 0x07, 0x4e, 0x4b, + 0x43, 0x16, 0x16, 0x0f, 0x14, 0x0f, 0x14, 0x07, 0x14, 0x43, 0x59, 0x14, 0x43, 0x59, 0x40, 0x40, + 0x4b, 0x02, 0x0c, 0x04, 0x4b, 0x0f, 0x04, 0x43, 0x07, 0x17, 0x27, 0x02, 0x43, 0x06, 0x09, 0x0f, + 0x4b, 0x2e, 0x1b, 0x16, 0x4b, 0x20, 0x09, 0x19, 0x04, 0x07, 0x14, 0x13, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x43, 0x53, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x05, 0x40, 0x40, 0x40, 0x05, 0x4a, + 0x43, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x04, 0x04, 0x59, + 0x53, 0x4c, 0x04, 0x15, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x43, 0x43, 0x51, 0x51, 0x46, 0x4e, + 0x4b, 0x07, 0x4e, 0x5e, 0x4b, 0x49, 0x59, 0x63, 0x5e, 0x59, 0x4f, 0x41, 0x01, 0x4a, 0x51, 0x51, + 0x46, 0x4e, 0x4b, 0x07, 0x4e, 0x5e, 0x4b, 0x49, 0x59, 0x63, 0x5e, 0x59, 0x4f, 0x41, 0x01, 0x4a, + 0x0b, 0x4d, 0x24, 0x53, 0x59, 0x59, 0x4e, 0x51, 0x51, 0x4c, 0x46, 0x41, 0x46, 0x06, 0x4e, 0x53, + 0x2d, 0x07, 0x4e, 0x06, 0x4e, 0x53, 0x2d, 0x07, 0x4e, 0x06, 0x4e, 0x53, 0x2d, 0x07, 0x4e, 0x4b, + 0x43, 0x15, 0x15, 0x0f, 0x14, 0x0f, 0x14, 0x07, 0x14, 0x43, 0x59, 0x14, 0x43, 0x59, 0x40, 0x40, + 0x4b, 0x03, 0x0c, 0x04, 0x4b, 0x0f, 0x04, 0x43, 0x07, 0x18, 0x27, 0x03, 0x43, 0x06, 0x09, 0x0f, + 0x4b, 0x2d, 0x1a, 0x15, 0x4b, 0x1e, 0x09, 0x18, 0x04, 0x07, 0x14, 0x12, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x42, 0x52, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x05, 0x40, 0x40, 0x40, 0x05, 0x48, + 0x42, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x05, 0x05, 0x58, + 0x52, 0x4a, 0x05, 0x15, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x42, 0x50, 0x50, 0x45, 0x4d, + 0x4a, 0x07, 0x4d, 0x5d, 0x4a, 0x48, 0x58, 0x62, 0x5d, 0x58, 0x4d, 0x40, 0x02, 0x48, 0x50, 0x50, + 0x45, 0x4d, 0x4a, 0x07, 0x4d, 0x5d, 0x4a, 0x48, 0x58, 0x62, 0x5d, 0x58, 0x4d, 0x40, 0x02, 0x48, + 0x0d, 0x4d, 0x25, 0x52, 0x58, 0x58, 0x4d, 0x50, 0x50, 0x4a, 0x45, 0x40, 0x45, 0x07, 0x4d, 0x52, + 0x2d, 0x07, 0x4d, 0x07, 0x4d, 0x52, 0x2d, 0x07, 0x4d, 0x07, 0x4d, 0x52, 0x2d, 0x07, 0x4d, 0x4a, + 0x42, 0x15, 0x15, 0x0f, 0x15, 0x0f, 0x15, 0x07, 0x15, 0x42, 0x58, 0x15, 0x42, 0x58, 0x40, 0x40, + 0x4a, 0x05, 0x0d, 0x05, 0x4a, 0x0f, 0x05, 0x42, 0x07, 0x1a, 0x27, 0x05, 0x42, 0x07, 0x0a, 0x0f, + 0x4a, 0x2d, 0x1a, 0x15, 0x4a, 0x1d, 0x0a, 0x18, 0x05, 0x07, 0x15, 0x12, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x40, 0x42, 0x52, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, 0x40, 0x04, 0x46, + 0x42, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x05, 0x05, 0x57, + 0x52, 0x49, 0x05, 0x14, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4f, 0x4f, 0x44, 0x4c, + 0x4a, 0x07, 0x4c, 0x5c, 0x4a, 0x47, 0x57, 0x62, 0x5c, 0x57, 0x4b, 0x00, 0x03, 0x46, 0x4f, 0x4f, + 0x44, 0x4c, 0x4a, 0x07, 0x4c, 0x5c, 0x4a, 0x47, 0x57, 0x62, 0x5c, 0x57, 0x4b, 0x00, 0x03, 0x46, + 0x0e, 0x4d, 0x25, 0x52, 0x57, 0x57, 0x4c, 0x4f, 0x4f, 0x49, 0x44, 0x00, 0x44, 0x08, 0x4c, 0x52, + 0x2c, 0x07, 0x4c, 0x08, 0x4c, 0x52, 0x2c, 0x07, 0x4c, 0x08, 0x4c, 0x52, 0x2c, 0x07, 0x4c, 0x4a, + 0x42, 0x14, 0x14, 0x0f, 0x15, 0x0f, 0x15, 0x07, 0x15, 0x42, 0x57, 0x15, 0x42, 0x57, 0x40, 0x40, + 0x4a, 0x06, 0x0d, 0x05, 0x4a, 0x0f, 0x05, 0x42, 0x07, 0x1c, 0x27, 0x06, 0x42, 0x08, 0x0b, 0x0f, + 0x4a, 0x2c, 0x1a, 0x14, 0x4a, 0x1b, 0x0b, 0x17, 0x05, 0x07, 0x15, 0x12, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x41, 0x42, 0x52, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, 0x40, 0x04, 0x44, + 0x42, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x05, 0x05, 0x56, + 0x52, 0x48, 0x05, 0x14, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4e, 0x4e, 0x44, 0x4c, + 0x4a, 0x07, 0x4c, 0x5c, 0x4a, 0x46, 0x56, 0x62, 0x5c, 0x56, 0x4a, 0x01, 0x03, 0x44, 0x4e, 0x4e, + 0x44, 0x4c, 0x4a, 0x07, 0x4c, 0x5c, 0x4a, 0x46, 0x56, 0x62, 0x5c, 0x56, 0x4a, 0x01, 0x03, 0x44, + 0x0f, 0x4d, 0x25, 0x52, 0x56, 0x56, 0x4c, 0x4e, 0x4e, 0x48, 0x44, 0x01, 0x44, 0x09, 0x4c, 0x52, + 0x2c, 0x07, 0x4c, 0x09, 0x4c, 0x52, 0x2c, 0x07, 0x4c, 0x09, 0x4c, 0x52, 0x2c, 0x07, 0x4c, 0x4a, + 0x42, 0x14, 0x14, 0x0f, 0x15, 0x0f, 0x15, 0x07, 0x15, 0x42, 0x56, 0x15, 0x42, 0x56, 0x40, 0x40, + 0x4a, 0x07, 0x0d, 0x05, 0x4a, 0x0f, 0x05, 0x42, 0x07, 0x1d, 0x27, 0x07, 0x42, 0x09, 0x0b, 0x0f, + 0x4a, 0x2c, 0x1a, 0x14, 0x4a, 0x1a, 0x0b, 0x16, 0x05, 0x07, 0x15, 0x12, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x42, 0x41, 0x51, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x03, 0x40, 0x40, 0x40, 0x03, 0x42, + 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x06, 0x06, 0x55, + 0x51, 0x47, 0x06, 0x13, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4d, 0x4d, 0x43, 0x4b, + 0x49, 0x07, 0x4b, 0x5b, 0x49, 0x45, 0x55, 0x61, 0x5b, 0x55, 0x48, 0x02, 0x04, 0x42, 0x4d, 0x4d, + 0x43, 0x4b, 0x49, 0x07, 0x4b, 0x5b, 0x49, 0x45, 0x55, 0x61, 0x5b, 0x55, 0x48, 0x02, 0x04, 0x42, + 0x10, 0x4e, 0x26, 0x51, 0x55, 0x55, 0x4b, 0x4d, 0x4d, 0x47, 0x43, 0x02, 0x43, 0x0a, 0x4b, 0x51, + 0x2b, 0x07, 0x4b, 0x0a, 0x4b, 0x51, 0x2b, 0x07, 0x4b, 0x0a, 0x4b, 0x51, 0x2b, 0x07, 0x4b, 0x49, + 0x41, 0x13, 0x13, 0x0f, 0x16, 0x0f, 0x16, 0x07, 0x16, 0x41, 0x55, 0x16, 0x41, 0x55, 0x40, 0x40, + 0x49, 0x08, 0x0e, 0x06, 0x49, 0x0f, 0x06, 0x41, 0x07, 0x1f, 0x27, 0x08, 0x41, 0x0a, 0x0c, 0x0f, + 0x49, 0x2b, 0x19, 0x13, 0x49, 0x18, 0x0c, 0x15, 0x06, 0x07, 0x16, 0x11, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x43, 0x41, 0x51, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x02, 0x40, 0x40, 0x40, 0x02, 0x40, + 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x06, 0x06, 0x54, + 0x51, 0x45, 0x06, 0x12, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4c, 0x4c, 0x42, 0x4a, + 0x49, 0x07, 0x4a, 0x5a, 0x49, 0x44, 0x54, 0x61, 0x5a, 0x54, 0x47, 0x03, 0x05, 0x40, 0x4c, 0x4c, + 0x42, 0x4a, 0x49, 0x07, 0x4a, 0x5a, 0x49, 0x44, 0x54, 0x61, 0x5a, 0x54, 0x47, 0x03, 0x05, 0x40, + 0x12, 0x4e, 0x26, 0x51, 0x54, 0x54, 0x4a, 0x4c, 0x4c, 0x45, 0x42, 0x03, 0x42, 0x0b, 0x4a, 0x51, + 0x2a, 0x07, 0x4a, 0x0b, 0x4a, 0x51, 0x2a, 0x07, 0x4a, 0x0b, 0x4a, 0x51, 0x2a, 0x07, 0x4a, 0x49, + 0x41, 0x12, 0x12, 0x0f, 0x16, 0x0f, 0x16, 0x07, 0x16, 0x41, 0x54, 0x16, 0x41, 0x54, 0x40, 0x40, + 0x49, 0x0a, 0x0e, 0x06, 0x49, 0x0f, 0x06, 0x41, 0x07, 0x20, 0x27, 0x0a, 0x41, 0x0b, 0x0d, 0x0f, + 0x49, 0x2a, 0x19, 0x12, 0x49, 0x17, 0x0d, 0x14, 0x06, 0x07, 0x16, 0x11, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x44, 0x41, 0x51, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x02, 0x40, 0x40, 0x40, 0x02, 0x01, + 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x06, 0x06, 0x53, + 0x51, 0x44, 0x06, 0x12, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4b, 0x4b, 0x42, 0x4a, + 0x49, 0x07, 0x4a, 0x5a, 0x49, 0x43, 0x53, 0x61, 0x5a, 0x53, 0x45, 0x04, 0x05, 0x01, 0x4b, 0x4b, + 0x42, 0x4a, 0x49, 0x07, 0x4a, 0x5a, 0x49, 0x43, 0x53, 0x61, 0x5a, 0x53, 0x45, 0x04, 0x05, 0x01, + 0x13, 0x4e, 0x26, 0x51, 0x53, 0x53, 0x4a, 0x4b, 0x4b, 0x44, 0x42, 0x04, 0x42, 0x0c, 0x4a, 0x51, + 0x2a, 0x07, 0x4a, 0x0c, 0x4a, 0x51, 0x2a, 0x07, 0x4a, 0x0c, 0x4a, 0x51, 0x2a, 0x07, 0x4a, 0x49, + 0x41, 0x12, 0x12, 0x0f, 0x16, 0x0f, 0x16, 0x07, 0x16, 0x41, 0x53, 0x16, 0x41, 0x53, 0x40, 0x40, + 0x49, 0x0b, 0x0e, 0x06, 0x49, 0x0f, 0x06, 0x41, 0x07, 0x22, 0x27, 0x0b, 0x41, 0x0c, 0x0d, 0x0f, + 0x49, 0x2a, 0x19, 0x12, 0x49, 0x15, 0x0d, 0x13, 0x06, 0x07, 0x16, 0x11, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x45, 0x40, 0x50, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x01, 0x40, 0x40, 0x40, 0x01, 0x03, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x07, 0x07, 0x52, + 0x50, 0x43, 0x07, 0x11, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4a, 0x4a, 0x41, 0x49, + 0x48, 0x07, 0x49, 0x59, 0x48, 0x42, 0x52, 0x60, 0x59, 0x52, 0x44, 0x05, 0x06, 0x03, 0x4a, 0x4a, + 0x41, 0x49, 0x48, 0x07, 0x49, 0x59, 0x48, 0x42, 0x52, 0x60, 0x59, 0x52, 0x44, 0x05, 0x06, 0x03, + 0x14, 0x4f, 0x27, 0x50, 0x52, 0x52, 0x49, 0x4a, 0x4a, 0x43, 0x41, 0x05, 0x41, 0x0d, 0x49, 0x50, + 0x29, 0x07, 0x49, 0x0d, 0x49, 0x50, 0x29, 0x07, 0x49, 0x0d, 0x49, 0x50, 0x29, 0x07, 0x49, 0x48, + 0x40, 0x11, 0x11, 0x0f, 0x17, 0x0f, 0x17, 0x07, 0x17, 0x40, 0x52, 0x17, 0x40, 0x52, 0x40, 0x40, + 0x48, 0x0c, 0x0f, 0x07, 0x48, 0x0f, 0x07, 0x40, 0x07, 0x23, 0x27, 0x0c, 0x40, 0x0d, 0x0e, 0x0f, + 0x48, 0x29, 0x18, 0x11, 0x48, 0x14, 0x0e, 0x12, 0x07, 0x07, 0x17, 0x10, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x46, 0x40, 0x50, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x04, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x07, 0x07, 0x51, + 0x50, 0x42, 0x07, 0x10, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x49, 0x49, 0x41, 0x49, + 0x48, 0x07, 0x49, 0x59, 0x48, 0x41, 0x51, 0x60, 0x59, 0x51, 0x42, 0x06, 0x06, 0x04, 0x49, 0x49, + 0x41, 0x49, 0x48, 0x07, 0x49, 0x59, 0x48, 0x41, 0x51, 0x60, 0x59, 0x51, 0x42, 0x06, 0x06, 0x04, + 0x15, 0x4f, 0x27, 0x50, 0x51, 0x51, 0x49, 0x49, 0x49, 0x42, 0x41, 0x06, 0x41, 0x0e, 0x49, 0x50, + 0x28, 0x07, 0x49, 0x0e, 0x49, 0x50, 0x28, 0x07, 0x49, 0x0e, 0x49, 0x50, 0x28, 0x07, 0x49, 0x48, + 0x40, 0x10, 0x10, 0x0f, 0x17, 0x0f, 0x17, 0x07, 0x17, 0x40, 0x51, 0x17, 0x40, 0x51, 0x40, 0x40, + 0x48, 0x0d, 0x0f, 0x07, 0x48, 0x0f, 0x07, 0x40, 0x07, 0x25, 0x27, 0x0d, 0x40, 0x0e, 0x0e, 0x0f, + 0x48, 0x28, 0x18, 0x10, 0x48, 0x12, 0x0e, 0x11, 0x07, 0x07, 0x17, 0x10, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x47, 0x40, 0x50, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x06, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x07, 0x07, 0x50, + 0x50, 0x40, 0x07, 0x10, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x48, 0x48, 0x40, 0x48, + 0x48, 0x07, 0x48, 0x58, 0x48, 0x40, 0x50, 0x60, 0x58, 0x50, 0x40, 0x07, 0x07, 0x06, 0x48, 0x48, + 0x40, 0x48, 0x48, 0x07, 0x48, 0x58, 0x48, 0x40, 0x50, 0x60, 0x58, 0x50, 0x40, 0x07, 0x07, 0x06, + 0x17, 0x4f, 0x27, 0x50, 0x50, 0x50, 0x48, 0x48, 0x48, 0x40, 0x40, 0x07, 0x40, 0x0f, 0x48, 0x50, + 0x28, 0x07, 0x48, 0x0f, 0x48, 0x50, 0x28, 0x07, 0x48, 0x0f, 0x48, 0x50, 0x28, 0x07, 0x48, 0x48, + 0x40, 0x10, 0x10, 0x0f, 0x17, 0x0f, 0x17, 0x07, 0x17, 0x40, 0x50, 0x17, 0x40, 0x50, 0x40, 0x40, + 0x48, 0x0f, 0x0f, 0x07, 0x48, 0x0f, 0x07, 0x40, 0x07, 0x27, 0x27, 0x0f, 0x40, 0x0f, 0x0f, 0x0f, + 0x48, 0x28, 0x18, 0x10, 0x48, 0x10, 0x0f, 0x10, 0x07, 0x07, 0x17, 0x10, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x48, 0x00, 0x4f, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x08, + 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x08, 0x08, 0x4f, + 0x4f, 0x00, 0x08, 0x0f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x47, 0x47, 0x00, 0x47, + 0x47, 0x07, 0x47, 0x57, 0x47, 0x00, 0x4f, 0x5f, 0x57, 0x4f, 0x00, 0x08, 0x08, 0x08, 0x47, 0x47, + 0x00, 0x47, 0x47, 0x07, 0x47, 0x57, 0x47, 0x00, 0x4f, 0x5f, 0x57, 0x4f, 0x00, 0x08, 0x08, 0x08, + 0x18, 0x50, 0x28, 0x4f, 0x4f, 0x4f, 0x47, 0x47, 0x47, 0x00, 0x00, 0x08, 0x00, 0x10, 0x47, 0x4f, + 0x27, 0x07, 0x47, 0x10, 0x47, 0x4f, 0x27, 0x07, 0x47, 0x10, 0x47, 0x4f, 0x27, 0x07, 0x47, 0x47, + 0x00, 0x0f, 0x0f, 0x0f, 0x18, 0x0f, 0x18, 0x07, 0x18, 0x00, 0x4f, 0x18, 0x00, 0x4f, 0x40, 0x40, + 0x47, 0x10, 0x10, 0x08, 0x47, 0x0f, 0x08, 0x00, 0x07, 0x28, 0x27, 0x10, 0x00, 0x10, 0x10, 0x0f, + 0x47, 0x27, 0x17, 0x0f, 0x47, 0x0f, 0x10, 0x0f, 0x08, 0x07, 0x18, 0x0f, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x49, 0x00, 0x4f, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0a, + 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x08, 0x08, 0x4e, + 0x4f, 0x01, 0x08, 0x0f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x46, 0x46, 0x00, 0x47, + 0x47, 0x07, 0x47, 0x57, 0x47, 0x01, 0x4e, 0x5f, 0x57, 0x4e, 0x02, 0x09, 0x08, 0x0a, 0x46, 0x46, + 0x00, 0x47, 0x47, 0x07, 0x47, 0x57, 0x47, 0x01, 0x4e, 0x5f, 0x57, 0x4e, 0x02, 0x09, 0x08, 0x0a, + 0x19, 0x50, 0x28, 0x4f, 0x4e, 0x4e, 0x47, 0x46, 0x46, 0x01, 0x00, 0x09, 0x00, 0x11, 0x47, 0x4f, + 0x27, 0x07, 0x47, 0x11, 0x47, 0x4f, 0x27, 0x07, 0x47, 0x11, 0x47, 0x4f, 0x27, 0x07, 0x47, 0x47, + 0x00, 0x0f, 0x0f, 0x0f, 0x18, 0x0f, 0x18, 0x07, 0x18, 0x00, 0x4e, 0x18, 0x00, 0x4e, 0x40, 0x40, + 0x47, 0x11, 0x10, 0x08, 0x47, 0x0f, 0x08, 0x00, 0x07, 0x2a, 0x27, 0x11, 0x00, 0x11, 0x10, 0x0f, + 0x47, 0x27, 0x17, 0x0f, 0x47, 0x0d, 0x10, 0x0e, 0x08, 0x07, 0x18, 0x0f, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4a, 0x00, 0x4f, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 0x40, 0x40, 0x40, 0x41, 0x0c, + 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x08, 0x08, 0x4d, + 0x4f, 0x02, 0x08, 0x0e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x45, 0x45, 0x01, 0x46, + 0x47, 0x07, 0x46, 0x56, 0x47, 0x02, 0x4d, 0x5f, 0x56, 0x4d, 0x03, 0x0a, 0x09, 0x0c, 0x45, 0x45, + 0x01, 0x46, 0x47, 0x07, 0x46, 0x56, 0x47, 0x02, 0x4d, 0x5f, 0x56, 0x4d, 0x03, 0x0a, 0x09, 0x0c, + 0x1a, 0x50, 0x28, 0x4f, 0x4d, 0x4d, 0x46, 0x45, 0x45, 0x02, 0x01, 0x0a, 0x01, 0x12, 0x46, 0x4f, + 0x26, 0x07, 0x46, 0x12, 0x46, 0x4f, 0x26, 0x07, 0x46, 0x12, 0x46, 0x4f, 0x26, 0x07, 0x46, 0x47, + 0x00, 0x0e, 0x0e, 0x0f, 0x18, 0x0f, 0x18, 0x07, 0x18, 0x00, 0x4d, 0x18, 0x00, 0x4d, 0x40, 0x40, + 0x47, 0x12, 0x10, 0x08, 0x47, 0x0f, 0x08, 0x00, 0x07, 0x2b, 0x27, 0x12, 0x00, 0x12, 0x11, 0x0f, + 0x47, 0x26, 0x17, 0x0e, 0x47, 0x0c, 0x11, 0x0d, 0x08, 0x07, 0x18, 0x0f, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4b, 0x01, 0x4e, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x40, 0x40, 0x40, 0x42, 0x0e, + 0x01, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x09, 0x09, 0x4c, + 0x4e, 0x04, 0x09, 0x0d, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x01, 0x01, 0x44, 0x44, 0x02, 0x45, + 0x46, 0x07, 0x45, 0x55, 0x46, 0x03, 0x4c, 0x5e, 0x55, 0x4c, 0x05, 0x0b, 0x0a, 0x0e, 0x44, 0x44, + 0x02, 0x45, 0x46, 0x07, 0x45, 0x55, 0x46, 0x03, 0x4c, 0x5e, 0x55, 0x4c, 0x05, 0x0b, 0x0a, 0x0e, + 0x1c, 0x51, 0x29, 0x4e, 0x4c, 0x4c, 0x45, 0x44, 0x44, 0x04, 0x02, 0x0b, 0x02, 0x13, 0x45, 0x4e, + 0x25, 0x07, 0x45, 0x13, 0x45, 0x4e, 0x25, 0x07, 0x45, 0x13, 0x45, 0x4e, 0x25, 0x07, 0x45, 0x46, + 0x01, 0x0d, 0x0d, 0x0f, 0x19, 0x0f, 0x19, 0x07, 0x19, 0x01, 0x4c, 0x19, 0x01, 0x4c, 0x40, 0x40, + 0x46, 0x14, 0x11, 0x09, 0x46, 0x0f, 0x09, 0x01, 0x07, 0x2d, 0x27, 0x14, 0x01, 0x13, 0x12, 0x0f, + 0x46, 0x25, 0x16, 0x0d, 0x46, 0x0a, 0x12, 0x0c, 0x09, 0x07, 0x19, 0x0e, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4c, 0x01, 0x4e, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x40, 0x40, 0x40, 0x42, 0x10, + 0x01, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x09, 0x09, 0x4b, + 0x4e, 0x05, 0x09, 0x0d, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x01, 0x01, 0x43, 0x43, 0x02, 0x45, + 0x46, 0x07, 0x45, 0x55, 0x46, 0x04, 0x4b, 0x5e, 0x55, 0x4b, 0x06, 0x0c, 0x0a, 0x10, 0x43, 0x43, + 0x02, 0x45, 0x46, 0x07, 0x45, 0x55, 0x46, 0x04, 0x4b, 0x5e, 0x55, 0x4b, 0x06, 0x0c, 0x0a, 0x10, + 0x1d, 0x51, 0x29, 0x4e, 0x4b, 0x4b, 0x45, 0x43, 0x43, 0x05, 0x02, 0x0c, 0x02, 0x14, 0x45, 0x4e, + 0x25, 0x07, 0x45, 0x14, 0x45, 0x4e, 0x25, 0x07, 0x45, 0x14, 0x45, 0x4e, 0x25, 0x07, 0x45, 0x46, + 0x01, 0x0d, 0x0d, 0x0f, 0x19, 0x0f, 0x19, 0x07, 0x19, 0x01, 0x4b, 0x19, 0x01, 0x4b, 0x40, 0x40, + 0x46, 0x15, 0x11, 0x09, 0x46, 0x0f, 0x09, 0x01, 0x07, 0x2e, 0x27, 0x15, 0x01, 0x14, 0x12, 0x0f, + 0x46, 0x25, 0x16, 0x0d, 0x46, 0x09, 0x12, 0x0b, 0x09, 0x07, 0x19, 0x0e, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4d, 0x01, 0x4e, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x43, 0x40, 0x40, 0x40, 0x43, 0x12, + 0x01, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x09, 0x09, 0x4a, + 0x4e, 0x06, 0x09, 0x0c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x01, 0x01, 0x42, 0x42, 0x03, 0x44, + 0x46, 0x07, 0x44, 0x54, 0x46, 0x05, 0x4a, 0x5e, 0x54, 0x4a, 0x08, 0x0d, 0x0b, 0x12, 0x42, 0x42, + 0x03, 0x44, 0x46, 0x07, 0x44, 0x54, 0x46, 0x05, 0x4a, 0x5e, 0x54, 0x4a, 0x08, 0x0d, 0x0b, 0x12, + 0x1e, 0x51, 0x29, 0x4e, 0x4a, 0x4a, 0x44, 0x42, 0x42, 0x06, 0x03, 0x0d, 0x03, 0x15, 0x44, 0x4e, + 0x24, 0x07, 0x44, 0x15, 0x44, 0x4e, 0x24, 0x07, 0x44, 0x15, 0x44, 0x4e, 0x24, 0x07, 0x44, 0x46, + 0x01, 0x0c, 0x0c, 0x0f, 0x19, 0x0f, 0x19, 0x07, 0x19, 0x01, 0x4a, 0x19, 0x01, 0x4a, 0x40, 0x40, + 0x46, 0x16, 0x11, 0x09, 0x46, 0x0f, 0x09, 0x01, 0x07, 0x30, 0x27, 0x16, 0x01, 0x15, 0x13, 0x0f, + 0x46, 0x24, 0x16, 0x0c, 0x46, 0x07, 0x13, 0x0a, 0x09, 0x07, 0x19, 0x0e, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4e, 0x01, 0x4e, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x13, + 0x01, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x09, 0x09, 0x4a, + 0x4e, 0x07, 0x09, 0x0b, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x01, 0x01, 0x42, 0x42, 0x03, 0x44, + 0x46, 0x07, 0x44, 0x54, 0x46, 0x05, 0x4a, 0x5e, 0x54, 0x4a, 0x09, 0x0d, 0x0b, 0x13, 0x42, 0x42, + 0x03, 0x44, 0x46, 0x07, 0x44, 0x54, 0x46, 0x05, 0x4a, 0x5e, 0x54, 0x4a, 0x09, 0x0d, 0x0b, 0x13, + 0x1f, 0x52, 0x29, 0x4e, 0x4a, 0x4a, 0x44, 0x42, 0x42, 0x07, 0x03, 0x0d, 0x03, 0x15, 0x44, 0x4e, + 0x23, 0x07, 0x44, 0x15, 0x44, 0x4e, 0x23, 0x07, 0x44, 0x15, 0x44, 0x4e, 0x23, 0x07, 0x44, 0x46, + 0x01, 0x0b, 0x0b, 0x0f, 0x19, 0x0f, 0x19, 0x07, 0x19, 0x01, 0x4a, 0x19, 0x01, 0x4a, 0x40, 0x40, + 0x46, 0x17, 0x11, 0x09, 0x46, 0x0f, 0x09, 0x01, 0x07, 0x31, 0x27, 0x17, 0x01, 0x15, 0x13, 0x0f, + 0x46, 0x23, 0x15, 0x0b, 0x46, 0x05, 0x13, 0x09, 0x09, 0x07, 0x19, 0x0d, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4e, 0x02, 0x4d, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x15, + 0x02, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0a, 0x0a, 0x49, + 0x4d, 0x09, 0x0a, 0x0b, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x02, 0x02, 0x41, 0x41, 0x04, 0x43, + 0x45, 0x07, 0x43, 0x53, 0x45, 0x06, 0x49, 0x5d, 0x53, 0x49, 0x0b, 0x0e, 0x0c, 0x15, 0x41, 0x41, + 0x04, 0x43, 0x45, 0x07, 0x43, 0x53, 0x45, 0x06, 0x49, 0x5d, 0x53, 0x49, 0x0b, 0x0e, 0x0c, 0x15, + 0x21, 0x52, 0x2a, 0x4d, 0x49, 0x49, 0x43, 0x41, 0x41, 0x09, 0x04, 0x0e, 0x04, 0x16, 0x43, 0x4d, + 0x23, 0x07, 0x43, 0x16, 0x43, 0x4d, 0x23, 0x07, 0x43, 0x16, 0x43, 0x4d, 0x23, 0x07, 0x43, 0x45, + 0x02, 0x0b, 0x0b, 0x0f, 0x1a, 0x0f, 0x1a, 0x07, 0x1a, 0x02, 0x49, 0x1a, 0x02, 0x49, 0x40, 0x40, + 0x45, 0x19, 0x12, 0x0a, 0x45, 0x0f, 0x0a, 0x02, 0x07, 0x33, 0x27, 0x19, 0x02, 0x16, 0x14, 0x0f, + 0x45, 0x23, 0x15, 0x0b, 0x45, 0x04, 0x14, 0x09, 0x0a, 0x07, 0x1a, 0x0d, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4f, 0x02, 0x4d, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x45, 0x40, 0x40, 0x40, 0x45, 0x17, + 0x02, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0a, 0x0a, 0x48, + 0x4d, 0x0a, 0x0a, 0x0a, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x02, 0x02, 0x40, 0x40, 0x05, 0x42, + 0x45, 0x07, 0x42, 0x52, 0x45, 0x07, 0x48, 0x5d, 0x52, 0x48, 0x0d, 0x0f, 0x0d, 0x17, 0x40, 0x40, + 0x05, 0x42, 0x45, 0x07, 0x42, 0x52, 0x45, 0x07, 0x48, 0x5d, 0x52, 0x48, 0x0d, 0x0f, 0x0d, 0x17, + 0x22, 0x52, 0x2a, 0x4d, 0x48, 0x48, 0x42, 0x40, 0x40, 0x0a, 0x05, 0x0f, 0x05, 0x17, 0x42, 0x4d, + 0x22, 0x07, 0x42, 0x17, 0x42, 0x4d, 0x22, 0x07, 0x42, 0x17, 0x42, 0x4d, 0x22, 0x07, 0x42, 0x45, + 0x02, 0x0a, 0x0a, 0x0f, 0x1a, 0x0f, 0x1a, 0x07, 0x1a, 0x02, 0x48, 0x1a, 0x02, 0x48, 0x40, 0x40, + 0x45, 0x1a, 0x12, 0x0a, 0x45, 0x0f, 0x0a, 0x02, 0x07, 0x35, 0x27, 0x1a, 0x02, 0x17, 0x15, 0x0f, + 0x45, 0x22, 0x15, 0x0a, 0x45, 0x02, 0x15, 0x08, 0x0a, 0x07, 0x1a, 0x0d, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x50, 0x02, 0x4d, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x45, 0x40, 0x40, 0x40, 0x45, 0x19, + 0x02, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0a, 0x0a, 0x47, + 0x4d, 0x0b, 0x0a, 0x0a, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x02, 0x02, 0x00, 0x00, 0x05, 0x42, + 0x45, 0x07, 0x42, 0x52, 0x45, 0x08, 0x47, 0x5d, 0x52, 0x47, 0x0e, 0x10, 0x0d, 0x19, 0x00, 0x00, + 0x05, 0x42, 0x45, 0x07, 0x42, 0x52, 0x45, 0x08, 0x47, 0x5d, 0x52, 0x47, 0x0e, 0x10, 0x0d, 0x19, + 0x23, 0x52, 0x2a, 0x4d, 0x47, 0x47, 0x42, 0x00, 0x00, 0x0b, 0x05, 0x10, 0x05, 0x18, 0x42, 0x4d, + 0x22, 0x07, 0x42, 0x18, 0x42, 0x4d, 0x22, 0x07, 0x42, 0x18, 0x42, 0x4d, 0x22, 0x07, 0x42, 0x45, + 0x02, 0x0a, 0x0a, 0x0f, 0x1a, 0x0f, 0x1a, 0x07, 0x1a, 0x02, 0x47, 0x1a, 0x02, 0x47, 0x40, 0x40, + 0x45, 0x1b, 0x12, 0x0a, 0x45, 0x0f, 0x0a, 0x02, 0x07, 0x36, 0x27, 0x1b, 0x02, 0x18, 0x15, 0x0f, + 0x45, 0x22, 0x15, 0x0a, 0x45, 0x01, 0x15, 0x07, 0x0a, 0x07, 0x1a, 0x0d, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x51, 0x03, 0x4c, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x46, 0x40, 0x40, 0x40, 0x46, 0x1b, + 0x03, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0b, 0x0b, 0x46, + 0x4c, 0x0c, 0x0b, 0x09, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x03, 0x03, 0x01, 0x01, 0x06, 0x41, + 0x44, 0x07, 0x41, 0x51, 0x44, 0x09, 0x46, 0x5c, 0x51, 0x46, 0x10, 0x11, 0x0e, 0x1b, 0x01, 0x01, + 0x06, 0x41, 0x44, 0x07, 0x41, 0x51, 0x44, 0x09, 0x46, 0x5c, 0x51, 0x46, 0x10, 0x11, 0x0e, 0x1b, + 0x24, 0x53, 0x2b, 0x4c, 0x46, 0x46, 0x41, 0x01, 0x01, 0x0c, 0x06, 0x11, 0x06, 0x19, 0x41, 0x4c, + 0x21, 0x07, 0x41, 0x19, 0x41, 0x4c, 0x21, 0x07, 0x41, 0x19, 0x41, 0x4c, 0x21, 0x07, 0x41, 0x44, + 0x03, 0x09, 0x09, 0x0f, 0x1b, 0x0f, 0x1b, 0x07, 0x1b, 0x03, 0x46, 0x1b, 0x03, 0x46, 0x40, 0x40, + 0x44, 0x1c, 0x13, 0x0b, 0x44, 0x0f, 0x0b, 0x03, 0x07, 0x38, 0x27, 0x1c, 0x03, 0x19, 0x16, 0x0f, + 0x44, 0x21, 0x14, 0x09, 0x44, 0x40, 0x16, 0x06, 0x0b, 0x07, 0x1b, 0x0c, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x52, 0x03, 0x4c, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x47, 0x40, 0x40, 0x40, 0x47, 0x1d, + 0x03, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0b, 0x0b, 0x45, + 0x4c, 0x0e, 0x0b, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x03, 0x03, 0x02, 0x02, 0x07, 0x40, + 0x44, 0x07, 0x40, 0x50, 0x44, 0x0a, 0x45, 0x5c, 0x50, 0x45, 0x11, 0x12, 0x0f, 0x1d, 0x02, 0x02, + 0x07, 0x40, 0x44, 0x07, 0x40, 0x50, 0x44, 0x0a, 0x45, 0x5c, 0x50, 0x45, 0x11, 0x12, 0x0f, 0x1d, + 0x26, 0x53, 0x2b, 0x4c, 0x45, 0x45, 0x40, 0x02, 0x02, 0x0e, 0x07, 0x12, 0x07, 0x1a, 0x40, 0x4c, + 0x20, 0x07, 0x40, 0x1a, 0x40, 0x4c, 0x20, 0x07, 0x40, 0x1a, 0x40, 0x4c, 0x20, 0x07, 0x40, 0x44, + 0x03, 0x08, 0x08, 0x0f, 0x1b, 0x0f, 0x1b, 0x07, 0x1b, 0x03, 0x45, 0x1b, 0x03, 0x45, 0x40, 0x40, + 0x44, 0x1e, 0x13, 0x0b, 0x44, 0x0f, 0x0b, 0x03, 0x07, 0x39, 0x27, 0x1e, 0x03, 0x1a, 0x17, 0x0f, + 0x44, 0x20, 0x14, 0x08, 0x44, 0x41, 0x17, 0x05, 0x0b, 0x07, 0x1b, 0x0c, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x53, 0x03, 0x4c, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x47, 0x40, 0x40, 0x40, 0x47, 0x1f, + 0x03, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0b, 0x0b, 0x44, + 0x4c, 0x0f, 0x0b, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x03, 0x03, 0x03, 0x03, 0x07, 0x40, + 0x44, 0x07, 0x40, 0x50, 0x44, 0x0b, 0x44, 0x5c, 0x50, 0x44, 0x13, 0x13, 0x0f, 0x1f, 0x03, 0x03, + 0x07, 0x40, 0x44, 0x07, 0x40, 0x50, 0x44, 0x0b, 0x44, 0x5c, 0x50, 0x44, 0x13, 0x13, 0x0f, 0x1f, + 0x27, 0x53, 0x2b, 0x4c, 0x44, 0x44, 0x40, 0x03, 0x03, 0x0f, 0x07, 0x13, 0x07, 0x1b, 0x40, 0x4c, + 0x20, 0x07, 0x40, 0x1b, 0x40, 0x4c, 0x20, 0x07, 0x40, 0x1b, 0x40, 0x4c, 0x20, 0x07, 0x40, 0x44, + 0x03, 0x08, 0x08, 0x0f, 0x1b, 0x0f, 0x1b, 0x07, 0x1b, 0x03, 0x44, 0x1b, 0x03, 0x44, 0x40, 0x40, + 0x44, 0x1f, 0x13, 0x0b, 0x44, 0x0f, 0x0b, 0x03, 0x07, 0x3b, 0x27, 0x1f, 0x03, 0x1b, 0x17, 0x0f, + 0x44, 0x20, 0x14, 0x08, 0x44, 0x43, 0x17, 0x04, 0x0b, 0x07, 0x1b, 0x0c, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x54, 0x04, 0x4b, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x48, 0x40, 0x40, 0x40, 0x48, 0x21, + 0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0c, 0x0c, 0x43, + 0x4b, 0x10, 0x0c, 0x07, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x04, 0x04, 0x04, 0x08, 0x00, + 0x43, 0x07, 0x00, 0x4f, 0x43, 0x0c, 0x43, 0x5b, 0x4f, 0x43, 0x14, 0x14, 0x10, 0x21, 0x04, 0x04, + 0x08, 0x00, 0x43, 0x07, 0x00, 0x4f, 0x43, 0x0c, 0x43, 0x5b, 0x4f, 0x43, 0x14, 0x14, 0x10, 0x21, + 0x28, 0x54, 0x2c, 0x4b, 0x43, 0x43, 0x00, 0x04, 0x04, 0x10, 0x08, 0x14, 0x08, 0x1c, 0x00, 0x4b, + 0x1f, 0x07, 0x00, 0x1c, 0x00, 0x4b, 0x1f, 0x07, 0x00, 0x1c, 0x00, 0x4b, 0x1f, 0x07, 0x00, 0x43, + 0x04, 0x07, 0x07, 0x0f, 0x1c, 0x0f, 0x1c, 0x07, 0x1c, 0x04, 0x43, 0x1c, 0x04, 0x43, 0x40, 0x40, + 0x43, 0x20, 0x14, 0x0c, 0x43, 0x0f, 0x0c, 0x04, 0x07, 0x3c, 0x27, 0x20, 0x04, 0x1c, 0x18, 0x0f, + 0x43, 0x1f, 0x13, 0x07, 0x43, 0x44, 0x18, 0x03, 0x0c, 0x07, 0x1c, 0x0b, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x55, 0x04, 0x4b, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x49, 0x40, 0x40, 0x40, 0x49, 0x22, + 0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0c, 0x0c, 0x42, + 0x4b, 0x11, 0x0c, 0x06, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x04, 0x05, 0x05, 0x08, 0x00, + 0x43, 0x07, 0x00, 0x4f, 0x43, 0x0d, 0x42, 0x5b, 0x4f, 0x42, 0x16, 0x15, 0x10, 0x22, 0x05, 0x05, + 0x08, 0x00, 0x43, 0x07, 0x00, 0x4f, 0x43, 0x0d, 0x42, 0x5b, 0x4f, 0x42, 0x16, 0x15, 0x10, 0x22, + 0x29, 0x54, 0x2c, 0x4b, 0x42, 0x42, 0x00, 0x05, 0x05, 0x11, 0x08, 0x15, 0x08, 0x1d, 0x00, 0x4b, + 0x1e, 0x07, 0x00, 0x1d, 0x00, 0x4b, 0x1e, 0x07, 0x00, 0x1d, 0x00, 0x4b, 0x1e, 0x07, 0x00, 0x43, + 0x04, 0x06, 0x06, 0x0f, 0x1c, 0x0f, 0x1c, 0x07, 0x1c, 0x04, 0x42, 0x1c, 0x04, 0x42, 0x40, 0x40, + 0x43, 0x21, 0x14, 0x0c, 0x43, 0x0f, 0x0c, 0x04, 0x07, 0x3e, 0x27, 0x21, 0x04, 0x1d, 0x18, 0x0f, + 0x43, 0x1e, 0x13, 0x06, 0x43, 0x46, 0x18, 0x02, 0x0c, 0x07, 0x1c, 0x0b, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x56, 0x04, 0x4b, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x49, 0x40, 0x40, 0x40, 0x49, 0x24, + 0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0c, 0x0c, 0x41, + 0x4b, 0x13, 0x0c, 0x06, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x04, 0x06, 0x06, 0x09, 0x01, + 0x43, 0x07, 0x01, 0x4e, 0x43, 0x0e, 0x41, 0x5b, 0x4e, 0x41, 0x18, 0x16, 0x11, 0x24, 0x06, 0x06, + 0x09, 0x01, 0x43, 0x07, 0x01, 0x4e, 0x43, 0x0e, 0x41, 0x5b, 0x4e, 0x41, 0x18, 0x16, 0x11, 0x24, + 0x2b, 0x54, 0x2c, 0x4b, 0x41, 0x41, 0x01, 0x06, 0x06, 0x13, 0x09, 0x16, 0x09, 0x1e, 0x01, 0x4b, + 0x1e, 0x07, 0x01, 0x1e, 0x01, 0x4b, 0x1e, 0x07, 0x01, 0x1e, 0x01, 0x4b, 0x1e, 0x07, 0x01, 0x43, + 0x04, 0x06, 0x06, 0x0f, 0x1c, 0x0f, 0x1c, 0x07, 0x1c, 0x04, 0x41, 0x1c, 0x04, 0x41, 0x40, 0x40, + 0x43, 0x23, 0x14, 0x0c, 0x43, 0x0f, 0x0c, 0x04, 0x07, 0x3e, 0x27, 0x23, 0x04, 0x1e, 0x19, 0x0f, + 0x43, 0x1e, 0x13, 0x06, 0x43, 0x48, 0x19, 0x01, 0x0c, 0x07, 0x1c, 0x0b, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x57, 0x05, 0x4a, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4a, 0x40, 0x40, 0x40, 0x4a, 0x26, + 0x05, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0d, 0x0d, 0x40, + 0x4a, 0x14, 0x0d, 0x05, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x05, 0x05, 0x07, 0x07, 0x0a, 0x02, + 0x42, 0x07, 0x02, 0x4d, 0x42, 0x0f, 0x40, 0x5a, 0x4d, 0x40, 0x19, 0x17, 0x12, 0x26, 0x07, 0x07, + 0x0a, 0x02, 0x42, 0x07, 0x02, 0x4d, 0x42, 0x0f, 0x40, 0x5a, 0x4d, 0x40, 0x19, 0x17, 0x12, 0x26, + 0x2c, 0x55, 0x2d, 0x4a, 0x40, 0x40, 0x02, 0x07, 0x07, 0x14, 0x0a, 0x17, 0x0a, 0x1f, 0x02, 0x4a, + 0x1d, 0x07, 0x02, 0x1f, 0x02, 0x4a, 0x1d, 0x07, 0x02, 0x1f, 0x02, 0x4a, 0x1d, 0x07, 0x02, 0x42, + 0x05, 0x05, 0x05, 0x0f, 0x1d, 0x0f, 0x1d, 0x07, 0x1d, 0x05, 0x40, 0x1d, 0x05, 0x40, 0x40, 0x40, + 0x42, 0x24, 0x15, 0x0d, 0x42, 0x0f, 0x0d, 0x05, 0x07, 0x3e, 0x27, 0x24, 0x05, 0x1f, 0x1a, 0x0f, + 0x42, 0x1d, 0x12, 0x05, 0x42, 0x49, 0x1a, 0x00, 0x0d, 0x07, 0x1d, 0x0a, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x58, 0x05, 0x4a, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4a, 0x40, 0x40, 0x40, 0x4a, 0x28, + 0x05, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0d, 0x0d, 0x00, + 0x4a, 0x15, 0x0d, 0x05, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x05, 0x05, 0x08, 0x08, 0x0a, 0x02, + 0x42, 0x07, 0x02, 0x4d, 0x42, 0x10, 0x00, 0x5a, 0x4d, 0x00, 0x1b, 0x18, 0x12, 0x28, 0x08, 0x08, + 0x0a, 0x02, 0x42, 0x07, 0x02, 0x4d, 0x42, 0x10, 0x00, 0x5a, 0x4d, 0x00, 0x1b, 0x18, 0x12, 0x28, + 0x2d, 0x55, 0x2d, 0x4a, 0x00, 0x00, 0x02, 0x08, 0x08, 0x15, 0x0a, 0x18, 0x0a, 0x20, 0x02, 0x4a, + 0x1d, 0x07, 0x02, 0x20, 0x02, 0x4a, 0x1d, 0x07, 0x02, 0x20, 0x02, 0x4a, 0x1d, 0x07, 0x02, 0x42, + 0x05, 0x05, 0x05, 0x0f, 0x1d, 0x0f, 0x1d, 0x07, 0x1d, 0x05, 0x00, 0x1d, 0x05, 0x00, 0x40, 0x40, + 0x42, 0x25, 0x15, 0x0d, 0x42, 0x0f, 0x0d, 0x05, 0x07, 0x3e, 0x27, 0x25, 0x05, 0x20, 0x1a, 0x0f, + 0x42, 0x1d, 0x12, 0x05, 0x42, 0x4b, 0x1a, 0x40, 0x0d, 0x07, 0x1d, 0x0a, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x59, 0x05, 0x4a, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4b, 0x40, 0x40, 0x40, 0x4b, 0x2a, + 0x05, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0d, 0x0d, 0x01, + 0x4a, 0x16, 0x0d, 0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x05, 0x05, 0x09, 0x09, 0x0b, 0x03, + 0x42, 0x07, 0x03, 0x4c, 0x42, 0x11, 0x01, 0x5a, 0x4c, 0x01, 0x1c, 0x19, 0x13, 0x2a, 0x09, 0x09, + 0x0b, 0x03, 0x42, 0x07, 0x03, 0x4c, 0x42, 0x11, 0x01, 0x5a, 0x4c, 0x01, 0x1c, 0x19, 0x13, 0x2a, + 0x2e, 0x55, 0x2d, 0x4a, 0x01, 0x01, 0x03, 0x09, 0x09, 0x16, 0x0b, 0x19, 0x0b, 0x21, 0x03, 0x4a, + 0x1c, 0x07, 0x03, 0x21, 0x03, 0x4a, 0x1c, 0x07, 0x03, 0x21, 0x03, 0x4a, 0x1c, 0x07, 0x03, 0x42, + 0x05, 0x04, 0x04, 0x0f, 0x1d, 0x0f, 0x1d, 0x07, 0x1d, 0x05, 0x01, 0x1d, 0x05, 0x01, 0x40, 0x40, + 0x42, 0x26, 0x15, 0x0d, 0x42, 0x0f, 0x0d, 0x05, 0x07, 0x3e, 0x27, 0x26, 0x05, 0x21, 0x1b, 0x0f, + 0x42, 0x1c, 0x12, 0x04, 0x42, 0x4c, 0x1b, 0x41, 0x0d, 0x07, 0x1d, 0x0a, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x5a, 0x06, 0x49, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4c, 0x40, 0x40, 0x40, 0x4c, 0x2c, + 0x06, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0e, 0x0e, 0x02, + 0x49, 0x18, 0x0e, 0x03, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x06, 0x06, 0x0a, 0x0a, 0x0c, 0x04, + 0x41, 0x07, 0x04, 0x4b, 0x41, 0x12, 0x02, 0x59, 0x4b, 0x02, 0x1e, 0x1a, 0x14, 0x2c, 0x0a, 0x0a, + 0x0c, 0x04, 0x41, 0x07, 0x04, 0x4b, 0x41, 0x12, 0x02, 0x59, 0x4b, 0x02, 0x1e, 0x1a, 0x14, 0x2c, + 0x30, 0x56, 0x2e, 0x49, 0x02, 0x02, 0x04, 0x0a, 0x0a, 0x18, 0x0c, 0x1a, 0x0c, 0x22, 0x04, 0x49, + 0x1b, 0x07, 0x04, 0x22, 0x04, 0x49, 0x1b, 0x07, 0x04, 0x22, 0x04, 0x49, 0x1b, 0x07, 0x04, 0x41, + 0x06, 0x03, 0x03, 0x0f, 0x1e, 0x0f, 0x1e, 0x07, 0x1e, 0x06, 0x02, 0x1e, 0x06, 0x02, 0x40, 0x40, + 0x41, 0x28, 0x16, 0x0e, 0x41, 0x0f, 0x0e, 0x06, 0x07, 0x3e, 0x27, 0x28, 0x06, 0x22, 0x1c, 0x0f, + 0x41, 0x1b, 0x11, 0x03, 0x41, 0x4e, 0x1c, 0x42, 0x0e, 0x07, 0x1e, 0x09, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x5b, 0x06, 0x49, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4c, 0x40, 0x40, 0x40, 0x4c, 0x2e, + 0x06, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0e, 0x0e, 0x03, + 0x49, 0x19, 0x0e, 0x03, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x06, 0x06, 0x0b, 0x0b, 0x0c, 0x04, + 0x41, 0x07, 0x04, 0x4b, 0x41, 0x13, 0x03, 0x59, 0x4b, 0x03, 0x1f, 0x1b, 0x14, 0x2e, 0x0b, 0x0b, + 0x0c, 0x04, 0x41, 0x07, 0x04, 0x4b, 0x41, 0x13, 0x03, 0x59, 0x4b, 0x03, 0x1f, 0x1b, 0x14, 0x2e, + 0x31, 0x56, 0x2e, 0x49, 0x03, 0x03, 0x04, 0x0b, 0x0b, 0x19, 0x0c, 0x1b, 0x0c, 0x23, 0x04, 0x49, + 0x1b, 0x07, 0x04, 0x23, 0x04, 0x49, 0x1b, 0x07, 0x04, 0x23, 0x04, 0x49, 0x1b, 0x07, 0x04, 0x41, + 0x06, 0x03, 0x03, 0x0f, 0x1e, 0x0f, 0x1e, 0x07, 0x1e, 0x06, 0x03, 0x1e, 0x06, 0x03, 0x40, 0x40, + 0x41, 0x29, 0x16, 0x0e, 0x41, 0x0f, 0x0e, 0x06, 0x07, 0x3e, 0x27, 0x29, 0x06, 0x23, 0x1c, 0x0f, + 0x41, 0x1b, 0x11, 0x03, 0x41, 0x4f, 0x1c, 0x43, 0x0e, 0x07, 0x1e, 0x09, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x5c, 0x06, 0x49, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4d, 0x40, 0x40, 0x40, 0x4d, 0x30, + 0x06, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0e, 0x0e, 0x04, + 0x49, 0x1a, 0x0e, 0x02, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x06, 0x06, 0x0c, 0x0c, 0x0d, 0x05, + 0x41, 0x07, 0x05, 0x4a, 0x41, 0x14, 0x04, 0x59, 0x4a, 0x04, 0x21, 0x1c, 0x15, 0x30, 0x0c, 0x0c, + 0x0d, 0x05, 0x41, 0x07, 0x05, 0x4a, 0x41, 0x14, 0x04, 0x59, 0x4a, 0x04, 0x21, 0x1c, 0x15, 0x30, + 0x32, 0x56, 0x2e, 0x49, 0x04, 0x04, 0x05, 0x0c, 0x0c, 0x1a, 0x0d, 0x1c, 0x0d, 0x24, 0x05, 0x49, + 0x1a, 0x07, 0x05, 0x24, 0x05, 0x49, 0x1a, 0x07, 0x05, 0x24, 0x05, 0x49, 0x1a, 0x07, 0x05, 0x41, + 0x06, 0x02, 0x02, 0x0f, 0x1e, 0x0f, 0x1e, 0x07, 0x1e, 0x06, 0x04, 0x1e, 0x06, 0x04, 0x40, 0x40, + 0x41, 0x2a, 0x16, 0x0e, 0x41, 0x0f, 0x0e, 0x06, 0x07, 0x3e, 0x27, 0x2a, 0x06, 0x24, 0x1d, 0x0f, + 0x41, 0x1a, 0x11, 0x02, 0x41, 0x51, 0x1d, 0x44, 0x0e, 0x07, 0x1e, 0x09, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x5d, 0x06, 0x49, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4e, 0x40, 0x40, 0x40, 0x4e, 0x31, + 0x06, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0e, 0x0e, 0x04, + 0x49, 0x1b, 0x0e, 0x01, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x06, 0x06, 0x0c, 0x0c, 0x0d, 0x05, + 0x41, 0x07, 0x05, 0x4a, 0x41, 0x14, 0x04, 0x59, 0x4a, 0x04, 0x22, 0x1c, 0x15, 0x31, 0x0c, 0x0c, + 0x0d, 0x05, 0x41, 0x07, 0x05, 0x4a, 0x41, 0x14, 0x04, 0x59, 0x4a, 0x04, 0x22, 0x1c, 0x15, 0x31, + 0x33, 0x57, 0x2e, 0x49, 0x04, 0x04, 0x05, 0x0c, 0x0c, 0x1b, 0x0d, 0x1c, 0x0d, 0x24, 0x05, 0x49, + 0x19, 0x07, 0x05, 0x24, 0x05, 0x49, 0x19, 0x07, 0x05, 0x24, 0x05, 0x49, 0x19, 0x07, 0x05, 0x41, + 0x06, 0x01, 0x01, 0x0f, 0x1e, 0x0f, 0x1e, 0x07, 0x1e, 0x06, 0x04, 0x1e, 0x06, 0x04, 0x40, 0x40, + 0x41, 0x2b, 0x16, 0x0e, 0x41, 0x0f, 0x0e, 0x06, 0x07, 0x3e, 0x27, 0x2b, 0x06, 0x24, 0x1d, 0x0f, + 0x41, 0x19, 0x10, 0x01, 0x41, 0x53, 0x1d, 0x45, 0x0e, 0x07, 0x1e, 0x08, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x5d, 0x07, 0x48, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4e, 0x40, 0x40, 0x40, 0x4e, 0x33, + 0x07, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0f, 0x0f, 0x05, + 0x48, 0x1d, 0x0f, 0x01, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x07, 0x0d, 0x0d, 0x0e, 0x06, + 0x40, 0x07, 0x06, 0x49, 0x40, 0x15, 0x05, 0x58, 0x49, 0x05, 0x24, 0x1d, 0x16, 0x33, 0x0d, 0x0d, + 0x0e, 0x06, 0x40, 0x07, 0x06, 0x49, 0x40, 0x15, 0x05, 0x58, 0x49, 0x05, 0x24, 0x1d, 0x16, 0x33, + 0x35, 0x57, 0x2f, 0x48, 0x05, 0x05, 0x06, 0x0d, 0x0d, 0x1d, 0x0e, 0x1d, 0x0e, 0x25, 0x06, 0x48, + 0x19, 0x07, 0x06, 0x25, 0x06, 0x48, 0x19, 0x07, 0x06, 0x25, 0x06, 0x48, 0x19, 0x07, 0x06, 0x40, + 0x07, 0x01, 0x01, 0x0f, 0x1f, 0x0f, 0x1f, 0x07, 0x1f, 0x07, 0x05, 0x1f, 0x07, 0x05, 0x40, 0x40, + 0x40, 0x2d, 0x17, 0x0f, 0x40, 0x0f, 0x0f, 0x07, 0x07, 0x3e, 0x27, 0x2d, 0x07, 0x25, 0x1e, 0x0f, + 0x40, 0x19, 0x10, 0x01, 0x40, 0x54, 0x1e, 0x45, 0x0f, 0x07, 0x1f, 0x08, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x5e, 0x07, 0x48, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4f, 0x40, 0x40, 0x40, 0x4f, 0x35, + 0x07, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0f, 0x0f, 0x06, + 0x48, 0x1e, 0x0f, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x07, 0x0e, 0x0e, 0x0f, 0x07, + 0x40, 0x07, 0x07, 0x48, 0x40, 0x16, 0x06, 0x58, 0x48, 0x06, 0x26, 0x1e, 0x17, 0x35, 0x0e, 0x0e, + 0x0f, 0x07, 0x40, 0x07, 0x07, 0x48, 0x40, 0x16, 0x06, 0x58, 0x48, 0x06, 0x26, 0x1e, 0x17, 0x35, + 0x36, 0x57, 0x2f, 0x48, 0x06, 0x06, 0x07, 0x0e, 0x0e, 0x1e, 0x0f, 0x1e, 0x0f, 0x26, 0x07, 0x48, + 0x18, 0x07, 0x07, 0x26, 0x07, 0x48, 0x18, 0x07, 0x07, 0x26, 0x07, 0x48, 0x18, 0x07, 0x07, 0x40, + 0x07, 0x00, 0x00, 0x0f, 0x1f, 0x0f, 0x1f, 0x07, 0x1f, 0x07, 0x06, 0x1f, 0x07, 0x06, 0x40, 0x40, + 0x40, 0x2e, 0x17, 0x0f, 0x40, 0x0f, 0x0f, 0x07, 0x07, 0x3e, 0x27, 0x2e, 0x07, 0x26, 0x1f, 0x0f, + 0x40, 0x18, 0x10, 0x00, 0x40, 0x56, 0x1f, 0x46, 0x0f, 0x07, 0x1f, 0x08, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x5f, 0x07, 0x48, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4f, 0x40, 0x40, 0x40, 0x4f, 0x37, + 0x07, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0f, 0x0f, 0x07, + 0x48, 0x1f, 0x0f, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x07, + 0x40, 0x07, 0x07, 0x48, 0x40, 0x17, 0x07, 0x58, 0x48, 0x07, 0x27, 0x1f, 0x17, 0x37, 0x0f, 0x0f, + 0x0f, 0x07, 0x40, 0x07, 0x07, 0x48, 0x40, 0x17, 0x07, 0x58, 0x48, 0x07, 0x27, 0x1f, 0x17, 0x37, + 0x37, 0x57, 0x2f, 0x48, 0x07, 0x07, 0x07, 0x0f, 0x0f, 0x1f, 0x0f, 0x1f, 0x0f, 0x27, 0x07, 0x48, + 0x18, 0x07, 0x07, 0x27, 0x07, 0x48, 0x18, 0x07, 0x07, 0x27, 0x07, 0x48, 0x18, 0x07, 0x07, 0x40, + 0x07, 0x00, 0x00, 0x0f, 0x1f, 0x0f, 0x1f, 0x07, 0x1f, 0x07, 0x07, 0x1f, 0x07, 0x07, 0x40, 0x40, + 0x40, 0x2f, 0x17, 0x0f, 0x40, 0x0f, 0x0f, 0x07, 0x07, 0x3e, 0x27, 0x2f, 0x07, 0x27, 0x1f, 0x0f, + 0x40, 0x18, 0x10, 0x00, 0x40, 0x57, 0x1f, 0x47, 0x0f, 0x07, 0x1f, 0x08, 0x0f, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x07, 0x48, 0x48, 0x60, 0x40, 0x27, 0x07, 0x07, 0x27, 0x40, 0x48, 0x40, 0x40, 0x40, 0x0f, + 0x48, 0x68, 0x60, 0x40, 0x68, 0x68, 0x68, 0x68, 0x68, 0x07, 0x07, 0x0f, 0x50, 0x40, 0x60, 0x07, + 0x68, 0x27, 0x48, 0x17, 0x40, 0x50, 0x1f, 0x40, 0x40, 0x40, 0x48, 0x48, 0x58, 0x60, 0x60, 0x60, + 0x68, 0x68, 0x58, 0x68, 0x60, 0x60, 0x60, 0x68, 0x68, 0x68, 0x60, 0x50, 0x48, 0x50, 0x58, 0x60, + 0x60, 0x60, 0x68, 0x68, 0x58, 0x68, 0x60, 0x60, 0x60, 0x68, 0x68, 0x68, 0x60, 0x50, 0x48, 0x50, + 0x07, 0x50, 0x58, 0x40, 0x48, 0x40, 0x48, 0x07, 0x48, 0x48, 0x48, 0x68, 0x07, 0x1f, 0x17, 0x50, + 0x0f, 0x07, 0x40, 0x1f, 0x17, 0x50, 0x0f, 0x07, 0x40, 0x1f, 0x17, 0x50, 0x0f, 0x07, 0x40, 0x40, + 0x07, 0x48, 0x48, 0x48, 0x07, 0x48, 0x07, 0x17, 0x17, 0x17, 0x50, 0x17, 0x17, 0x50, 0x40, 0x40, + 0x40, 0x2f, 0x2f, 0x17, 0x40, 0x0f, 0x17, 0x1f, 0x1f, 0x1f, 0x27, 0x0f, 0x07, 0x07, 0x0f, 0x07, + 0x07, 0x3e, 0x1f, 0x17, 0x40, 0x17, 0x07, 0x1f, 0x48, 0x17, 0x48, 0x40, 0x48, 0x17, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x07, 0x47, 0x47, 0x5f, 0x40, 0x27, 0x07, 0x07, 0x27, 0x40, 0x47, 0x40, 0x40, 0x40, 0x0f, + 0x47, 0x66, 0x5f, 0x00, 0x66, 0x66, 0x66, 0x65, 0x65, 0x07, 0x07, 0x0f, 0x4f, 0x00, 0x5e, 0x07, + 0x67, 0x27, 0x47, 0x17, 0x40, 0x4f, 0x1f, 0x40, 0x40, 0x40, 0x47, 0x47, 0x57, 0x5f, 0x5e, 0x5f, + 0x66, 0x66, 0x57, 0x67, 0x5f, 0x5e, 0x5f, 0x67, 0x67, 0x66, 0x5e, 0x4f, 0x47, 0x4f, 0x57, 0x5f, + 0x5e, 0x5f, 0x66, 0x66, 0x57, 0x67, 0x5f, 0x5e, 0x5f, 0x67, 0x67, 0x66, 0x5e, 0x4f, 0x47, 0x4f, + 0x08, 0x4f, 0x56, 0x40, 0x48, 0x40, 0x47, 0x07, 0x47, 0x47, 0x47, 0x66, 0x07, 0x1f, 0x17, 0x4f, + 0x10, 0x07, 0x40, 0x1f, 0x17, 0x4f, 0x10, 0x07, 0x40, 0x1f, 0x17, 0x4f, 0x10, 0x07, 0x40, 0x40, + 0x07, 0x47, 0x47, 0x47, 0x08, 0x47, 0x08, 0x17, 0x17, 0x17, 0x4f, 0x17, 0x17, 0x4f, 0x40, 0x40, + 0x40, 0x2f, 0x2f, 0x17, 0x40, 0x0f, 0x17, 0x1f, 0x1f, 0x20, 0x27, 0x10, 0x07, 0x08, 0x10, 0x08, + 0x07, 0x3e, 0x1f, 0x17, 0x40, 0x17, 0x08, 0x1f, 0x47, 0x17, 0x46, 0x00, 0x47, 0x17, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x06, 0x46, 0x47, 0x5e, 0x40, 0x26, 0x06, 0x06, 0x27, 0x40, 0x47, 0x40, 0x40, 0x40, 0x0f, + 0x47, 0x64, 0x5e, 0x01, 0x65, 0x64, 0x64, 0x63, 0x63, 0x07, 0x07, 0x0f, 0x4e, 0x00, 0x5d, 0x07, + 0x66, 0x27, 0x46, 0x17, 0x40, 0x4f, 0x1e, 0x40, 0x40, 0x40, 0x47, 0x47, 0x56, 0x5e, 0x5d, 0x5e, + 0x65, 0x64, 0x56, 0x66, 0x5e, 0x5c, 0x5e, 0x66, 0x66, 0x65, 0x5d, 0x4e, 0x46, 0x4e, 0x56, 0x5e, + 0x5d, 0x5e, 0x65, 0x64, 0x56, 0x66, 0x5e, 0x5c, 0x5e, 0x66, 0x66, 0x65, 0x5d, 0x4e, 0x46, 0x4e, + 0x09, 0x4f, 0x54, 0x40, 0x48, 0x40, 0x47, 0x07, 0x47, 0x46, 0x46, 0x64, 0x07, 0x1f, 0x16, 0x4f, + 0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x40, + 0x07, 0x46, 0x46, 0x46, 0x09, 0x46, 0x09, 0x17, 0x17, 0x16, 0x4f, 0x17, 0x16, 0x4f, 0x40, 0x40, + 0x40, 0x2e, 0x2e, 0x17, 0x40, 0x0f, 0x17, 0x1e, 0x1e, 0x20, 0x27, 0x10, 0x07, 0x09, 0x10, 0x08, + 0x07, 0x3e, 0x1f, 0x17, 0x40, 0x17, 0x08, 0x1e, 0x46, 0x17, 0x45, 0x01, 0x46, 0x17, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x06, 0x45, 0x47, 0x5e, 0x40, 0x25, 0x06, 0x05, 0x27, 0x40, 0x47, 0x40, 0x40, 0x40, 0x0f, + 0x47, 0x63, 0x5d, 0x01, 0x64, 0x63, 0x62, 0x60, 0x60, 0x07, 0x07, 0x0f, 0x4e, 0x00, 0x5c, 0x07, + 0x65, 0x27, 0x45, 0x17, 0x40, 0x4f, 0x1d, 0x40, 0x40, 0x40, 0x47, 0x47, 0x56, 0x5d, 0x5c, 0x5d, + 0x64, 0x63, 0x56, 0x65, 0x5d, 0x5b, 0x5d, 0x65, 0x65, 0x64, 0x5c, 0x4d, 0x46, 0x4d, 0x56, 0x5d, + 0x5c, 0x5d, 0x64, 0x63, 0x56, 0x65, 0x5d, 0x5b, 0x5d, 0x65, 0x65, 0x64, 0x5c, 0x4d, 0x46, 0x4d, + 0x09, 0x4f, 0x52, 0x40, 0x48, 0x40, 0x47, 0x07, 0x47, 0x46, 0x46, 0x62, 0x07, 0x1f, 0x16, 0x4f, + 0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x40, + 0x07, 0x46, 0x46, 0x45, 0x09, 0x45, 0x09, 0x17, 0x17, 0x16, 0x4f, 0x17, 0x16, 0x4f, 0x40, 0x40, + 0x40, 0x2d, 0x2d, 0x17, 0x40, 0x0f, 0x17, 0x1e, 0x1e, 0x20, 0x27, 0x10, 0x07, 0x09, 0x10, 0x08, + 0x07, 0x3d, 0x1f, 0x17, 0x40, 0x17, 0x08, 0x1e, 0x45, 0x17, 0x44, 0x01, 0x45, 0x17, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x05, 0x44, 0x46, 0x5d, 0x40, 0x24, 0x05, 0x04, 0x27, 0x40, 0x46, 0x40, 0x40, 0x40, 0x0f, + 0x46, 0x61, 0x5c, 0x02, 0x63, 0x61, 0x60, 0x5e, 0x5e, 0x07, 0x07, 0x0e, 0x4d, 0x01, 0x5b, 0x07, + 0x64, 0x27, 0x44, 0x16, 0x40, 0x4e, 0x1c, 0x40, 0x40, 0x40, 0x46, 0x46, 0x55, 0x5c, 0x5b, 0x5c, + 0x63, 0x61, 0x55, 0x64, 0x5c, 0x59, 0x5c, 0x64, 0x64, 0x63, 0x5b, 0x4c, 0x45, 0x4c, 0x55, 0x5c, + 0x5b, 0x5c, 0x63, 0x61, 0x55, 0x64, 0x5c, 0x59, 0x5c, 0x64, 0x64, 0x63, 0x5b, 0x4c, 0x45, 0x4c, + 0x0a, 0x4e, 0x50, 0x40, 0x48, 0x40, 0x46, 0x07, 0x46, 0x45, 0x45, 0x60, 0x07, 0x1e, 0x15, 0x4e, + 0x11, 0x07, 0x40, 0x1e, 0x15, 0x4e, 0x11, 0x07, 0x40, 0x1e, 0x15, 0x4e, 0x11, 0x07, 0x40, 0x41, + 0x07, 0x45, 0x45, 0x44, 0x0a, 0x44, 0x0a, 0x16, 0x17, 0x15, 0x4e, 0x17, 0x15, 0x4e, 0x40, 0x40, + 0x40, 0x2c, 0x2c, 0x16, 0x40, 0x0f, 0x16, 0x1d, 0x1d, 0x21, 0x27, 0x11, 0x07, 0x0a, 0x11, 0x09, + 0x06, 0x3c, 0x1e, 0x16, 0x40, 0x16, 0x09, 0x1d, 0x44, 0x16, 0x43, 0x02, 0x44, 0x16, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x04, 0x43, 0x46, 0x5c, 0x40, 0x23, 0x04, 0x03, 0x27, 0x40, 0x46, 0x40, 0x40, 0x40, 0x0f, + 0x46, 0x60, 0x5b, 0x03, 0x61, 0x60, 0x5e, 0x5b, 0x5b, 0x07, 0x07, 0x0e, 0x4c, 0x01, 0x59, 0x07, + 0x63, 0x27, 0x43, 0x16, 0x40, 0x4e, 0x1b, 0x40, 0x40, 0x40, 0x46, 0x46, 0x54, 0x5b, 0x59, 0x5b, + 0x61, 0x60, 0x54, 0x63, 0x5b, 0x58, 0x5b, 0x63, 0x63, 0x61, 0x59, 0x4b, 0x44, 0x4b, 0x54, 0x5b, + 0x59, 0x5b, 0x61, 0x60, 0x54, 0x63, 0x5b, 0x58, 0x5b, 0x63, 0x63, 0x61, 0x59, 0x4b, 0x44, 0x4b, + 0x0b, 0x4e, 0x4e, 0x40, 0x48, 0x40, 0x46, 0x07, 0x46, 0x44, 0x44, 0x5e, 0x07, 0x1e, 0x14, 0x4e, + 0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x41, + 0x07, 0x44, 0x44, 0x43, 0x0b, 0x43, 0x0b, 0x16, 0x17, 0x14, 0x4e, 0x17, 0x14, 0x4e, 0x40, 0x40, + 0x40, 0x2b, 0x2b, 0x16, 0x40, 0x0f, 0x16, 0x1c, 0x1c, 0x21, 0x27, 0x11, 0x07, 0x0b, 0x11, 0x09, + 0x06, 0x3b, 0x1e, 0x16, 0x40, 0x16, 0x09, 0x1c, 0x43, 0x16, 0x41, 0x03, 0x43, 0x16, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x04, 0x42, 0x46, 0x5c, 0x40, 0x22, 0x04, 0x02, 0x27, 0x40, 0x46, 0x40, 0x40, 0x40, 0x0f, + 0x46, 0x5e, 0x5a, 0x03, 0x60, 0x5e, 0x5c, 0x59, 0x59, 0x07, 0x07, 0x0e, 0x4c, 0x01, 0x58, 0x07, + 0x62, 0x27, 0x42, 0x16, 0x40, 0x4e, 0x1a, 0x40, 0x40, 0x40, 0x46, 0x46, 0x54, 0x5a, 0x58, 0x5a, + 0x60, 0x5e, 0x54, 0x62, 0x5a, 0x56, 0x5a, 0x62, 0x62, 0x60, 0x58, 0x4a, 0x44, 0x4a, 0x54, 0x5a, + 0x58, 0x5a, 0x60, 0x5e, 0x54, 0x62, 0x5a, 0x56, 0x5a, 0x62, 0x62, 0x60, 0x58, 0x4a, 0x44, 0x4a, + 0x0b, 0x4e, 0x4c, 0x40, 0x48, 0x40, 0x46, 0x07, 0x46, 0x44, 0x44, 0x5c, 0x07, 0x1e, 0x14, 0x4e, + 0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x41, + 0x07, 0x44, 0x44, 0x42, 0x0b, 0x42, 0x0b, 0x16, 0x17, 0x14, 0x4e, 0x17, 0x14, 0x4e, 0x40, 0x40, + 0x40, 0x2a, 0x2a, 0x16, 0x40, 0x0f, 0x16, 0x1c, 0x1c, 0x21, 0x27, 0x11, 0x07, 0x0b, 0x11, 0x09, + 0x06, 0x3a, 0x1e, 0x16, 0x40, 0x16, 0x09, 0x1c, 0x42, 0x16, 0x40, 0x03, 0x42, 0x16, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x03, 0x41, 0x45, 0x5b, 0x40, 0x21, 0x03, 0x01, 0x27, 0x40, 0x45, 0x40, 0x40, 0x40, 0x0f, + 0x45, 0x5d, 0x59, 0x04, 0x5f, 0x5d, 0x5a, 0x56, 0x56, 0x07, 0x07, 0x0d, 0x4b, 0x02, 0x57, 0x07, + 0x61, 0x27, 0x41, 0x15, 0x40, 0x4d, 0x19, 0x40, 0x40, 0x40, 0x45, 0x45, 0x53, 0x59, 0x57, 0x59, + 0x5f, 0x5d, 0x53, 0x61, 0x59, 0x55, 0x59, 0x61, 0x61, 0x5f, 0x57, 0x49, 0x43, 0x49, 0x53, 0x59, + 0x57, 0x59, 0x5f, 0x5d, 0x53, 0x61, 0x59, 0x55, 0x59, 0x61, 0x61, 0x5f, 0x57, 0x49, 0x43, 0x49, + 0x0c, 0x4d, 0x4a, 0x40, 0x48, 0x40, 0x45, 0x07, 0x45, 0x43, 0x43, 0x5a, 0x07, 0x1d, 0x13, 0x4d, + 0x12, 0x07, 0x40, 0x1d, 0x13, 0x4d, 0x12, 0x07, 0x40, 0x1d, 0x13, 0x4d, 0x12, 0x07, 0x40, 0x42, + 0x07, 0x43, 0x43, 0x41, 0x0c, 0x41, 0x0c, 0x15, 0x17, 0x13, 0x4d, 0x17, 0x13, 0x4d, 0x40, 0x40, + 0x40, 0x29, 0x29, 0x15, 0x40, 0x0f, 0x15, 0x1b, 0x1b, 0x22, 0x27, 0x12, 0x07, 0x0c, 0x12, 0x0a, + 0x05, 0x39, 0x1d, 0x15, 0x40, 0x15, 0x0a, 0x1b, 0x41, 0x15, 0x00, 0x04, 0x41, 0x15, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x02, 0x40, 0x45, 0x5b, 0x40, 0x20, 0x02, 0x00, 0x27, 0x40, 0x45, 0x40, 0x40, 0x40, 0x0f, + 0x45, 0x5b, 0x58, 0x04, 0x5e, 0x5b, 0x59, 0x54, 0x54, 0x07, 0x07, 0x0d, 0x4b, 0x02, 0x56, 0x07, + 0x60, 0x27, 0x40, 0x15, 0x40, 0x4d, 0x18, 0x40, 0x40, 0x40, 0x45, 0x45, 0x53, 0x58, 0x56, 0x58, + 0x5e, 0x5b, 0x53, 0x60, 0x58, 0x53, 0x58, 0x60, 0x60, 0x5e, 0x56, 0x48, 0x43, 0x48, 0x53, 0x58, + 0x56, 0x58, 0x5e, 0x5b, 0x53, 0x60, 0x58, 0x53, 0x58, 0x60, 0x60, 0x5e, 0x56, 0x48, 0x43, 0x48, + 0x0c, 0x4d, 0x49, 0x40, 0x48, 0x40, 0x45, 0x07, 0x45, 0x43, 0x43, 0x59, 0x07, 0x1d, 0x12, 0x4d, + 0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x42, + 0x07, 0x43, 0x43, 0x40, 0x0c, 0x40, 0x0c, 0x15, 0x17, 0x12, 0x4d, 0x17, 0x12, 0x4d, 0x40, 0x40, + 0x40, 0x28, 0x28, 0x15, 0x40, 0x0f, 0x15, 0x1a, 0x1a, 0x22, 0x27, 0x12, 0x07, 0x0c, 0x12, 0x0a, + 0x05, 0x38, 0x1d, 0x15, 0x40, 0x15, 0x0a, 0x1a, 0x40, 0x15, 0x01, 0x04, 0x40, 0x15, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x02, 0x00, 0x45, 0x5a, 0x40, 0x1f, 0x02, 0x40, 0x27, 0x40, 0x45, 0x40, 0x40, 0x40, 0x0f, + 0x45, 0x59, 0x57, 0x05, 0x5c, 0x59, 0x57, 0x51, 0x51, 0x07, 0x07, 0x0d, 0x4a, 0x02, 0x54, 0x07, + 0x5f, 0x27, 0x00, 0x15, 0x40, 0x4d, 0x17, 0x40, 0x40, 0x40, 0x45, 0x45, 0x52, 0x57, 0x54, 0x57, + 0x5c, 0x59, 0x52, 0x5f, 0x57, 0x51, 0x57, 0x5f, 0x5f, 0x5c, 0x54, 0x47, 0x42, 0x47, 0x52, 0x57, + 0x54, 0x57, 0x5c, 0x59, 0x52, 0x5f, 0x57, 0x51, 0x57, 0x5f, 0x5f, 0x5c, 0x54, 0x47, 0x42, 0x47, + 0x0d, 0x4d, 0x47, 0x40, 0x48, 0x40, 0x45, 0x07, 0x45, 0x42, 0x42, 0x57, 0x07, 0x1d, 0x12, 0x4d, + 0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x42, + 0x07, 0x42, 0x42, 0x00, 0x0d, 0x00, 0x0d, 0x15, 0x17, 0x12, 0x4d, 0x17, 0x12, 0x4d, 0x40, 0x40, + 0x40, 0x27, 0x27, 0x15, 0x40, 0x0f, 0x15, 0x1a, 0x1a, 0x22, 0x27, 0x12, 0x07, 0x0d, 0x12, 0x0a, + 0x05, 0x37, 0x1d, 0x15, 0x40, 0x15, 0x0a, 0x1a, 0x00, 0x15, 0x03, 0x05, 0x00, 0x15, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x01, 0x01, 0x44, 0x59, 0x40, 0x1e, 0x01, 0x41, 0x27, 0x40, 0x44, 0x40, 0x40, 0x40, 0x0f, + 0x44, 0x58, 0x56, 0x06, 0x5b, 0x58, 0x55, 0x4f, 0x4f, 0x07, 0x07, 0x0c, 0x49, 0x03, 0x53, 0x07, + 0x5e, 0x27, 0x01, 0x14, 0x40, 0x4c, 0x16, 0x40, 0x40, 0x40, 0x44, 0x44, 0x51, 0x56, 0x53, 0x56, + 0x5b, 0x58, 0x51, 0x5e, 0x56, 0x50, 0x56, 0x5e, 0x5e, 0x5b, 0x53, 0x46, 0x41, 0x46, 0x51, 0x56, + 0x53, 0x56, 0x5b, 0x58, 0x51, 0x5e, 0x56, 0x50, 0x56, 0x5e, 0x5e, 0x5b, 0x53, 0x46, 0x41, 0x46, + 0x0e, 0x4c, 0x45, 0x40, 0x48, 0x40, 0x44, 0x07, 0x44, 0x41, 0x41, 0x55, 0x07, 0x1c, 0x11, 0x4c, + 0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x43, + 0x07, 0x41, 0x41, 0x01, 0x0e, 0x01, 0x0e, 0x14, 0x17, 0x11, 0x4c, 0x17, 0x11, 0x4c, 0x40, 0x40, + 0x40, 0x26, 0x26, 0x14, 0x40, 0x0f, 0x14, 0x19, 0x19, 0x23, 0x27, 0x13, 0x07, 0x0e, 0x13, 0x0b, + 0x04, 0x36, 0x1c, 0x14, 0x40, 0x14, 0x0b, 0x19, 0x01, 0x14, 0x04, 0x06, 0x01, 0x14, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x01, 0x02, 0x44, 0x59, 0x40, 0x1d, 0x01, 0x42, 0x27, 0x40, 0x44, 0x40, 0x40, 0x40, 0x0f, + 0x44, 0x56, 0x55, 0x06, 0x5a, 0x56, 0x53, 0x4c, 0x4c, 0x07, 0x07, 0x0c, 0x49, 0x03, 0x52, 0x07, + 0x5d, 0x27, 0x02, 0x14, 0x40, 0x4c, 0x15, 0x40, 0x40, 0x40, 0x44, 0x44, 0x51, 0x55, 0x52, 0x55, + 0x5a, 0x56, 0x51, 0x5d, 0x55, 0x4e, 0x55, 0x5d, 0x5d, 0x5a, 0x52, 0x45, 0x41, 0x45, 0x51, 0x55, + 0x52, 0x55, 0x5a, 0x56, 0x51, 0x5d, 0x55, 0x4e, 0x55, 0x5d, 0x5d, 0x5a, 0x52, 0x45, 0x41, 0x45, + 0x0e, 0x4c, 0x43, 0x40, 0x48, 0x40, 0x44, 0x07, 0x44, 0x41, 0x41, 0x53, 0x07, 0x1c, 0x11, 0x4c, + 0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x43, + 0x07, 0x41, 0x41, 0x02, 0x0e, 0x02, 0x0e, 0x14, 0x17, 0x11, 0x4c, 0x17, 0x11, 0x4c, 0x40, 0x40, + 0x40, 0x25, 0x25, 0x14, 0x40, 0x0f, 0x14, 0x19, 0x19, 0x23, 0x27, 0x13, 0x07, 0x0e, 0x13, 0x0b, + 0x04, 0x35, 0x1c, 0x14, 0x40, 0x14, 0x0b, 0x19, 0x02, 0x14, 0x05, 0x06, 0x02, 0x14, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x03, 0x44, 0x58, 0x40, 0x1c, 0x00, 0x43, 0x27, 0x40, 0x44, 0x40, 0x40, 0x40, 0x0f, + 0x44, 0x55, 0x54, 0x07, 0x59, 0x55, 0x51, 0x4a, 0x4a, 0x07, 0x07, 0x0c, 0x48, 0x03, 0x51, 0x07, + 0x5c, 0x27, 0x03, 0x14, 0x40, 0x4c, 0x14, 0x40, 0x40, 0x40, 0x44, 0x44, 0x50, 0x54, 0x51, 0x54, + 0x59, 0x55, 0x50, 0x5c, 0x54, 0x4d, 0x54, 0x5c, 0x5c, 0x59, 0x51, 0x44, 0x40, 0x44, 0x50, 0x54, + 0x51, 0x54, 0x59, 0x55, 0x50, 0x5c, 0x54, 0x4d, 0x54, 0x5c, 0x5c, 0x59, 0x51, 0x44, 0x40, 0x44, + 0x0f, 0x4c, 0x41, 0x40, 0x48, 0x40, 0x44, 0x07, 0x44, 0x40, 0x40, 0x51, 0x07, 0x1c, 0x10, 0x4c, + 0x13, 0x07, 0x40, 0x1c, 0x10, 0x4c, 0x13, 0x07, 0x40, 0x1c, 0x10, 0x4c, 0x13, 0x07, 0x40, 0x43, + 0x07, 0x40, 0x40, 0x03, 0x0f, 0x03, 0x0f, 0x14, 0x17, 0x10, 0x4c, 0x17, 0x10, 0x4c, 0x40, 0x40, + 0x40, 0x24, 0x24, 0x14, 0x40, 0x0f, 0x14, 0x18, 0x18, 0x23, 0x27, 0x13, 0x07, 0x0f, 0x13, 0x0b, + 0x04, 0x34, 0x1c, 0x14, 0x40, 0x14, 0x0b, 0x18, 0x03, 0x14, 0x06, 0x07, 0x03, 0x14, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x40, 0x04, 0x43, 0x57, 0x40, 0x1b, 0x40, 0x44, 0x27, 0x40, 0x43, 0x40, 0x40, 0x40, 0x0f, + 0x43, 0x53, 0x53, 0x08, 0x57, 0x53, 0x4f, 0x47, 0x47, 0x07, 0x07, 0x0b, 0x47, 0x04, 0x4f, 0x07, + 0x5b, 0x27, 0x04, 0x13, 0x40, 0x4b, 0x13, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4f, 0x53, 0x4f, 0x53, + 0x57, 0x53, 0x4f, 0x5b, 0x53, 0x4b, 0x53, 0x5b, 0x5b, 0x57, 0x4f, 0x43, 0x00, 0x43, 0x4f, 0x53, + 0x4f, 0x53, 0x57, 0x53, 0x4f, 0x5b, 0x53, 0x4b, 0x53, 0x5b, 0x5b, 0x57, 0x4f, 0x43, 0x00, 0x43, + 0x10, 0x4b, 0x00, 0x40, 0x48, 0x40, 0x43, 0x07, 0x43, 0x00, 0x00, 0x4f, 0x07, 0x1b, 0x0f, 0x4b, + 0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x44, + 0x07, 0x00, 0x00, 0x04, 0x10, 0x04, 0x10, 0x13, 0x17, 0x0f, 0x4b, 0x17, 0x0f, 0x4b, 0x40, 0x40, + 0x40, 0x23, 0x23, 0x13, 0x40, 0x0f, 0x13, 0x17, 0x17, 0x24, 0x27, 0x14, 0x07, 0x10, 0x14, 0x0c, + 0x03, 0x33, 0x1b, 0x13, 0x40, 0x13, 0x0c, 0x17, 0x04, 0x13, 0x08, 0x08, 0x04, 0x13, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x40, 0x05, 0x43, 0x57, 0x40, 0x1a, 0x40, 0x45, 0x27, 0x40, 0x43, 0x40, 0x40, 0x40, 0x0f, + 0x43, 0x52, 0x52, 0x08, 0x56, 0x52, 0x4d, 0x45, 0x45, 0x07, 0x07, 0x0b, 0x47, 0x04, 0x4e, 0x07, + 0x5a, 0x27, 0x05, 0x13, 0x40, 0x4b, 0x12, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4f, 0x52, 0x4e, 0x52, + 0x56, 0x52, 0x4f, 0x5a, 0x52, 0x4a, 0x52, 0x5a, 0x5a, 0x56, 0x4e, 0x42, 0x00, 0x42, 0x4f, 0x52, + 0x4e, 0x52, 0x56, 0x52, 0x4f, 0x5a, 0x52, 0x4a, 0x52, 0x5a, 0x5a, 0x56, 0x4e, 0x42, 0x00, 0x42, + 0x10, 0x4b, 0x02, 0x40, 0x48, 0x40, 0x43, 0x07, 0x43, 0x00, 0x00, 0x4d, 0x07, 0x1b, 0x0f, 0x4b, + 0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x44, + 0x07, 0x00, 0x00, 0x05, 0x10, 0x05, 0x10, 0x13, 0x17, 0x0f, 0x4b, 0x17, 0x0f, 0x4b, 0x40, 0x40, + 0x40, 0x22, 0x22, 0x13, 0x40, 0x0f, 0x13, 0x17, 0x17, 0x24, 0x27, 0x14, 0x07, 0x10, 0x14, 0x0c, + 0x03, 0x32, 0x1b, 0x13, 0x40, 0x13, 0x0c, 0x17, 0x05, 0x13, 0x09, 0x08, 0x05, 0x13, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x41, 0x06, 0x43, 0x56, 0x40, 0x19, 0x41, 0x46, 0x27, 0x40, 0x43, 0x40, 0x40, 0x40, 0x0f, + 0x43, 0x50, 0x51, 0x09, 0x55, 0x50, 0x4b, 0x42, 0x42, 0x07, 0x07, 0x0b, 0x46, 0x04, 0x4d, 0x07, + 0x59, 0x27, 0x06, 0x13, 0x40, 0x4b, 0x11, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4e, 0x51, 0x4d, 0x51, + 0x55, 0x50, 0x4e, 0x59, 0x51, 0x48, 0x51, 0x59, 0x59, 0x55, 0x4d, 0x41, 0x01, 0x41, 0x4e, 0x51, + 0x4d, 0x51, 0x55, 0x50, 0x4e, 0x59, 0x51, 0x48, 0x51, 0x59, 0x59, 0x55, 0x4d, 0x41, 0x01, 0x41, + 0x11, 0x4b, 0x04, 0x40, 0x48, 0x40, 0x43, 0x07, 0x43, 0x01, 0x01, 0x4b, 0x07, 0x1b, 0x0e, 0x4b, + 0x14, 0x07, 0x40, 0x1b, 0x0e, 0x4b, 0x14, 0x07, 0x40, 0x1b, 0x0e, 0x4b, 0x14, 0x07, 0x40, 0x44, + 0x07, 0x01, 0x01, 0x06, 0x11, 0x06, 0x11, 0x13, 0x17, 0x0e, 0x4b, 0x17, 0x0e, 0x4b, 0x40, 0x40, + 0x40, 0x21, 0x21, 0x13, 0x40, 0x0f, 0x13, 0x16, 0x16, 0x24, 0x27, 0x14, 0x07, 0x11, 0x14, 0x0c, + 0x03, 0x31, 0x1b, 0x13, 0x40, 0x13, 0x0c, 0x16, 0x06, 0x13, 0x0a, 0x09, 0x06, 0x13, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x42, 0x06, 0x43, 0x56, 0x40, 0x18, 0x42, 0x47, 0x27, 0x40, 0x43, 0x40, 0x40, 0x40, 0x0f, + 0x43, 0x4f, 0x51, 0x09, 0x54, 0x4f, 0x4a, 0x40, 0x40, 0x07, 0x07, 0x0a, 0x46, 0x04, 0x4c, 0x07, + 0x59, 0x27, 0x06, 0x12, 0x40, 0x4b, 0x10, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4e, 0x51, 0x4c, 0x51, + 0x54, 0x4f, 0x4e, 0x59, 0x51, 0x47, 0x51, 0x59, 0x59, 0x54, 0x4c, 0x41, 0x01, 0x41, 0x4e, 0x51, + 0x4c, 0x51, 0x54, 0x4f, 0x4e, 0x59, 0x51, 0x47, 0x51, 0x59, 0x59, 0x54, 0x4c, 0x41, 0x01, 0x41, + 0x11, 0x4b, 0x05, 0x40, 0x48, 0x40, 0x43, 0x07, 0x43, 0x01, 0x01, 0x4a, 0x07, 0x1a, 0x0d, 0x4b, + 0x14, 0x07, 0x40, 0x1a, 0x0d, 0x4b, 0x14, 0x07, 0x40, 0x1a, 0x0d, 0x4b, 0x14, 0x07, 0x40, 0x45, + 0x07, 0x01, 0x01, 0x06, 0x11, 0x06, 0x11, 0x12, 0x17, 0x0d, 0x4b, 0x17, 0x0d, 0x4b, 0x40, 0x40, + 0x40, 0x20, 0x20, 0x12, 0x40, 0x0f, 0x12, 0x15, 0x15, 0x24, 0x27, 0x14, 0x07, 0x11, 0x14, 0x0c, + 0x02, 0x30, 0x1a, 0x12, 0x40, 0x12, 0x0c, 0x15, 0x06, 0x12, 0x0b, 0x09, 0x06, 0x12, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x42, 0x07, 0x42, 0x55, 0x40, 0x18, 0x42, 0x47, 0x27, 0x40, 0x42, 0x40, 0x40, 0x40, 0x0f, + 0x42, 0x4d, 0x50, 0x0a, 0x52, 0x4d, 0x48, 0x02, 0x02, 0x07, 0x07, 0x0a, 0x45, 0x05, 0x4a, 0x07, + 0x58, 0x27, 0x07, 0x12, 0x40, 0x4a, 0x10, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4d, 0x50, 0x4a, 0x50, + 0x52, 0x4d, 0x4d, 0x58, 0x50, 0x45, 0x50, 0x58, 0x58, 0x52, 0x4a, 0x40, 0x02, 0x40, 0x4d, 0x50, + 0x4a, 0x50, 0x52, 0x4d, 0x4d, 0x58, 0x50, 0x45, 0x50, 0x58, 0x58, 0x52, 0x4a, 0x40, 0x02, 0x40, + 0x12, 0x4a, 0x07, 0x40, 0x48, 0x40, 0x42, 0x07, 0x42, 0x02, 0x02, 0x48, 0x07, 0x1a, 0x0d, 0x4a, + 0x15, 0x07, 0x40, 0x1a, 0x0d, 0x4a, 0x15, 0x07, 0x40, 0x1a, 0x0d, 0x4a, 0x15, 0x07, 0x40, 0x45, + 0x07, 0x02, 0x02, 0x07, 0x12, 0x07, 0x12, 0x12, 0x17, 0x0d, 0x4a, 0x17, 0x0d, 0x4a, 0x40, 0x40, + 0x40, 0x20, 0x20, 0x12, 0x40, 0x0f, 0x12, 0x15, 0x15, 0x25, 0x27, 0x15, 0x07, 0x12, 0x15, 0x0d, + 0x02, 0x30, 0x1a, 0x12, 0x40, 0x12, 0x0d, 0x15, 0x07, 0x12, 0x0d, 0x0a, 0x07, 0x12, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x43, 0x08, 0x42, 0x54, 0x40, 0x17, 0x43, 0x48, 0x27, 0x40, 0x42, 0x40, 0x40, 0x40, 0x0f, + 0x42, 0x4b, 0x4f, 0x0b, 0x51, 0x4b, 0x46, 0x04, 0x04, 0x07, 0x07, 0x0a, 0x44, 0x05, 0x49, 0x07, + 0x57, 0x27, 0x08, 0x12, 0x40, 0x4a, 0x0f, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4c, 0x4f, 0x49, 0x4f, + 0x51, 0x4b, 0x4c, 0x57, 0x4f, 0x43, 0x4f, 0x57, 0x57, 0x51, 0x49, 0x00, 0x03, 0x00, 0x4c, 0x4f, + 0x49, 0x4f, 0x51, 0x4b, 0x4c, 0x57, 0x4f, 0x43, 0x4f, 0x57, 0x57, 0x51, 0x49, 0x00, 0x03, 0x00, + 0x13, 0x4a, 0x09, 0x40, 0x48, 0x40, 0x42, 0x07, 0x42, 0x03, 0x03, 0x46, 0x07, 0x1a, 0x0c, 0x4a, + 0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x45, + 0x07, 0x03, 0x03, 0x08, 0x13, 0x08, 0x13, 0x12, 0x17, 0x0c, 0x4a, 0x17, 0x0c, 0x4a, 0x40, 0x40, + 0x40, 0x1f, 0x1f, 0x12, 0x40, 0x0f, 0x12, 0x14, 0x14, 0x25, 0x27, 0x15, 0x07, 0x13, 0x15, 0x0d, + 0x02, 0x2f, 0x1a, 0x12, 0x40, 0x12, 0x0d, 0x14, 0x08, 0x12, 0x0e, 0x0b, 0x08, 0x12, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x43, 0x09, 0x42, 0x54, 0x40, 0x16, 0x43, 0x49, 0x27, 0x40, 0x42, 0x40, 0x40, 0x40, 0x0f, + 0x42, 0x4a, 0x4e, 0x0b, 0x50, 0x4a, 0x44, 0x07, 0x07, 0x07, 0x07, 0x0a, 0x44, 0x05, 0x48, 0x07, + 0x56, 0x27, 0x09, 0x12, 0x40, 0x4a, 0x0e, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4c, 0x4e, 0x48, 0x4e, + 0x50, 0x4a, 0x4c, 0x56, 0x4e, 0x42, 0x4e, 0x56, 0x56, 0x50, 0x48, 0x01, 0x03, 0x01, 0x4c, 0x4e, + 0x48, 0x4e, 0x50, 0x4a, 0x4c, 0x56, 0x4e, 0x42, 0x4e, 0x56, 0x56, 0x50, 0x48, 0x01, 0x03, 0x01, + 0x13, 0x4a, 0x0b, 0x40, 0x48, 0x40, 0x42, 0x07, 0x42, 0x03, 0x03, 0x44, 0x07, 0x1a, 0x0c, 0x4a, + 0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x45, + 0x07, 0x03, 0x03, 0x09, 0x13, 0x09, 0x13, 0x12, 0x17, 0x0c, 0x4a, 0x17, 0x0c, 0x4a, 0x40, 0x40, + 0x40, 0x1e, 0x1e, 0x12, 0x40, 0x0f, 0x12, 0x14, 0x14, 0x25, 0x27, 0x15, 0x07, 0x13, 0x15, 0x0d, + 0x02, 0x2e, 0x1a, 0x12, 0x40, 0x12, 0x0d, 0x14, 0x09, 0x12, 0x0f, 0x0b, 0x09, 0x12, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x44, 0x0a, 0x41, 0x53, 0x40, 0x15, 0x44, 0x4a, 0x27, 0x40, 0x41, 0x40, 0x40, 0x40, 0x0f, + 0x41, 0x48, 0x4d, 0x0c, 0x4f, 0x48, 0x42, 0x09, 0x09, 0x07, 0x07, 0x09, 0x43, 0x06, 0x47, 0x07, + 0x55, 0x27, 0x0a, 0x11, 0x40, 0x49, 0x0d, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4b, 0x4d, 0x47, 0x4d, + 0x4f, 0x48, 0x4b, 0x55, 0x4d, 0x40, 0x4d, 0x55, 0x55, 0x4f, 0x47, 0x02, 0x04, 0x02, 0x4b, 0x4d, + 0x47, 0x4d, 0x4f, 0x48, 0x4b, 0x55, 0x4d, 0x40, 0x4d, 0x55, 0x55, 0x4f, 0x47, 0x02, 0x04, 0x02, + 0x14, 0x49, 0x0d, 0x40, 0x48, 0x40, 0x41, 0x07, 0x41, 0x04, 0x04, 0x42, 0x07, 0x19, 0x0b, 0x49, + 0x16, 0x07, 0x40, 0x19, 0x0b, 0x49, 0x16, 0x07, 0x40, 0x19, 0x0b, 0x49, 0x16, 0x07, 0x40, 0x46, + 0x07, 0x04, 0x04, 0x0a, 0x14, 0x0a, 0x14, 0x11, 0x17, 0x0b, 0x49, 0x17, 0x0b, 0x49, 0x40, 0x40, + 0x40, 0x1d, 0x1d, 0x11, 0x40, 0x0f, 0x11, 0x13, 0x13, 0x26, 0x27, 0x16, 0x07, 0x14, 0x16, 0x0e, + 0x01, 0x2d, 0x19, 0x11, 0x40, 0x11, 0x0e, 0x13, 0x0a, 0x11, 0x10, 0x0c, 0x0a, 0x11, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x45, 0x0b, 0x41, 0x52, 0x40, 0x14, 0x45, 0x4b, 0x27, 0x40, 0x41, 0x40, 0x40, 0x40, 0x0f, + 0x41, 0x47, 0x4c, 0x0d, 0x4d, 0x47, 0x40, 0x0c, 0x0c, 0x07, 0x07, 0x09, 0x42, 0x06, 0x45, 0x07, + 0x54, 0x27, 0x0b, 0x11, 0x40, 0x49, 0x0c, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4a, 0x4c, 0x45, 0x4c, + 0x4d, 0x47, 0x4a, 0x54, 0x4c, 0x00, 0x4c, 0x54, 0x54, 0x4d, 0x45, 0x03, 0x05, 0x03, 0x4a, 0x4c, + 0x45, 0x4c, 0x4d, 0x47, 0x4a, 0x54, 0x4c, 0x00, 0x4c, 0x54, 0x54, 0x4d, 0x45, 0x03, 0x05, 0x03, + 0x15, 0x49, 0x0f, 0x40, 0x48, 0x40, 0x41, 0x07, 0x41, 0x05, 0x05, 0x40, 0x07, 0x19, 0x0a, 0x49, + 0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x46, + 0x07, 0x05, 0x05, 0x0b, 0x15, 0x0b, 0x15, 0x11, 0x17, 0x0a, 0x49, 0x17, 0x0a, 0x49, 0x40, 0x40, + 0x40, 0x1c, 0x1c, 0x11, 0x40, 0x0f, 0x11, 0x12, 0x12, 0x26, 0x27, 0x16, 0x07, 0x15, 0x16, 0x0e, + 0x01, 0x2c, 0x19, 0x11, 0x40, 0x11, 0x0e, 0x12, 0x0b, 0x11, 0x12, 0x0d, 0x0b, 0x11, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x45, 0x0c, 0x41, 0x52, 0x40, 0x13, 0x45, 0x4c, 0x27, 0x40, 0x41, 0x40, 0x40, 0x40, 0x0f, + 0x41, 0x45, 0x4b, 0x0d, 0x4c, 0x45, 0x01, 0x0e, 0x0e, 0x07, 0x07, 0x09, 0x42, 0x06, 0x44, 0x07, + 0x53, 0x27, 0x0c, 0x11, 0x40, 0x49, 0x0b, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4a, 0x4b, 0x44, 0x4b, + 0x4c, 0x45, 0x4a, 0x53, 0x4b, 0x02, 0x4b, 0x53, 0x53, 0x4c, 0x44, 0x04, 0x05, 0x04, 0x4a, 0x4b, + 0x44, 0x4b, 0x4c, 0x45, 0x4a, 0x53, 0x4b, 0x02, 0x4b, 0x53, 0x53, 0x4c, 0x44, 0x04, 0x05, 0x04, + 0x15, 0x49, 0x11, 0x40, 0x48, 0x40, 0x41, 0x07, 0x41, 0x05, 0x05, 0x01, 0x07, 0x19, 0x0a, 0x49, + 0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x46, + 0x07, 0x05, 0x05, 0x0c, 0x15, 0x0c, 0x15, 0x11, 0x17, 0x0a, 0x49, 0x17, 0x0a, 0x49, 0x40, 0x40, + 0x40, 0x1b, 0x1b, 0x11, 0x40, 0x0f, 0x11, 0x12, 0x12, 0x26, 0x27, 0x16, 0x07, 0x15, 0x16, 0x0e, + 0x01, 0x2b, 0x19, 0x11, 0x40, 0x11, 0x0e, 0x12, 0x0c, 0x11, 0x13, 0x0d, 0x0c, 0x11, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x46, 0x0d, 0x40, 0x51, 0x40, 0x12, 0x46, 0x4d, 0x27, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0f, + 0x40, 0x44, 0x4a, 0x0e, 0x4b, 0x44, 0x03, 0x11, 0x11, 0x07, 0x07, 0x08, 0x41, 0x07, 0x43, 0x07, + 0x52, 0x27, 0x0d, 0x10, 0x40, 0x48, 0x0a, 0x40, 0x40, 0x40, 0x40, 0x40, 0x49, 0x4a, 0x43, 0x4a, + 0x4b, 0x44, 0x49, 0x52, 0x4a, 0x03, 0x4a, 0x52, 0x52, 0x4b, 0x43, 0x05, 0x06, 0x05, 0x49, 0x4a, + 0x43, 0x4a, 0x4b, 0x44, 0x49, 0x52, 0x4a, 0x03, 0x4a, 0x52, 0x52, 0x4b, 0x43, 0x05, 0x06, 0x05, + 0x16, 0x48, 0x13, 0x40, 0x48, 0x40, 0x40, 0x07, 0x40, 0x06, 0x06, 0x03, 0x07, 0x18, 0x09, 0x48, + 0x17, 0x07, 0x40, 0x18, 0x09, 0x48, 0x17, 0x07, 0x40, 0x18, 0x09, 0x48, 0x17, 0x07, 0x40, 0x47, + 0x07, 0x06, 0x06, 0x0d, 0x16, 0x0d, 0x16, 0x10, 0x17, 0x09, 0x48, 0x17, 0x09, 0x48, 0x40, 0x40, + 0x40, 0x1a, 0x1a, 0x10, 0x40, 0x0f, 0x10, 0x11, 0x11, 0x27, 0x27, 0x17, 0x07, 0x16, 0x17, 0x0f, + 0x00, 0x2a, 0x18, 0x10, 0x40, 0x10, 0x0f, 0x11, 0x0d, 0x10, 0x14, 0x0e, 0x0d, 0x10, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x47, 0x0e, 0x40, 0x51, 0x40, 0x11, 0x47, 0x4e, 0x27, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0f, + 0x40, 0x42, 0x49, 0x0e, 0x4a, 0x42, 0x04, 0x13, 0x13, 0x07, 0x07, 0x08, 0x41, 0x07, 0x42, 0x07, + 0x51, 0x27, 0x0e, 0x10, 0x40, 0x48, 0x09, 0x40, 0x40, 0x40, 0x40, 0x40, 0x49, 0x49, 0x42, 0x49, + 0x4a, 0x42, 0x49, 0x51, 0x49, 0x05, 0x49, 0x51, 0x51, 0x4a, 0x42, 0x06, 0x06, 0x06, 0x49, 0x49, + 0x42, 0x49, 0x4a, 0x42, 0x49, 0x51, 0x49, 0x05, 0x49, 0x51, 0x51, 0x4a, 0x42, 0x06, 0x06, 0x06, + 0x16, 0x48, 0x14, 0x40, 0x48, 0x40, 0x40, 0x07, 0x40, 0x06, 0x06, 0x04, 0x07, 0x18, 0x08, 0x48, + 0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x47, + 0x07, 0x06, 0x06, 0x0e, 0x16, 0x0e, 0x16, 0x10, 0x17, 0x08, 0x48, 0x17, 0x08, 0x48, 0x40, 0x40, + 0x40, 0x19, 0x19, 0x10, 0x40, 0x0f, 0x10, 0x10, 0x10, 0x27, 0x27, 0x17, 0x07, 0x16, 0x17, 0x0f, + 0x00, 0x29, 0x18, 0x10, 0x40, 0x10, 0x0f, 0x10, 0x0e, 0x10, 0x15, 0x0e, 0x0e, 0x10, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x47, 0x0f, 0x40, 0x50, 0x40, 0x10, 0x47, 0x4f, 0x27, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0f, + 0x40, 0x40, 0x48, 0x0f, 0x48, 0x40, 0x06, 0x16, 0x16, 0x07, 0x07, 0x08, 0x40, 0x07, 0x40, 0x07, + 0x50, 0x27, 0x0f, 0x10, 0x40, 0x48, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x48, 0x48, 0x40, 0x48, + 0x48, 0x40, 0x48, 0x50, 0x48, 0x07, 0x48, 0x50, 0x50, 0x48, 0x40, 0x07, 0x07, 0x07, 0x48, 0x48, + 0x40, 0x48, 0x48, 0x40, 0x48, 0x50, 0x48, 0x07, 0x48, 0x50, 0x50, 0x48, 0x40, 0x07, 0x07, 0x07, + 0x17, 0x48, 0x16, 0x40, 0x48, 0x40, 0x40, 0x07, 0x40, 0x07, 0x07, 0x06, 0x07, 0x18, 0x08, 0x48, + 0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x47, + 0x07, 0x07, 0x07, 0x0f, 0x17, 0x0f, 0x17, 0x10, 0x17, 0x08, 0x48, 0x17, 0x08, 0x48, 0x40, 0x40, + 0x40, 0x18, 0x18, 0x10, 0x40, 0x0f, 0x10, 0x10, 0x10, 0x27, 0x27, 0x17, 0x07, 0x17, 0x17, 0x0f, + 0x00, 0x28, 0x18, 0x10, 0x40, 0x10, 0x0f, 0x10, 0x0f, 0x10, 0x17, 0x0f, 0x0f, 0x10, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x48, 0x10, 0x00, 0x4f, 0x40, 0x0f, 0x48, 0x50, 0x27, 0x40, 0x00, 0x40, 0x40, 0x40, 0x0f, + 0x00, 0x00, 0x47, 0x10, 0x47, 0x00, 0x08, 0x18, 0x18, 0x07, 0x07, 0x07, 0x00, 0x08, 0x00, 0x07, + 0x4f, 0x27, 0x10, 0x0f, 0x40, 0x47, 0x07, 0x40, 0x40, 0x40, 0x00, 0x00, 0x47, 0x47, 0x00, 0x47, + 0x47, 0x00, 0x47, 0x4f, 0x47, 0x08, 0x47, 0x4f, 0x4f, 0x47, 0x00, 0x08, 0x08, 0x08, 0x47, 0x47, + 0x00, 0x47, 0x47, 0x00, 0x47, 0x4f, 0x47, 0x08, 0x47, 0x4f, 0x4f, 0x47, 0x00, 0x08, 0x08, 0x08, + 0x18, 0x47, 0x18, 0x40, 0x48, 0x40, 0x00, 0x07, 0x00, 0x08, 0x08, 0x08, 0x07, 0x17, 0x07, 0x47, + 0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x48, + 0x07, 0x08, 0x08, 0x10, 0x18, 0x10, 0x18, 0x0f, 0x17, 0x07, 0x47, 0x17, 0x07, 0x47, 0x40, 0x40, + 0x40, 0x17, 0x17, 0x0f, 0x40, 0x0f, 0x0f, 0x0f, 0x0f, 0x28, 0x27, 0x18, 0x07, 0x18, 0x18, 0x10, + 0x40, 0x27, 0x17, 0x0f, 0x40, 0x0f, 0x10, 0x0f, 0x10, 0x0f, 0x18, 0x10, 0x10, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x48, 0x11, 0x00, 0x4f, 0x40, 0x0e, 0x48, 0x51, 0x27, 0x40, 0x00, 0x40, 0x40, 0x40, 0x0f, + 0x00, 0x02, 0x46, 0x10, 0x46, 0x02, 0x0a, 0x1b, 0x1b, 0x07, 0x07, 0x07, 0x00, 0x08, 0x01, 0x07, + 0x4e, 0x27, 0x11, 0x0f, 0x40, 0x47, 0x06, 0x40, 0x40, 0x40, 0x00, 0x00, 0x47, 0x46, 0x01, 0x46, + 0x46, 0x02, 0x47, 0x4e, 0x46, 0x0a, 0x46, 0x4e, 0x4e, 0x46, 0x01, 0x09, 0x08, 0x09, 0x47, 0x46, + 0x01, 0x46, 0x46, 0x02, 0x47, 0x4e, 0x46, 0x0a, 0x46, 0x4e, 0x4e, 0x46, 0x01, 0x09, 0x08, 0x09, + 0x18, 0x47, 0x1a, 0x40, 0x48, 0x40, 0x00, 0x07, 0x00, 0x08, 0x08, 0x0a, 0x07, 0x17, 0x07, 0x47, + 0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x48, + 0x07, 0x08, 0x08, 0x11, 0x18, 0x11, 0x18, 0x0f, 0x17, 0x07, 0x47, 0x17, 0x07, 0x47, 0x40, 0x40, + 0x40, 0x16, 0x16, 0x0f, 0x40, 0x0f, 0x0f, 0x0f, 0x0f, 0x28, 0x27, 0x18, 0x07, 0x18, 0x18, 0x10, + 0x40, 0x26, 0x17, 0x0f, 0x40, 0x0f, 0x10, 0x0f, 0x11, 0x0f, 0x19, 0x10, 0x11, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x49, 0x12, 0x00, 0x4e, 0x40, 0x0d, 0x49, 0x52, 0x27, 0x40, 0x00, 0x40, 0x40, 0x40, 0x0f, + 0x00, 0x03, 0x45, 0x11, 0x45, 0x03, 0x0c, 0x1d, 0x1d, 0x07, 0x07, 0x07, 0x01, 0x08, 0x02, 0x07, + 0x4d, 0x27, 0x12, 0x0f, 0x40, 0x47, 0x05, 0x40, 0x40, 0x40, 0x00, 0x00, 0x46, 0x45, 0x02, 0x45, + 0x45, 0x03, 0x46, 0x4d, 0x45, 0x0b, 0x45, 0x4d, 0x4d, 0x45, 0x02, 0x0a, 0x09, 0x0a, 0x46, 0x45, + 0x02, 0x45, 0x45, 0x03, 0x46, 0x4d, 0x45, 0x0b, 0x45, 0x4d, 0x4d, 0x45, 0x02, 0x0a, 0x09, 0x0a, + 0x19, 0x47, 0x1c, 0x40, 0x48, 0x40, 0x00, 0x07, 0x00, 0x09, 0x09, 0x0c, 0x07, 0x17, 0x06, 0x47, + 0x18, 0x07, 0x40, 0x17, 0x06, 0x47, 0x18, 0x07, 0x40, 0x17, 0x06, 0x47, 0x18, 0x07, 0x40, 0x48, + 0x07, 0x09, 0x09, 0x12, 0x19, 0x12, 0x19, 0x0f, 0x17, 0x06, 0x47, 0x17, 0x06, 0x47, 0x40, 0x40, + 0x40, 0x15, 0x15, 0x0f, 0x40, 0x0f, 0x0f, 0x0e, 0x0e, 0x28, 0x27, 0x18, 0x07, 0x19, 0x18, 0x10, + 0x40, 0x25, 0x17, 0x0f, 0x40, 0x0f, 0x10, 0x0e, 0x12, 0x0f, 0x1a, 0x11, 0x12, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4a, 0x13, 0x01, 0x4d, 0x40, 0x0c, 0x4a, 0x53, 0x27, 0x40, 0x01, 0x40, 0x40, 0x40, 0x0f, + 0x01, 0x05, 0x44, 0x12, 0x43, 0x05, 0x0e, 0x20, 0x20, 0x07, 0x07, 0x06, 0x02, 0x09, 0x04, 0x07, + 0x4c, 0x27, 0x13, 0x0e, 0x40, 0x46, 0x04, 0x40, 0x40, 0x40, 0x01, 0x01, 0x45, 0x44, 0x04, 0x44, + 0x43, 0x05, 0x45, 0x4c, 0x44, 0x0d, 0x44, 0x4c, 0x4c, 0x43, 0x04, 0x0b, 0x0a, 0x0b, 0x45, 0x44, + 0x04, 0x44, 0x43, 0x05, 0x45, 0x4c, 0x44, 0x0d, 0x44, 0x4c, 0x4c, 0x43, 0x04, 0x0b, 0x0a, 0x0b, + 0x1a, 0x46, 0x1e, 0x40, 0x48, 0x40, 0x01, 0x07, 0x01, 0x0a, 0x0a, 0x0e, 0x07, 0x16, 0x05, 0x46, + 0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x49, + 0x07, 0x0a, 0x0a, 0x13, 0x1a, 0x13, 0x1a, 0x0e, 0x17, 0x05, 0x46, 0x17, 0x05, 0x46, 0x40, 0x40, + 0x40, 0x14, 0x14, 0x0e, 0x40, 0x0f, 0x0e, 0x0d, 0x0d, 0x29, 0x27, 0x19, 0x07, 0x1a, 0x19, 0x11, + 0x41, 0x24, 0x16, 0x0e, 0x40, 0x0e, 0x11, 0x0d, 0x13, 0x0e, 0x1c, 0x12, 0x13, 0x0e, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4a, 0x14, 0x01, 0x4d, 0x40, 0x0b, 0x4a, 0x54, 0x27, 0x40, 0x01, 0x40, 0x40, 0x40, 0x0f, + 0x01, 0x06, 0x43, 0x12, 0x42, 0x06, 0x10, 0x22, 0x22, 0x07, 0x07, 0x06, 0x02, 0x09, 0x05, 0x07, + 0x4b, 0x27, 0x14, 0x0e, 0x40, 0x46, 0x03, 0x40, 0x40, 0x40, 0x01, 0x01, 0x45, 0x43, 0x05, 0x43, + 0x42, 0x06, 0x45, 0x4b, 0x43, 0x0e, 0x43, 0x4b, 0x4b, 0x42, 0x05, 0x0c, 0x0a, 0x0c, 0x45, 0x43, + 0x05, 0x43, 0x42, 0x06, 0x45, 0x4b, 0x43, 0x0e, 0x43, 0x4b, 0x4b, 0x42, 0x05, 0x0c, 0x0a, 0x0c, + 0x1a, 0x46, 0x20, 0x40, 0x48, 0x40, 0x01, 0x07, 0x01, 0x0a, 0x0a, 0x10, 0x07, 0x16, 0x05, 0x46, + 0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x49, + 0x07, 0x0a, 0x0a, 0x14, 0x1a, 0x14, 0x1a, 0x0e, 0x17, 0x05, 0x46, 0x17, 0x05, 0x46, 0x40, 0x40, + 0x40, 0x13, 0x13, 0x0e, 0x40, 0x0f, 0x0e, 0x0d, 0x0d, 0x29, 0x27, 0x19, 0x07, 0x1a, 0x19, 0x11, + 0x41, 0x23, 0x16, 0x0e, 0x40, 0x0e, 0x11, 0x0d, 0x14, 0x0e, 0x1d, 0x12, 0x14, 0x0e, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4b, 0x15, 0x01, 0x4c, 0x40, 0x0a, 0x4b, 0x55, 0x27, 0x40, 0x01, 0x40, 0x40, 0x40, 0x0f, + 0x01, 0x08, 0x42, 0x13, 0x41, 0x08, 0x12, 0x25, 0x25, 0x07, 0x07, 0x06, 0x03, 0x09, 0x06, 0x07, + 0x4a, 0x27, 0x15, 0x0e, 0x40, 0x46, 0x02, 0x40, 0x40, 0x40, 0x01, 0x01, 0x44, 0x42, 0x06, 0x42, + 0x41, 0x08, 0x44, 0x4a, 0x42, 0x10, 0x42, 0x4a, 0x4a, 0x41, 0x06, 0x0d, 0x0b, 0x0d, 0x44, 0x42, + 0x06, 0x42, 0x41, 0x08, 0x44, 0x4a, 0x42, 0x10, 0x42, 0x4a, 0x4a, 0x41, 0x06, 0x0d, 0x0b, 0x0d, + 0x1b, 0x46, 0x22, 0x40, 0x48, 0x40, 0x01, 0x07, 0x01, 0x0b, 0x0b, 0x12, 0x07, 0x16, 0x04, 0x46, + 0x19, 0x07, 0x40, 0x16, 0x04, 0x46, 0x19, 0x07, 0x40, 0x16, 0x04, 0x46, 0x19, 0x07, 0x40, 0x49, + 0x07, 0x0b, 0x0b, 0x15, 0x1b, 0x15, 0x1b, 0x0e, 0x17, 0x04, 0x46, 0x17, 0x04, 0x46, 0x40, 0x40, + 0x40, 0x12, 0x12, 0x0e, 0x40, 0x0f, 0x0e, 0x0c, 0x0c, 0x29, 0x27, 0x19, 0x07, 0x1b, 0x19, 0x11, + 0x41, 0x22, 0x16, 0x0e, 0x40, 0x0e, 0x11, 0x0c, 0x15, 0x0e, 0x1e, 0x13, 0x15, 0x0e, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4c, 0x15, 0x01, 0x4c, 0x40, 0x09, 0x4c, 0x56, 0x27, 0x40, 0x01, 0x40, 0x40, 0x40, 0x0f, + 0x01, 0x09, 0x42, 0x13, 0x40, 0x09, 0x13, 0x27, 0x27, 0x07, 0x07, 0x05, 0x03, 0x09, 0x07, 0x07, + 0x4a, 0x27, 0x15, 0x0d, 0x40, 0x46, 0x01, 0x40, 0x40, 0x40, 0x01, 0x01, 0x44, 0x42, 0x07, 0x42, + 0x40, 0x09, 0x44, 0x4a, 0x42, 0x11, 0x42, 0x4a, 0x4a, 0x40, 0x07, 0x0d, 0x0b, 0x0d, 0x44, 0x42, + 0x07, 0x42, 0x40, 0x09, 0x44, 0x4a, 0x42, 0x11, 0x42, 0x4a, 0x4a, 0x40, 0x07, 0x0d, 0x0b, 0x0d, + 0x1b, 0x46, 0x23, 0x40, 0x48, 0x40, 0x01, 0x07, 0x01, 0x0b, 0x0b, 0x13, 0x07, 0x15, 0x03, 0x46, + 0x19, 0x07, 0x40, 0x15, 0x03, 0x46, 0x19, 0x07, 0x40, 0x15, 0x03, 0x46, 0x19, 0x07, 0x40, 0x4a, + 0x07, 0x0b, 0x0b, 0x15, 0x1b, 0x15, 0x1b, 0x0d, 0x17, 0x03, 0x46, 0x17, 0x03, 0x46, 0x40, 0x40, + 0x40, 0x11, 0x11, 0x0d, 0x40, 0x0f, 0x0d, 0x0b, 0x0b, 0x29, 0x27, 0x19, 0x07, 0x1b, 0x19, 0x11, + 0x42, 0x21, 0x15, 0x0d, 0x40, 0x0d, 0x11, 0x0b, 0x15, 0x0d, 0x1f, 0x13, 0x15, 0x0d, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4c, 0x16, 0x02, 0x4b, 0x40, 0x09, 0x4c, 0x56, 0x27, 0x40, 0x02, 0x40, 0x40, 0x40, 0x0f, + 0x02, 0x0b, 0x41, 0x14, 0x01, 0x0b, 0x15, 0x2a, 0x2a, 0x07, 0x07, 0x05, 0x04, 0x0a, 0x09, 0x07, + 0x49, 0x27, 0x16, 0x0d, 0x40, 0x45, 0x01, 0x40, 0x40, 0x40, 0x02, 0x02, 0x43, 0x41, 0x09, 0x41, + 0x01, 0x0b, 0x43, 0x49, 0x41, 0x13, 0x41, 0x49, 0x49, 0x01, 0x09, 0x0e, 0x0c, 0x0e, 0x43, 0x41, + 0x09, 0x41, 0x01, 0x0b, 0x43, 0x49, 0x41, 0x13, 0x41, 0x49, 0x49, 0x01, 0x09, 0x0e, 0x0c, 0x0e, + 0x1c, 0x45, 0x25, 0x40, 0x48, 0x40, 0x02, 0x07, 0x02, 0x0c, 0x0c, 0x15, 0x07, 0x15, 0x03, 0x45, + 0x1a, 0x07, 0x40, 0x15, 0x03, 0x45, 0x1a, 0x07, 0x40, 0x15, 0x03, 0x45, 0x1a, 0x07, 0x40, 0x4a, + 0x07, 0x0c, 0x0c, 0x16, 0x1c, 0x16, 0x1c, 0x0d, 0x17, 0x03, 0x45, 0x17, 0x03, 0x45, 0x40, 0x40, + 0x40, 0x11, 0x11, 0x0d, 0x40, 0x0f, 0x0d, 0x0b, 0x0b, 0x2a, 0x27, 0x1a, 0x07, 0x1c, 0x1a, 0x12, + 0x42, 0x21, 0x15, 0x0d, 0x40, 0x0d, 0x12, 0x0b, 0x16, 0x0d, 0x21, 0x14, 0x16, 0x0d, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4d, 0x17, 0x02, 0x4a, 0x40, 0x08, 0x4d, 0x57, 0x27, 0x40, 0x02, 0x40, 0x40, 0x40, 0x0f, + 0x02, 0x0d, 0x40, 0x15, 0x02, 0x0d, 0x17, 0x2c, 0x2c, 0x07, 0x07, 0x05, 0x05, 0x0a, 0x0a, 0x07, + 0x48, 0x27, 0x17, 0x0d, 0x40, 0x45, 0x00, 0x40, 0x40, 0x40, 0x02, 0x02, 0x42, 0x40, 0x0a, 0x40, + 0x02, 0x0d, 0x42, 0x48, 0x40, 0x15, 0x40, 0x48, 0x48, 0x02, 0x0a, 0x0f, 0x0d, 0x0f, 0x42, 0x40, + 0x0a, 0x40, 0x02, 0x0d, 0x42, 0x48, 0x40, 0x15, 0x40, 0x48, 0x48, 0x02, 0x0a, 0x0f, 0x0d, 0x0f, + 0x1d, 0x45, 0x27, 0x40, 0x48, 0x40, 0x02, 0x07, 0x02, 0x0d, 0x0d, 0x17, 0x07, 0x15, 0x02, 0x45, + 0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x4a, + 0x07, 0x0d, 0x0d, 0x17, 0x1d, 0x17, 0x1d, 0x0d, 0x17, 0x02, 0x45, 0x17, 0x02, 0x45, 0x40, 0x40, + 0x40, 0x10, 0x10, 0x0d, 0x40, 0x0f, 0x0d, 0x0a, 0x0a, 0x2a, 0x27, 0x1a, 0x07, 0x1d, 0x1a, 0x12, + 0x42, 0x20, 0x15, 0x0d, 0x40, 0x0d, 0x12, 0x0a, 0x17, 0x0d, 0x22, 0x15, 0x17, 0x0d, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4d, 0x18, 0x02, 0x4a, 0x40, 0x07, 0x4d, 0x58, 0x27, 0x40, 0x02, 0x40, 0x40, 0x40, 0x0f, + 0x02, 0x0e, 0x00, 0x15, 0x03, 0x0e, 0x19, 0x2f, 0x2f, 0x07, 0x07, 0x05, 0x05, 0x0a, 0x0b, 0x07, + 0x47, 0x27, 0x18, 0x0d, 0x40, 0x45, 0x40, 0x40, 0x40, 0x40, 0x02, 0x02, 0x42, 0x00, 0x0b, 0x00, + 0x03, 0x0e, 0x42, 0x47, 0x00, 0x16, 0x00, 0x47, 0x47, 0x03, 0x0b, 0x10, 0x0d, 0x10, 0x42, 0x00, + 0x0b, 0x00, 0x03, 0x0e, 0x42, 0x47, 0x00, 0x16, 0x00, 0x47, 0x47, 0x03, 0x0b, 0x10, 0x0d, 0x10, + 0x1d, 0x45, 0x29, 0x40, 0x48, 0x40, 0x02, 0x07, 0x02, 0x0d, 0x0d, 0x19, 0x07, 0x15, 0x02, 0x45, + 0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x4a, + 0x07, 0x0d, 0x0d, 0x18, 0x1d, 0x18, 0x1d, 0x0d, 0x17, 0x02, 0x45, 0x17, 0x02, 0x45, 0x40, 0x40, + 0x40, 0x0f, 0x0f, 0x0d, 0x40, 0x0f, 0x0d, 0x0a, 0x0a, 0x2a, 0x27, 0x1a, 0x07, 0x1d, 0x1a, 0x12, + 0x42, 0x1f, 0x15, 0x0d, 0x40, 0x0d, 0x12, 0x0a, 0x18, 0x0d, 0x23, 0x15, 0x18, 0x0d, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4e, 0x19, 0x03, 0x49, 0x40, 0x06, 0x4e, 0x59, 0x27, 0x40, 0x03, 0x40, 0x40, 0x40, 0x0f, + 0x03, 0x10, 0x01, 0x16, 0x04, 0x10, 0x1b, 0x31, 0x31, 0x07, 0x07, 0x04, 0x06, 0x0b, 0x0c, 0x07, + 0x46, 0x27, 0x19, 0x0c, 0x40, 0x44, 0x41, 0x40, 0x40, 0x40, 0x03, 0x03, 0x41, 0x01, 0x0c, 0x01, + 0x04, 0x10, 0x41, 0x46, 0x01, 0x18, 0x01, 0x46, 0x46, 0x04, 0x0c, 0x11, 0x0e, 0x11, 0x41, 0x01, + 0x0c, 0x01, 0x04, 0x10, 0x41, 0x46, 0x01, 0x18, 0x01, 0x46, 0x46, 0x04, 0x0c, 0x11, 0x0e, 0x11, + 0x1e, 0x44, 0x2b, 0x40, 0x48, 0x40, 0x03, 0x07, 0x03, 0x0e, 0x0e, 0x1b, 0x07, 0x14, 0x01, 0x44, + 0x1b, 0x07, 0x40, 0x14, 0x01, 0x44, 0x1b, 0x07, 0x40, 0x14, 0x01, 0x44, 0x1b, 0x07, 0x40, 0x4b, + 0x07, 0x0e, 0x0e, 0x19, 0x1e, 0x19, 0x1e, 0x0c, 0x17, 0x01, 0x44, 0x17, 0x01, 0x44, 0x40, 0x40, + 0x40, 0x0e, 0x0e, 0x0c, 0x40, 0x0f, 0x0c, 0x09, 0x09, 0x2b, 0x27, 0x1b, 0x07, 0x1e, 0x1b, 0x13, + 0x43, 0x1e, 0x14, 0x0c, 0x40, 0x0c, 0x13, 0x09, 0x19, 0x0c, 0x24, 0x16, 0x19, 0x0c, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4f, 0x1a, 0x03, 0x48, 0x40, 0x05, 0x4f, 0x5a, 0x27, 0x40, 0x03, 0x40, 0x40, 0x40, 0x0f, + 0x03, 0x11, 0x02, 0x17, 0x06, 0x11, 0x1d, 0x34, 0x34, 0x07, 0x07, 0x04, 0x07, 0x0b, 0x0e, 0x07, + 0x45, 0x27, 0x1a, 0x0c, 0x40, 0x44, 0x42, 0x40, 0x40, 0x40, 0x03, 0x03, 0x40, 0x02, 0x0e, 0x02, + 0x06, 0x11, 0x40, 0x45, 0x02, 0x19, 0x02, 0x45, 0x45, 0x06, 0x0e, 0x12, 0x0f, 0x12, 0x40, 0x02, + 0x0e, 0x02, 0x06, 0x11, 0x40, 0x45, 0x02, 0x19, 0x02, 0x45, 0x45, 0x06, 0x0e, 0x12, 0x0f, 0x12, + 0x1f, 0x44, 0x2d, 0x40, 0x48, 0x40, 0x03, 0x07, 0x03, 0x0f, 0x0f, 0x1d, 0x07, 0x14, 0x00, 0x44, + 0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x4b, + 0x07, 0x0f, 0x0f, 0x1a, 0x1f, 0x1a, 0x1f, 0x0c, 0x17, 0x00, 0x44, 0x17, 0x00, 0x44, 0x40, 0x40, + 0x40, 0x0d, 0x0d, 0x0c, 0x40, 0x0f, 0x0c, 0x08, 0x08, 0x2b, 0x27, 0x1b, 0x07, 0x1f, 0x1b, 0x13, + 0x43, 0x1d, 0x14, 0x0c, 0x40, 0x0c, 0x13, 0x08, 0x1a, 0x0c, 0x26, 0x17, 0x1a, 0x0c, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4f, 0x1b, 0x03, 0x48, 0x40, 0x04, 0x4f, 0x5b, 0x27, 0x40, 0x03, 0x40, 0x40, 0x40, 0x0f, + 0x03, 0x13, 0x03, 0x17, 0x07, 0x13, 0x1f, 0x36, 0x36, 0x07, 0x07, 0x04, 0x07, 0x0b, 0x0f, 0x07, + 0x44, 0x27, 0x1b, 0x0c, 0x40, 0x44, 0x43, 0x40, 0x40, 0x40, 0x03, 0x03, 0x40, 0x03, 0x0f, 0x03, + 0x07, 0x13, 0x40, 0x44, 0x03, 0x1b, 0x03, 0x44, 0x44, 0x07, 0x0f, 0x13, 0x0f, 0x13, 0x40, 0x03, + 0x0f, 0x03, 0x07, 0x13, 0x40, 0x44, 0x03, 0x1b, 0x03, 0x44, 0x44, 0x07, 0x0f, 0x13, 0x0f, 0x13, + 0x1f, 0x44, 0x2f, 0x40, 0x48, 0x40, 0x03, 0x07, 0x03, 0x0f, 0x0f, 0x1f, 0x07, 0x14, 0x00, 0x44, + 0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x4b, + 0x07, 0x0f, 0x0f, 0x1b, 0x1f, 0x1b, 0x1f, 0x0c, 0x17, 0x00, 0x44, 0x17, 0x00, 0x44, 0x40, 0x40, + 0x40, 0x0c, 0x0c, 0x0c, 0x40, 0x0f, 0x0c, 0x08, 0x08, 0x2b, 0x27, 0x1b, 0x07, 0x1f, 0x1b, 0x13, + 0x43, 0x1c, 0x14, 0x0c, 0x40, 0x0c, 0x13, 0x08, 0x1b, 0x0c, 0x27, 0x17, 0x1b, 0x0c, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x50, 0x1c, 0x04, 0x47, 0x40, 0x03, 0x50, 0x5c, 0x27, 0x40, 0x04, 0x40, 0x40, 0x40, 0x0f, + 0x04, 0x14, 0x04, 0x18, 0x08, 0x14, 0x21, 0x39, 0x39, 0x07, 0x07, 0x03, 0x08, 0x0c, 0x10, 0x07, + 0x43, 0x27, 0x1c, 0x0b, 0x40, 0x43, 0x44, 0x40, 0x40, 0x40, 0x04, 0x04, 0x00, 0x04, 0x10, 0x04, + 0x08, 0x14, 0x00, 0x43, 0x04, 0x1c, 0x04, 0x43, 0x43, 0x08, 0x10, 0x14, 0x10, 0x14, 0x00, 0x04, + 0x10, 0x04, 0x08, 0x14, 0x00, 0x43, 0x04, 0x1c, 0x04, 0x43, 0x43, 0x08, 0x10, 0x14, 0x10, 0x14, + 0x20, 0x43, 0x31, 0x40, 0x48, 0x40, 0x04, 0x07, 0x04, 0x10, 0x10, 0x21, 0x07, 0x13, 0x40, 0x43, + 0x1c, 0x07, 0x40, 0x13, 0x40, 0x43, 0x1c, 0x07, 0x40, 0x13, 0x40, 0x43, 0x1c, 0x07, 0x40, 0x4c, + 0x07, 0x10, 0x10, 0x1c, 0x20, 0x1c, 0x20, 0x0b, 0x17, 0x40, 0x43, 0x17, 0x40, 0x43, 0x40, 0x40, + 0x40, 0x0b, 0x0b, 0x0b, 0x40, 0x0f, 0x0b, 0x07, 0x07, 0x2c, 0x27, 0x1c, 0x07, 0x20, 0x1c, 0x14, + 0x44, 0x1b, 0x13, 0x0b, 0x40, 0x0b, 0x14, 0x07, 0x1c, 0x0b, 0x28, 0x18, 0x1c, 0x0b, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x51, 0x1d, 0x04, 0x47, 0x40, 0x02, 0x51, 0x5d, 0x27, 0x40, 0x04, 0x40, 0x40, 0x40, 0x0f, + 0x04, 0x16, 0x05, 0x18, 0x09, 0x16, 0x22, 0x3b, 0x3b, 0x07, 0x07, 0x03, 0x08, 0x0c, 0x11, 0x07, + 0x42, 0x27, 0x1d, 0x0b, 0x40, 0x43, 0x45, 0x40, 0x40, 0x40, 0x04, 0x04, 0x00, 0x05, 0x11, 0x05, + 0x09, 0x16, 0x00, 0x42, 0x05, 0x1e, 0x05, 0x42, 0x42, 0x09, 0x11, 0x15, 0x10, 0x15, 0x00, 0x05, + 0x11, 0x05, 0x09, 0x16, 0x00, 0x42, 0x05, 0x1e, 0x05, 0x42, 0x42, 0x09, 0x11, 0x15, 0x10, 0x15, + 0x20, 0x43, 0x32, 0x40, 0x48, 0x40, 0x04, 0x07, 0x04, 0x10, 0x10, 0x22, 0x07, 0x13, 0x41, 0x43, + 0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x4c, + 0x07, 0x10, 0x10, 0x1d, 0x20, 0x1d, 0x20, 0x0b, 0x17, 0x41, 0x43, 0x17, 0x41, 0x43, 0x40, 0x40, + 0x40, 0x0a, 0x0a, 0x0b, 0x40, 0x0f, 0x0b, 0x06, 0x06, 0x2c, 0x27, 0x1c, 0x07, 0x20, 0x1c, 0x14, + 0x44, 0x1a, 0x13, 0x0b, 0x40, 0x0b, 0x14, 0x06, 0x1d, 0x0b, 0x29, 0x18, 0x1d, 0x0b, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x51, 0x1e, 0x04, 0x46, 0x40, 0x01, 0x51, 0x5e, 0x27, 0x40, 0x04, 0x40, 0x40, 0x40, 0x0f, + 0x04, 0x18, 0x06, 0x19, 0x0b, 0x18, 0x24, 0x3e, 0x3e, 0x07, 0x07, 0x03, 0x09, 0x0c, 0x13, 0x07, + 0x41, 0x27, 0x1e, 0x0b, 0x40, 0x43, 0x46, 0x40, 0x40, 0x40, 0x04, 0x04, 0x01, 0x06, 0x13, 0x06, + 0x0b, 0x18, 0x01, 0x41, 0x06, 0x20, 0x06, 0x41, 0x41, 0x0b, 0x13, 0x16, 0x11, 0x16, 0x01, 0x06, + 0x13, 0x06, 0x0b, 0x18, 0x01, 0x41, 0x06, 0x20, 0x06, 0x41, 0x41, 0x0b, 0x13, 0x16, 0x11, 0x16, + 0x21, 0x43, 0x34, 0x40, 0x48, 0x40, 0x04, 0x07, 0x04, 0x11, 0x11, 0x24, 0x07, 0x13, 0x41, 0x43, + 0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x4c, + 0x07, 0x11, 0x11, 0x1e, 0x21, 0x1e, 0x21, 0x0b, 0x17, 0x41, 0x43, 0x17, 0x41, 0x43, 0x40, 0x40, + 0x40, 0x09, 0x09, 0x0b, 0x40, 0x0f, 0x0b, 0x06, 0x06, 0x2c, 0x27, 0x1c, 0x07, 0x21, 0x1c, 0x14, + 0x44, 0x19, 0x13, 0x0b, 0x40, 0x0b, 0x14, 0x06, 0x1e, 0x0b, 0x2b, 0x19, 0x1e, 0x0b, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x52, 0x1f, 0x05, 0x45, 0x40, 0x00, 0x52, 0x5f, 0x27, 0x40, 0x05, 0x40, 0x40, 0x40, 0x0f, + 0x05, 0x19, 0x07, 0x1a, 0x0c, 0x19, 0x26, 0x3e, 0x3e, 0x07, 0x07, 0x02, 0x0a, 0x0d, 0x14, 0x07, + 0x40, 0x27, 0x1f, 0x0a, 0x40, 0x42, 0x47, 0x40, 0x40, 0x40, 0x05, 0x05, 0x02, 0x07, 0x14, 0x07, + 0x0c, 0x19, 0x02, 0x40, 0x07, 0x21, 0x07, 0x40, 0x40, 0x0c, 0x14, 0x17, 0x12, 0x17, 0x02, 0x07, + 0x14, 0x07, 0x0c, 0x19, 0x02, 0x40, 0x07, 0x21, 0x07, 0x40, 0x40, 0x0c, 0x14, 0x17, 0x12, 0x17, + 0x22, 0x42, 0x36, 0x40, 0x48, 0x40, 0x05, 0x07, 0x05, 0x12, 0x12, 0x26, 0x07, 0x12, 0x42, 0x42, + 0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x4d, + 0x07, 0x12, 0x12, 0x1f, 0x22, 0x1f, 0x22, 0x0a, 0x17, 0x42, 0x42, 0x17, 0x42, 0x42, 0x40, 0x40, + 0x40, 0x08, 0x08, 0x0a, 0x40, 0x0f, 0x0a, 0x05, 0x05, 0x2d, 0x27, 0x1d, 0x07, 0x22, 0x1d, 0x15, + 0x45, 0x18, 0x12, 0x0a, 0x40, 0x0a, 0x15, 0x05, 0x1f, 0x0a, 0x2c, 0x1a, 0x1f, 0x0a, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x52, 0x20, 0x05, 0x45, 0x40, 0x40, 0x52, 0x60, 0x27, 0x40, 0x05, 0x40, 0x40, 0x40, 0x0f, + 0x05, 0x1b, 0x08, 0x1a, 0x0d, 0x1b, 0x28, 0x3e, 0x3e, 0x07, 0x07, 0x02, 0x0a, 0x0d, 0x15, 0x07, + 0x00, 0x27, 0x20, 0x0a, 0x40, 0x42, 0x48, 0x40, 0x40, 0x40, 0x05, 0x05, 0x02, 0x08, 0x15, 0x08, + 0x0d, 0x1b, 0x02, 0x00, 0x08, 0x23, 0x08, 0x00, 0x00, 0x0d, 0x15, 0x18, 0x12, 0x18, 0x02, 0x08, + 0x15, 0x08, 0x0d, 0x1b, 0x02, 0x00, 0x08, 0x23, 0x08, 0x00, 0x00, 0x0d, 0x15, 0x18, 0x12, 0x18, + 0x22, 0x42, 0x38, 0x40, 0x48, 0x40, 0x05, 0x07, 0x05, 0x12, 0x12, 0x28, 0x07, 0x12, 0x42, 0x42, + 0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x4d, + 0x07, 0x12, 0x12, 0x20, 0x22, 0x20, 0x22, 0x0a, 0x17, 0x42, 0x42, 0x17, 0x42, 0x42, 0x40, 0x40, + 0x40, 0x07, 0x07, 0x0a, 0x40, 0x0f, 0x0a, 0x05, 0x05, 0x2d, 0x27, 0x1d, 0x07, 0x22, 0x1d, 0x15, + 0x45, 0x17, 0x12, 0x0a, 0x40, 0x0a, 0x15, 0x05, 0x20, 0x0a, 0x2d, 0x1a, 0x20, 0x0a, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x53, 0x21, 0x05, 0x44, 0x40, 0x41, 0x53, 0x61, 0x27, 0x40, 0x05, 0x40, 0x40, 0x40, 0x0f, + 0x05, 0x1c, 0x09, 0x1b, 0x0e, 0x1c, 0x2a, 0x3e, 0x3e, 0x07, 0x07, 0x02, 0x0b, 0x0d, 0x16, 0x07, + 0x01, 0x27, 0x21, 0x0a, 0x40, 0x42, 0x49, 0x40, 0x40, 0x40, 0x05, 0x05, 0x03, 0x09, 0x16, 0x09, + 0x0e, 0x1c, 0x03, 0x01, 0x09, 0x24, 0x09, 0x01, 0x01, 0x0e, 0x16, 0x19, 0x13, 0x19, 0x03, 0x09, + 0x16, 0x09, 0x0e, 0x1c, 0x03, 0x01, 0x09, 0x24, 0x09, 0x01, 0x01, 0x0e, 0x16, 0x19, 0x13, 0x19, + 0x23, 0x42, 0x3a, 0x40, 0x48, 0x40, 0x05, 0x07, 0x05, 0x13, 0x13, 0x2a, 0x07, 0x12, 0x43, 0x42, + 0x1d, 0x07, 0x40, 0x12, 0x43, 0x42, 0x1d, 0x07, 0x40, 0x12, 0x43, 0x42, 0x1d, 0x07, 0x40, 0x4d, + 0x07, 0x13, 0x13, 0x21, 0x23, 0x21, 0x23, 0x0a, 0x17, 0x43, 0x42, 0x17, 0x43, 0x42, 0x40, 0x40, + 0x40, 0x06, 0x06, 0x0a, 0x40, 0x0f, 0x0a, 0x04, 0x04, 0x2d, 0x27, 0x1d, 0x07, 0x23, 0x1d, 0x15, + 0x45, 0x16, 0x12, 0x0a, 0x40, 0x0a, 0x15, 0x04, 0x21, 0x0a, 0x2e, 0x1b, 0x21, 0x0a, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x54, 0x22, 0x06, 0x43, 0x40, 0x42, 0x54, 0x62, 0x27, 0x40, 0x06, 0x40, 0x40, 0x40, 0x0f, + 0x06, 0x1e, 0x0a, 0x1c, 0x10, 0x1e, 0x2c, 0x3e, 0x3e, 0x07, 0x07, 0x01, 0x0c, 0x0e, 0x18, 0x07, + 0x02, 0x27, 0x22, 0x09, 0x40, 0x41, 0x4a, 0x40, 0x40, 0x40, 0x06, 0x06, 0x04, 0x0a, 0x18, 0x0a, + 0x10, 0x1e, 0x04, 0x02, 0x0a, 0x26, 0x0a, 0x02, 0x02, 0x10, 0x18, 0x1a, 0x14, 0x1a, 0x04, 0x0a, + 0x18, 0x0a, 0x10, 0x1e, 0x04, 0x02, 0x0a, 0x26, 0x0a, 0x02, 0x02, 0x10, 0x18, 0x1a, 0x14, 0x1a, + 0x24, 0x41, 0x3c, 0x40, 0x48, 0x40, 0x06, 0x07, 0x06, 0x14, 0x14, 0x2c, 0x07, 0x11, 0x44, 0x41, + 0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x4e, + 0x07, 0x14, 0x14, 0x22, 0x24, 0x22, 0x24, 0x09, 0x17, 0x44, 0x41, 0x17, 0x44, 0x41, 0x40, 0x40, + 0x40, 0x05, 0x05, 0x09, 0x40, 0x0f, 0x09, 0x03, 0x03, 0x2e, 0x27, 0x1e, 0x07, 0x24, 0x1e, 0x16, + 0x46, 0x15, 0x11, 0x09, 0x40, 0x09, 0x16, 0x03, 0x22, 0x09, 0x30, 0x1c, 0x22, 0x09, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x54, 0x23, 0x06, 0x43, 0x40, 0x43, 0x54, 0x63, 0x27, 0x40, 0x06, 0x40, 0x40, 0x40, 0x0f, + 0x06, 0x1f, 0x0b, 0x1c, 0x11, 0x1f, 0x2e, 0x3e, 0x3e, 0x07, 0x07, 0x01, 0x0c, 0x0e, 0x19, 0x07, + 0x03, 0x27, 0x23, 0x09, 0x40, 0x41, 0x4b, 0x40, 0x40, 0x40, 0x06, 0x06, 0x04, 0x0b, 0x19, 0x0b, + 0x11, 0x1f, 0x04, 0x03, 0x0b, 0x27, 0x0b, 0x03, 0x03, 0x11, 0x19, 0x1b, 0x14, 0x1b, 0x04, 0x0b, + 0x19, 0x0b, 0x11, 0x1f, 0x04, 0x03, 0x0b, 0x27, 0x0b, 0x03, 0x03, 0x11, 0x19, 0x1b, 0x14, 0x1b, + 0x24, 0x41, 0x3e, 0x40, 0x48, 0x40, 0x06, 0x07, 0x06, 0x14, 0x14, 0x2e, 0x07, 0x11, 0x44, 0x41, + 0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x4e, + 0x07, 0x14, 0x14, 0x23, 0x24, 0x23, 0x24, 0x09, 0x17, 0x44, 0x41, 0x17, 0x44, 0x41, 0x40, 0x40, + 0x40, 0x04, 0x04, 0x09, 0x40, 0x0f, 0x09, 0x03, 0x03, 0x2e, 0x27, 0x1e, 0x07, 0x24, 0x1e, 0x16, + 0x46, 0x14, 0x11, 0x09, 0x40, 0x09, 0x16, 0x03, 0x23, 0x09, 0x31, 0x1c, 0x23, 0x09, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x55, 0x24, 0x06, 0x42, 0x40, 0x44, 0x55, 0x64, 0x27, 0x40, 0x06, 0x40, 0x40, 0x40, 0x0f, + 0x06, 0x21, 0x0c, 0x1d, 0x12, 0x21, 0x30, 0x3e, 0x3e, 0x07, 0x07, 0x01, 0x0d, 0x0e, 0x1a, 0x07, + 0x04, 0x27, 0x24, 0x09, 0x40, 0x41, 0x4c, 0x40, 0x40, 0x40, 0x06, 0x06, 0x05, 0x0c, 0x1a, 0x0c, + 0x12, 0x21, 0x05, 0x04, 0x0c, 0x29, 0x0c, 0x04, 0x04, 0x12, 0x1a, 0x1c, 0x15, 0x1c, 0x05, 0x0c, + 0x1a, 0x0c, 0x12, 0x21, 0x05, 0x04, 0x0c, 0x29, 0x0c, 0x04, 0x04, 0x12, 0x1a, 0x1c, 0x15, 0x1c, + 0x25, 0x41, 0x3e, 0x40, 0x48, 0x40, 0x06, 0x07, 0x06, 0x15, 0x15, 0x30, 0x07, 0x11, 0x45, 0x41, + 0x1e, 0x07, 0x40, 0x11, 0x45, 0x41, 0x1e, 0x07, 0x40, 0x11, 0x45, 0x41, 0x1e, 0x07, 0x40, 0x4e, + 0x07, 0x15, 0x15, 0x24, 0x25, 0x24, 0x25, 0x09, 0x17, 0x45, 0x41, 0x17, 0x45, 0x41, 0x40, 0x40, + 0x40, 0x03, 0x03, 0x09, 0x40, 0x0f, 0x09, 0x02, 0x02, 0x2e, 0x27, 0x1e, 0x07, 0x25, 0x1e, 0x16, + 0x46, 0x13, 0x11, 0x09, 0x40, 0x09, 0x16, 0x02, 0x24, 0x09, 0x32, 0x1d, 0x24, 0x09, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x56, 0x24, 0x06, 0x42, 0x40, 0x45, 0x56, 0x65, 0x27, 0x40, 0x06, 0x40, 0x40, 0x40, 0x0f, + 0x06, 0x22, 0x0c, 0x1d, 0x13, 0x22, 0x31, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x0d, 0x0e, 0x1b, 0x07, + 0x04, 0x27, 0x24, 0x08, 0x40, 0x41, 0x4d, 0x40, 0x40, 0x40, 0x06, 0x06, 0x05, 0x0c, 0x1b, 0x0c, + 0x13, 0x22, 0x05, 0x04, 0x0c, 0x2a, 0x0c, 0x04, 0x04, 0x13, 0x1b, 0x1c, 0x15, 0x1c, 0x05, 0x0c, + 0x1b, 0x0c, 0x13, 0x22, 0x05, 0x04, 0x0c, 0x2a, 0x0c, 0x04, 0x04, 0x13, 0x1b, 0x1c, 0x15, 0x1c, + 0x25, 0x41, 0x3e, 0x40, 0x48, 0x40, 0x06, 0x07, 0x06, 0x15, 0x15, 0x31, 0x07, 0x10, 0x46, 0x41, + 0x1e, 0x07, 0x40, 0x10, 0x46, 0x41, 0x1e, 0x07, 0x40, 0x10, 0x46, 0x41, 0x1e, 0x07, 0x40, 0x4f, + 0x07, 0x15, 0x15, 0x24, 0x25, 0x24, 0x25, 0x08, 0x17, 0x46, 0x41, 0x17, 0x46, 0x41, 0x40, 0x40, + 0x40, 0x02, 0x02, 0x08, 0x40, 0x0f, 0x08, 0x01, 0x01, 0x2e, 0x27, 0x1e, 0x07, 0x25, 0x1e, 0x16, + 0x47, 0x12, 0x10, 0x08, 0x40, 0x08, 0x16, 0x01, 0x24, 0x08, 0x33, 0x1d, 0x24, 0x08, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x56, 0x25, 0x07, 0x41, 0x40, 0x45, 0x56, 0x65, 0x27, 0x40, 0x07, 0x40, 0x40, 0x40, 0x0f, + 0x07, 0x24, 0x0d, 0x1e, 0x15, 0x24, 0x33, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x0e, 0x0f, 0x1d, 0x07, + 0x05, 0x27, 0x25, 0x08, 0x40, 0x40, 0x4d, 0x40, 0x40, 0x40, 0x07, 0x07, 0x06, 0x0d, 0x1d, 0x0d, + 0x15, 0x24, 0x06, 0x05, 0x0d, 0x2c, 0x0d, 0x05, 0x05, 0x15, 0x1d, 0x1d, 0x16, 0x1d, 0x06, 0x0d, + 0x1d, 0x0d, 0x15, 0x24, 0x06, 0x05, 0x0d, 0x2c, 0x0d, 0x05, 0x05, 0x15, 0x1d, 0x1d, 0x16, 0x1d, + 0x26, 0x40, 0x3e, 0x40, 0x48, 0x40, 0x07, 0x07, 0x07, 0x16, 0x16, 0x33, 0x07, 0x10, 0x46, 0x40, + 0x1f, 0x07, 0x40, 0x10, 0x46, 0x40, 0x1f, 0x07, 0x40, 0x10, 0x46, 0x40, 0x1f, 0x07, 0x40, 0x4f, + 0x07, 0x16, 0x16, 0x25, 0x26, 0x25, 0x26, 0x08, 0x17, 0x46, 0x40, 0x17, 0x46, 0x40, 0x40, 0x40, + 0x40, 0x02, 0x02, 0x08, 0x40, 0x0f, 0x08, 0x01, 0x01, 0x2f, 0x27, 0x1f, 0x07, 0x26, 0x1f, 0x17, + 0x47, 0x12, 0x10, 0x08, 0x40, 0x08, 0x17, 0x01, 0x25, 0x08, 0x35, 0x1e, 0x25, 0x08, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x57, 0x26, 0x07, 0x40, 0x40, 0x46, 0x57, 0x66, 0x27, 0x40, 0x07, 0x40, 0x40, 0x40, 0x0f, + 0x07, 0x26, 0x0e, 0x1f, 0x16, 0x26, 0x35, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x0f, 0x0f, 0x1e, 0x07, + 0x06, 0x27, 0x26, 0x08, 0x40, 0x40, 0x4e, 0x40, 0x40, 0x40, 0x07, 0x07, 0x07, 0x0e, 0x1e, 0x0e, + 0x16, 0x26, 0x07, 0x06, 0x0e, 0x2e, 0x0e, 0x06, 0x06, 0x16, 0x1e, 0x1e, 0x17, 0x1e, 0x07, 0x0e, + 0x1e, 0x0e, 0x16, 0x26, 0x07, 0x06, 0x0e, 0x2e, 0x0e, 0x06, 0x06, 0x16, 0x1e, 0x1e, 0x17, 0x1e, + 0x27, 0x40, 0x3e, 0x40, 0x48, 0x40, 0x07, 0x07, 0x07, 0x17, 0x17, 0x35, 0x07, 0x10, 0x47, 0x40, + 0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x4f, + 0x07, 0x17, 0x17, 0x26, 0x27, 0x26, 0x27, 0x08, 0x17, 0x47, 0x40, 0x17, 0x47, 0x40, 0x40, 0x40, + 0x40, 0x01, 0x01, 0x08, 0x40, 0x0f, 0x08, 0x00, 0x00, 0x2f, 0x27, 0x1f, 0x07, 0x27, 0x1f, 0x17, + 0x47, 0x11, 0x10, 0x08, 0x40, 0x08, 0x17, 0x00, 0x26, 0x08, 0x36, 0x1f, 0x26, 0x08, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x57, 0x27, 0x07, 0x40, 0x40, 0x47, 0x57, 0x67, 0x27, 0x40, 0x07, 0x40, 0x40, 0x40, 0x0f, + 0x07, 0x27, 0x0f, 0x1f, 0x17, 0x27, 0x37, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x0f, 0x0f, 0x1f, 0x07, + 0x07, 0x27, 0x27, 0x08, 0x40, 0x40, 0x4f, 0x40, 0x40, 0x40, 0x07, 0x07, 0x07, 0x0f, 0x1f, 0x0f, + 0x17, 0x27, 0x07, 0x07, 0x0f, 0x2f, 0x0f, 0x07, 0x07, 0x17, 0x1f, 0x1f, 0x17, 0x1f, 0x07, 0x0f, + 0x1f, 0x0f, 0x17, 0x27, 0x07, 0x07, 0x0f, 0x2f, 0x0f, 0x07, 0x07, 0x17, 0x1f, 0x1f, 0x17, 0x1f, + 0x27, 0x40, 0x3e, 0x40, 0x48, 0x40, 0x07, 0x07, 0x07, 0x17, 0x17, 0x37, 0x07, 0x10, 0x47, 0x40, + 0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x4f, + 0x07, 0x17, 0x17, 0x27, 0x27, 0x27, 0x27, 0x08, 0x17, 0x47, 0x40, 0x17, 0x47, 0x40, 0x40, 0x40, + 0x40, 0x00, 0x00, 0x08, 0x40, 0x0f, 0x08, 0x00, 0x00, 0x2f, 0x27, 0x1f, 0x07, 0x27, 0x1f, 0x17, + 0x47, 0x10, 0x10, 0x08, 0x40, 0x08, 0x17, 0x00, 0x27, 0x08, 0x37, 0x1f, 0x27, 0x08, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x48, 0x48, 0x60, 0x40, 0x27, 0x07, 0x07, 0x1f, 0x40, 0x48, 0x40, 0x40, 0x17, 0x0f, + 0x48, 0x68, 0x40, 0x07, 0x68, 0x68, 0x68, 0x68, 0x68, 0x07, 0x07, 0x0f, 0x3e, 0x17, 0x40, 0x07, + 0x68, 0x27, 0x50, 0x17, 0x40, 0x07, 0x1f, 0x40, 0x40, 0x40, 0x48, 0x48, 0x58, 0x60, 0x50, 0x60, + 0x68, 0x60, 0x58, 0x68, 0x68, 0x68, 0x58, 0x60, 0x68, 0x68, 0x68, 0x50, 0x48, 0x58, 0x58, 0x60, + 0x50, 0x60, 0x68, 0x60, 0x58, 0x68, 0x68, 0x68, 0x58, 0x60, 0x68, 0x68, 0x68, 0x50, 0x48, 0x58, + 0x07, 0x50, 0x58, 0x40, 0x40, 0x40, 0x48, 0x07, 0x48, 0x48, 0x48, 0x68, 0x50, 0x1f, 0x17, 0x50, + 0x0f, 0x07, 0x40, 0x1f, 0x17, 0x50, 0x0f, 0x07, 0x40, 0x1f, 0x17, 0x50, 0x0f, 0x07, 0x40, 0x40, + 0x07, 0x40, 0x40, 0x40, 0x07, 0x40, 0x07, 0x17, 0x17, 0x17, 0x50, 0x17, 0x17, 0x50, 0x40, 0x40, + 0x40, 0x2f, 0x17, 0x17, 0x40, 0x0f, 0x17, 0x1f, 0x1f, 0x1f, 0x27, 0x0f, 0x07, 0x07, 0x0f, 0x40, + 0x07, 0x3e, 0x1f, 0x17, 0x40, 0x0f, 0x17, 0x1f, 0x48, 0x17, 0x48, 0x48, 0x48, 0x17, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x47, 0x47, 0x5f, 0x40, 0x27, 0x07, 0x07, 0x20, 0x40, 0x47, 0x40, 0x40, 0x17, 0x0f, + 0x47, 0x66, 0x40, 0x08, 0x66, 0x66, 0x66, 0x65, 0x65, 0x07, 0x07, 0x0f, 0x3e, 0x17, 0x00, 0x07, + 0x67, 0x27, 0x4e, 0x17, 0x40, 0x07, 0x1f, 0x40, 0x40, 0x40, 0x47, 0x47, 0x57, 0x5f, 0x4f, 0x5f, + 0x66, 0x5e, 0x57, 0x67, 0x67, 0x66, 0x57, 0x5f, 0x67, 0x67, 0x66, 0x4f, 0x47, 0x56, 0x57, 0x5f, + 0x4f, 0x5f, 0x66, 0x5e, 0x57, 0x67, 0x67, 0x66, 0x57, 0x5f, 0x67, 0x67, 0x66, 0x4f, 0x47, 0x56, + 0x08, 0x4f, 0x56, 0x40, 0x40, 0x40, 0x47, 0x07, 0x47, 0x47, 0x47, 0x66, 0x4f, 0x1f, 0x17, 0x4f, + 0x10, 0x07, 0x40, 0x1f, 0x17, 0x4f, 0x10, 0x07, 0x40, 0x1f, 0x17, 0x4f, 0x10, 0x07, 0x40, 0x40, + 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x17, 0x17, 0x17, 0x4f, 0x17, 0x17, 0x4f, 0x40, 0x40, + 0x40, 0x2f, 0x17, 0x17, 0x40, 0x0f, 0x17, 0x1f, 0x1f, 0x20, 0x27, 0x10, 0x07, 0x08, 0x10, 0x00, + 0x07, 0x3e, 0x1f, 0x17, 0x40, 0x0f, 0x17, 0x1f, 0x47, 0x17, 0x46, 0x47, 0x47, 0x17, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x46, 0x47, 0x5e, 0x40, 0x26, 0x06, 0x06, 0x20, 0x40, 0x47, 0x40, 0x40, 0x16, 0x0f, + 0x47, 0x64, 0x40, 0x08, 0x65, 0x64, 0x64, 0x63, 0x63, 0x07, 0x07, 0x0f, 0x3e, 0x17, 0x01, 0x07, + 0x66, 0x27, 0x4d, 0x17, 0x40, 0x07, 0x1e, 0x40, 0x40, 0x40, 0x47, 0x47, 0x56, 0x5e, 0x4e, 0x5e, + 0x65, 0x5d, 0x56, 0x66, 0x66, 0x64, 0x56, 0x5e, 0x66, 0x66, 0x64, 0x4e, 0x46, 0x55, 0x56, 0x5e, + 0x4e, 0x5e, 0x65, 0x5d, 0x56, 0x66, 0x66, 0x64, 0x56, 0x5e, 0x66, 0x66, 0x64, 0x4e, 0x46, 0x55, + 0x09, 0x4f, 0x54, 0x40, 0x40, 0x40, 0x47, 0x07, 0x47, 0x46, 0x46, 0x64, 0x4e, 0x1f, 0x16, 0x4f, + 0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x40, + 0x07, 0x00, 0x00, 0x01, 0x09, 0x01, 0x09, 0x17, 0x17, 0x16, 0x4f, 0x17, 0x16, 0x4f, 0x40, 0x40, + 0x40, 0x2e, 0x17, 0x17, 0x40, 0x0f, 0x17, 0x1e, 0x1e, 0x20, 0x27, 0x10, 0x07, 0x09, 0x10, 0x01, + 0x07, 0x3e, 0x1f, 0x17, 0x40, 0x0f, 0x17, 0x1e, 0x46, 0x17, 0x45, 0x46, 0x46, 0x17, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x45, 0x47, 0x5e, 0x40, 0x25, 0x06, 0x05, 0x20, 0x40, 0x47, 0x40, 0x40, 0x16, 0x0f, + 0x47, 0x63, 0x40, 0x08, 0x64, 0x63, 0x62, 0x60, 0x60, 0x07, 0x07, 0x0f, 0x3e, 0x17, 0x01, 0x07, + 0x65, 0x27, 0x4c, 0x17, 0x40, 0x07, 0x1d, 0x40, 0x40, 0x40, 0x47, 0x47, 0x56, 0x5d, 0x4e, 0x5d, + 0x64, 0x5c, 0x56, 0x65, 0x65, 0x63, 0x56, 0x5e, 0x65, 0x65, 0x63, 0x4d, 0x46, 0x54, 0x56, 0x5d, + 0x4e, 0x5d, 0x64, 0x5c, 0x56, 0x65, 0x65, 0x63, 0x56, 0x5e, 0x65, 0x65, 0x63, 0x4d, 0x46, 0x54, + 0x09, 0x4f, 0x52, 0x40, 0x40, 0x40, 0x47, 0x07, 0x47, 0x46, 0x46, 0x62, 0x4e, 0x1f, 0x16, 0x4f, + 0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x40, + 0x07, 0x00, 0x00, 0x01, 0x09, 0x01, 0x09, 0x17, 0x17, 0x16, 0x4f, 0x17, 0x16, 0x4f, 0x40, 0x40, + 0x40, 0x2d, 0x17, 0x17, 0x40, 0x0f, 0x17, 0x1e, 0x1e, 0x20, 0x27, 0x10, 0x07, 0x09, 0x10, 0x01, + 0x07, 0x3e, 0x1f, 0x17, 0x40, 0x0f, 0x17, 0x1e, 0x45, 0x17, 0x44, 0x45, 0x45, 0x17, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x44, 0x46, 0x5d, 0x40, 0x24, 0x05, 0x04, 0x21, 0x40, 0x46, 0x40, 0x40, 0x15, 0x0f, + 0x46, 0x61, 0x40, 0x09, 0x63, 0x61, 0x60, 0x5e, 0x5e, 0x07, 0x07, 0x0e, 0x3e, 0x16, 0x02, 0x07, + 0x64, 0x27, 0x4b, 0x16, 0x40, 0x06, 0x1c, 0x40, 0x40, 0x40, 0x46, 0x46, 0x55, 0x5c, 0x4d, 0x5c, + 0x63, 0x5b, 0x55, 0x64, 0x64, 0x61, 0x55, 0x5d, 0x64, 0x64, 0x61, 0x4c, 0x45, 0x53, 0x55, 0x5c, + 0x4d, 0x5c, 0x63, 0x5b, 0x55, 0x64, 0x64, 0x61, 0x55, 0x5d, 0x64, 0x64, 0x61, 0x4c, 0x45, 0x53, + 0x0a, 0x4e, 0x50, 0x40, 0x41, 0x40, 0x46, 0x07, 0x46, 0x45, 0x45, 0x60, 0x4d, 0x1e, 0x15, 0x4e, + 0x11, 0x07, 0x40, 0x1e, 0x15, 0x4e, 0x11, 0x07, 0x40, 0x1e, 0x15, 0x4e, 0x11, 0x07, 0x40, 0x41, + 0x07, 0x01, 0x01, 0x02, 0x0a, 0x02, 0x0a, 0x16, 0x17, 0x15, 0x4e, 0x17, 0x15, 0x4e, 0x40, 0x40, + 0x40, 0x2c, 0x16, 0x16, 0x40, 0x0f, 0x16, 0x1d, 0x1d, 0x21, 0x27, 0x11, 0x07, 0x0a, 0x11, 0x02, + 0x06, 0x3e, 0x1e, 0x16, 0x40, 0x0f, 0x16, 0x1d, 0x44, 0x16, 0x43, 0x44, 0x44, 0x16, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x43, 0x46, 0x5c, 0x40, 0x23, 0x04, 0x03, 0x21, 0x40, 0x46, 0x40, 0x40, 0x14, 0x0f, + 0x46, 0x60, 0x40, 0x09, 0x61, 0x60, 0x5e, 0x5b, 0x5b, 0x07, 0x07, 0x0e, 0x3e, 0x16, 0x03, 0x07, + 0x63, 0x27, 0x49, 0x16, 0x40, 0x06, 0x1b, 0x40, 0x40, 0x40, 0x46, 0x46, 0x54, 0x5b, 0x4c, 0x5b, + 0x61, 0x59, 0x54, 0x63, 0x63, 0x60, 0x54, 0x5c, 0x63, 0x63, 0x60, 0x4b, 0x44, 0x51, 0x54, 0x5b, + 0x4c, 0x5b, 0x61, 0x59, 0x54, 0x63, 0x63, 0x60, 0x54, 0x5c, 0x63, 0x63, 0x60, 0x4b, 0x44, 0x51, + 0x0b, 0x4e, 0x4e, 0x40, 0x41, 0x40, 0x46, 0x07, 0x46, 0x44, 0x44, 0x5e, 0x4c, 0x1e, 0x14, 0x4e, + 0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x41, + 0x07, 0x01, 0x01, 0x03, 0x0b, 0x03, 0x0b, 0x16, 0x17, 0x14, 0x4e, 0x17, 0x14, 0x4e, 0x40, 0x40, + 0x40, 0x2b, 0x16, 0x16, 0x40, 0x0f, 0x16, 0x1c, 0x1c, 0x21, 0x27, 0x11, 0x07, 0x0b, 0x11, 0x03, + 0x06, 0x3e, 0x1e, 0x16, 0x40, 0x0f, 0x16, 0x1c, 0x43, 0x16, 0x41, 0x43, 0x43, 0x16, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x42, 0x46, 0x5c, 0x40, 0x22, 0x04, 0x02, 0x21, 0x40, 0x46, 0x40, 0x40, 0x14, 0x0f, + 0x46, 0x5e, 0x40, 0x09, 0x60, 0x5e, 0x5c, 0x59, 0x59, 0x07, 0x07, 0x0e, 0x3e, 0x16, 0x03, 0x07, + 0x62, 0x27, 0x48, 0x16, 0x40, 0x06, 0x1a, 0x40, 0x40, 0x40, 0x46, 0x46, 0x54, 0x5a, 0x4c, 0x5a, + 0x60, 0x58, 0x54, 0x62, 0x62, 0x5e, 0x54, 0x5c, 0x62, 0x62, 0x5e, 0x4a, 0x44, 0x50, 0x54, 0x5a, + 0x4c, 0x5a, 0x60, 0x58, 0x54, 0x62, 0x62, 0x5e, 0x54, 0x5c, 0x62, 0x62, 0x5e, 0x4a, 0x44, 0x50, + 0x0b, 0x4e, 0x4c, 0x40, 0x41, 0x40, 0x46, 0x07, 0x46, 0x44, 0x44, 0x5c, 0x4c, 0x1e, 0x14, 0x4e, + 0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x41, + 0x07, 0x01, 0x01, 0x03, 0x0b, 0x03, 0x0b, 0x16, 0x17, 0x14, 0x4e, 0x17, 0x14, 0x4e, 0x40, 0x40, + 0x40, 0x2a, 0x16, 0x16, 0x40, 0x0f, 0x16, 0x1c, 0x1c, 0x21, 0x27, 0x11, 0x07, 0x0b, 0x11, 0x03, + 0x06, 0x3e, 0x1e, 0x16, 0x40, 0x0f, 0x16, 0x1c, 0x42, 0x16, 0x40, 0x42, 0x42, 0x16, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x41, 0x45, 0x5b, 0x40, 0x21, 0x03, 0x01, 0x22, 0x40, 0x45, 0x40, 0x40, 0x13, 0x0f, + 0x45, 0x5d, 0x40, 0x0a, 0x5f, 0x5d, 0x5a, 0x56, 0x56, 0x07, 0x07, 0x0d, 0x3e, 0x15, 0x04, 0x07, + 0x61, 0x27, 0x47, 0x15, 0x40, 0x05, 0x19, 0x40, 0x40, 0x40, 0x45, 0x45, 0x53, 0x59, 0x4b, 0x59, + 0x5f, 0x57, 0x53, 0x61, 0x61, 0x5d, 0x53, 0x5b, 0x61, 0x61, 0x5d, 0x49, 0x43, 0x4f, 0x53, 0x59, + 0x4b, 0x59, 0x5f, 0x57, 0x53, 0x61, 0x61, 0x5d, 0x53, 0x5b, 0x61, 0x61, 0x5d, 0x49, 0x43, 0x4f, + 0x0c, 0x4d, 0x4a, 0x40, 0x42, 0x40, 0x45, 0x07, 0x45, 0x43, 0x43, 0x5a, 0x4b, 0x1d, 0x13, 0x4d, + 0x12, 0x07, 0x40, 0x1d, 0x13, 0x4d, 0x12, 0x07, 0x40, 0x1d, 0x13, 0x4d, 0x12, 0x07, 0x40, 0x42, + 0x07, 0x02, 0x02, 0x04, 0x0c, 0x04, 0x0c, 0x15, 0x17, 0x13, 0x4d, 0x17, 0x13, 0x4d, 0x40, 0x40, + 0x40, 0x29, 0x15, 0x15, 0x40, 0x0f, 0x15, 0x1b, 0x1b, 0x22, 0x27, 0x12, 0x07, 0x0c, 0x12, 0x04, + 0x05, 0x3e, 0x1d, 0x15, 0x40, 0x0f, 0x15, 0x1b, 0x41, 0x15, 0x00, 0x41, 0x41, 0x15, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x40, 0x45, 0x5b, 0x40, 0x20, 0x02, 0x00, 0x22, 0x40, 0x45, 0x40, 0x40, 0x12, 0x0f, + 0x45, 0x5b, 0x40, 0x0a, 0x5e, 0x5b, 0x59, 0x54, 0x54, 0x07, 0x07, 0x0d, 0x3e, 0x15, 0x04, 0x07, + 0x60, 0x27, 0x46, 0x15, 0x40, 0x05, 0x18, 0x40, 0x40, 0x40, 0x45, 0x45, 0x53, 0x58, 0x4b, 0x58, + 0x5e, 0x56, 0x53, 0x60, 0x60, 0x5b, 0x53, 0x5b, 0x60, 0x60, 0x5b, 0x48, 0x43, 0x4e, 0x53, 0x58, + 0x4b, 0x58, 0x5e, 0x56, 0x53, 0x60, 0x60, 0x5b, 0x53, 0x5b, 0x60, 0x60, 0x5b, 0x48, 0x43, 0x4e, + 0x0c, 0x4d, 0x49, 0x40, 0x42, 0x40, 0x45, 0x07, 0x45, 0x43, 0x43, 0x59, 0x4b, 0x1d, 0x12, 0x4d, + 0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x42, + 0x07, 0x02, 0x02, 0x04, 0x0c, 0x04, 0x0c, 0x15, 0x17, 0x12, 0x4d, 0x17, 0x12, 0x4d, 0x40, 0x40, + 0x40, 0x28, 0x15, 0x15, 0x40, 0x0f, 0x15, 0x1a, 0x1a, 0x22, 0x27, 0x12, 0x07, 0x0c, 0x12, 0x04, + 0x05, 0x3e, 0x1d, 0x15, 0x40, 0x0f, 0x15, 0x1a, 0x40, 0x15, 0x01, 0x40, 0x40, 0x15, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x00, 0x45, 0x5a, 0x40, 0x1f, 0x02, 0x40, 0x22, 0x40, 0x45, 0x40, 0x40, 0x12, 0x0f, + 0x45, 0x59, 0x40, 0x0a, 0x5c, 0x59, 0x57, 0x51, 0x51, 0x07, 0x07, 0x0d, 0x3e, 0x15, 0x05, 0x07, + 0x5f, 0x27, 0x44, 0x15, 0x40, 0x05, 0x17, 0x40, 0x40, 0x40, 0x45, 0x45, 0x52, 0x57, 0x4a, 0x57, + 0x5c, 0x54, 0x52, 0x5f, 0x5f, 0x59, 0x52, 0x5a, 0x5f, 0x5f, 0x59, 0x47, 0x42, 0x4c, 0x52, 0x57, + 0x4a, 0x57, 0x5c, 0x54, 0x52, 0x5f, 0x5f, 0x59, 0x52, 0x5a, 0x5f, 0x5f, 0x59, 0x47, 0x42, 0x4c, + 0x0d, 0x4d, 0x47, 0x40, 0x42, 0x40, 0x45, 0x07, 0x45, 0x42, 0x42, 0x57, 0x4a, 0x1d, 0x12, 0x4d, + 0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x42, + 0x07, 0x02, 0x02, 0x05, 0x0d, 0x05, 0x0d, 0x15, 0x17, 0x12, 0x4d, 0x17, 0x12, 0x4d, 0x40, 0x40, + 0x40, 0x27, 0x15, 0x15, 0x40, 0x0f, 0x15, 0x1a, 0x1a, 0x22, 0x27, 0x12, 0x07, 0x0d, 0x12, 0x05, + 0x05, 0x3e, 0x1d, 0x15, 0x40, 0x0f, 0x15, 0x1a, 0x00, 0x15, 0x03, 0x00, 0x00, 0x15, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x01, 0x44, 0x59, 0x40, 0x1e, 0x01, 0x41, 0x23, 0x40, 0x44, 0x40, 0x40, 0x11, 0x0f, + 0x44, 0x58, 0x40, 0x0b, 0x5b, 0x58, 0x55, 0x4f, 0x4f, 0x07, 0x07, 0x0c, 0x3e, 0x14, 0x06, 0x07, + 0x5e, 0x27, 0x43, 0x14, 0x40, 0x04, 0x16, 0x40, 0x40, 0x40, 0x44, 0x44, 0x51, 0x56, 0x49, 0x56, + 0x5b, 0x53, 0x51, 0x5e, 0x5e, 0x58, 0x51, 0x59, 0x5e, 0x5e, 0x58, 0x46, 0x41, 0x4b, 0x51, 0x56, + 0x49, 0x56, 0x5b, 0x53, 0x51, 0x5e, 0x5e, 0x58, 0x51, 0x59, 0x5e, 0x5e, 0x58, 0x46, 0x41, 0x4b, + 0x0e, 0x4c, 0x45, 0x40, 0x43, 0x40, 0x44, 0x07, 0x44, 0x41, 0x41, 0x55, 0x49, 0x1c, 0x11, 0x4c, + 0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x43, + 0x07, 0x03, 0x03, 0x06, 0x0e, 0x06, 0x0e, 0x14, 0x17, 0x11, 0x4c, 0x17, 0x11, 0x4c, 0x40, 0x40, + 0x40, 0x26, 0x14, 0x14, 0x40, 0x0f, 0x14, 0x19, 0x19, 0x23, 0x27, 0x13, 0x07, 0x0e, 0x13, 0x06, + 0x04, 0x3e, 0x1c, 0x14, 0x40, 0x0f, 0x14, 0x19, 0x01, 0x14, 0x04, 0x01, 0x01, 0x14, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x02, 0x44, 0x59, 0x40, 0x1d, 0x01, 0x42, 0x23, 0x40, 0x44, 0x40, 0x40, 0x11, 0x0f, + 0x44, 0x56, 0x40, 0x0b, 0x5a, 0x56, 0x53, 0x4c, 0x4c, 0x07, 0x07, 0x0c, 0x3e, 0x14, 0x06, 0x07, + 0x5d, 0x27, 0x42, 0x14, 0x40, 0x04, 0x15, 0x40, 0x40, 0x40, 0x44, 0x44, 0x51, 0x55, 0x49, 0x55, + 0x5a, 0x52, 0x51, 0x5d, 0x5d, 0x56, 0x51, 0x59, 0x5d, 0x5d, 0x56, 0x45, 0x41, 0x4a, 0x51, 0x55, + 0x49, 0x55, 0x5a, 0x52, 0x51, 0x5d, 0x5d, 0x56, 0x51, 0x59, 0x5d, 0x5d, 0x56, 0x45, 0x41, 0x4a, + 0x0e, 0x4c, 0x43, 0x40, 0x43, 0x40, 0x44, 0x07, 0x44, 0x41, 0x41, 0x53, 0x49, 0x1c, 0x11, 0x4c, + 0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x43, + 0x07, 0x03, 0x03, 0x06, 0x0e, 0x06, 0x0e, 0x14, 0x17, 0x11, 0x4c, 0x17, 0x11, 0x4c, 0x40, 0x40, + 0x40, 0x25, 0x14, 0x14, 0x40, 0x0f, 0x14, 0x19, 0x19, 0x23, 0x27, 0x13, 0x07, 0x0e, 0x13, 0x06, + 0x04, 0x3e, 0x1c, 0x14, 0x40, 0x0f, 0x14, 0x19, 0x02, 0x14, 0x05, 0x02, 0x02, 0x14, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x03, 0x44, 0x58, 0x40, 0x1c, 0x00, 0x43, 0x23, 0x40, 0x44, 0x40, 0x40, 0x10, 0x0f, + 0x44, 0x55, 0x40, 0x0b, 0x59, 0x55, 0x51, 0x4a, 0x4a, 0x07, 0x07, 0x0c, 0x3d, 0x14, 0x07, 0x07, + 0x5c, 0x27, 0x41, 0x14, 0x40, 0x04, 0x14, 0x40, 0x40, 0x40, 0x44, 0x44, 0x50, 0x54, 0x48, 0x54, + 0x59, 0x51, 0x50, 0x5c, 0x5c, 0x55, 0x50, 0x58, 0x5c, 0x5c, 0x55, 0x44, 0x40, 0x49, 0x50, 0x54, + 0x48, 0x54, 0x59, 0x51, 0x50, 0x5c, 0x5c, 0x55, 0x50, 0x58, 0x5c, 0x5c, 0x55, 0x44, 0x40, 0x49, + 0x0f, 0x4c, 0x41, 0x40, 0x43, 0x40, 0x44, 0x07, 0x44, 0x40, 0x40, 0x51, 0x48, 0x1c, 0x10, 0x4c, + 0x13, 0x07, 0x40, 0x1c, 0x10, 0x4c, 0x13, 0x07, 0x40, 0x1c, 0x10, 0x4c, 0x13, 0x07, 0x40, 0x43, + 0x07, 0x03, 0x03, 0x07, 0x0f, 0x07, 0x0f, 0x14, 0x17, 0x10, 0x4c, 0x17, 0x10, 0x4c, 0x40, 0x40, + 0x40, 0x24, 0x14, 0x14, 0x40, 0x0f, 0x14, 0x18, 0x18, 0x23, 0x27, 0x13, 0x07, 0x0f, 0x13, 0x07, + 0x04, 0x3e, 0x1c, 0x14, 0x40, 0x0f, 0x14, 0x18, 0x03, 0x14, 0x06, 0x03, 0x03, 0x14, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x04, 0x43, 0x57, 0x40, 0x1b, 0x40, 0x44, 0x24, 0x40, 0x43, 0x40, 0x40, 0x0f, 0x0f, + 0x43, 0x53, 0x40, 0x0c, 0x57, 0x53, 0x4f, 0x47, 0x47, 0x07, 0x07, 0x0b, 0x3b, 0x13, 0x08, 0x07, + 0x5b, 0x27, 0x00, 0x13, 0x40, 0x03, 0x13, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4f, 0x53, 0x47, 0x53, + 0x57, 0x4f, 0x4f, 0x5b, 0x5b, 0x53, 0x4f, 0x57, 0x5b, 0x5b, 0x53, 0x43, 0x00, 0x47, 0x4f, 0x53, + 0x47, 0x53, 0x57, 0x4f, 0x4f, 0x5b, 0x5b, 0x53, 0x4f, 0x57, 0x5b, 0x5b, 0x53, 0x43, 0x00, 0x47, + 0x10, 0x4b, 0x00, 0x40, 0x44, 0x40, 0x43, 0x07, 0x43, 0x00, 0x00, 0x4f, 0x47, 0x1b, 0x0f, 0x4b, + 0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x44, + 0x07, 0x04, 0x04, 0x08, 0x10, 0x08, 0x10, 0x13, 0x17, 0x0f, 0x4b, 0x17, 0x0f, 0x4b, 0x40, 0x40, + 0x40, 0x23, 0x13, 0x13, 0x40, 0x0f, 0x13, 0x17, 0x17, 0x24, 0x27, 0x14, 0x07, 0x10, 0x14, 0x08, + 0x03, 0x3e, 0x1b, 0x13, 0x40, 0x0f, 0x13, 0x17, 0x04, 0x13, 0x08, 0x04, 0x04, 0x13, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x05, 0x43, 0x57, 0x40, 0x1a, 0x40, 0x45, 0x24, 0x40, 0x43, 0x40, 0x40, 0x0f, 0x0f, + 0x43, 0x52, 0x40, 0x0c, 0x56, 0x52, 0x4d, 0x45, 0x45, 0x07, 0x07, 0x0b, 0x3a, 0x13, 0x08, 0x07, + 0x5a, 0x27, 0x01, 0x13, 0x40, 0x03, 0x12, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4f, 0x52, 0x47, 0x52, + 0x56, 0x4e, 0x4f, 0x5a, 0x5a, 0x52, 0x4f, 0x57, 0x5a, 0x5a, 0x52, 0x42, 0x00, 0x46, 0x4f, 0x52, + 0x47, 0x52, 0x56, 0x4e, 0x4f, 0x5a, 0x5a, 0x52, 0x4f, 0x57, 0x5a, 0x5a, 0x52, 0x42, 0x00, 0x46, + 0x10, 0x4b, 0x02, 0x40, 0x44, 0x40, 0x43, 0x07, 0x43, 0x00, 0x00, 0x4d, 0x47, 0x1b, 0x0f, 0x4b, + 0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x44, + 0x07, 0x04, 0x04, 0x08, 0x10, 0x08, 0x10, 0x13, 0x17, 0x0f, 0x4b, 0x17, 0x0f, 0x4b, 0x40, 0x40, + 0x40, 0x22, 0x13, 0x13, 0x40, 0x0f, 0x13, 0x17, 0x17, 0x24, 0x27, 0x14, 0x07, 0x10, 0x14, 0x08, + 0x03, 0x3e, 0x1b, 0x13, 0x40, 0x0f, 0x13, 0x17, 0x05, 0x13, 0x09, 0x05, 0x05, 0x13, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x06, 0x43, 0x56, 0x40, 0x19, 0x41, 0x46, 0x24, 0x40, 0x43, 0x40, 0x40, 0x0e, 0x0f, + 0x43, 0x50, 0x40, 0x0c, 0x55, 0x50, 0x4b, 0x42, 0x42, 0x07, 0x07, 0x0b, 0x38, 0x13, 0x09, 0x07, + 0x59, 0x27, 0x02, 0x13, 0x40, 0x03, 0x11, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4e, 0x51, 0x46, 0x51, + 0x55, 0x4d, 0x4e, 0x59, 0x59, 0x50, 0x4e, 0x56, 0x59, 0x59, 0x50, 0x41, 0x01, 0x45, 0x4e, 0x51, + 0x46, 0x51, 0x55, 0x4d, 0x4e, 0x59, 0x59, 0x50, 0x4e, 0x56, 0x59, 0x59, 0x50, 0x41, 0x01, 0x45, + 0x11, 0x4b, 0x04, 0x40, 0x44, 0x40, 0x43, 0x07, 0x43, 0x01, 0x01, 0x4b, 0x46, 0x1b, 0x0e, 0x4b, + 0x14, 0x07, 0x40, 0x1b, 0x0e, 0x4b, 0x14, 0x07, 0x40, 0x1b, 0x0e, 0x4b, 0x14, 0x07, 0x40, 0x44, + 0x07, 0x04, 0x04, 0x09, 0x11, 0x09, 0x11, 0x13, 0x17, 0x0e, 0x4b, 0x17, 0x0e, 0x4b, 0x40, 0x40, + 0x40, 0x21, 0x13, 0x13, 0x40, 0x0f, 0x13, 0x16, 0x16, 0x24, 0x27, 0x14, 0x07, 0x11, 0x14, 0x09, + 0x03, 0x3d, 0x1b, 0x13, 0x40, 0x0f, 0x13, 0x16, 0x06, 0x13, 0x0a, 0x06, 0x06, 0x13, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x06, 0x43, 0x56, 0x40, 0x18, 0x42, 0x47, 0x24, 0x40, 0x43, 0x40, 0x40, 0x0d, 0x0f, + 0x43, 0x4f, 0x40, 0x0c, 0x54, 0x4f, 0x4a, 0x40, 0x40, 0x07, 0x07, 0x0a, 0x36, 0x12, 0x09, 0x07, + 0x59, 0x27, 0x03, 0x12, 0x40, 0x02, 0x10, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4e, 0x51, 0x46, 0x51, + 0x54, 0x4c, 0x4e, 0x59, 0x59, 0x4f, 0x4e, 0x56, 0x59, 0x59, 0x4f, 0x41, 0x01, 0x44, 0x4e, 0x51, + 0x46, 0x51, 0x54, 0x4c, 0x4e, 0x59, 0x59, 0x4f, 0x4e, 0x56, 0x59, 0x59, 0x4f, 0x41, 0x01, 0x44, + 0x11, 0x4b, 0x05, 0x40, 0x45, 0x40, 0x43, 0x07, 0x43, 0x01, 0x01, 0x4a, 0x46, 0x1a, 0x0d, 0x4b, + 0x14, 0x07, 0x40, 0x1a, 0x0d, 0x4b, 0x14, 0x07, 0x40, 0x1a, 0x0d, 0x4b, 0x14, 0x07, 0x40, 0x45, + 0x07, 0x04, 0x04, 0x09, 0x11, 0x09, 0x11, 0x12, 0x17, 0x0d, 0x4b, 0x17, 0x0d, 0x4b, 0x40, 0x40, + 0x40, 0x20, 0x12, 0x12, 0x40, 0x0f, 0x12, 0x15, 0x15, 0x24, 0x27, 0x14, 0x07, 0x11, 0x14, 0x09, + 0x02, 0x3b, 0x1a, 0x12, 0x40, 0x0f, 0x12, 0x15, 0x06, 0x12, 0x0b, 0x06, 0x06, 0x12, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x07, 0x42, 0x55, 0x40, 0x18, 0x42, 0x47, 0x25, 0x40, 0x42, 0x40, 0x40, 0x0d, 0x0f, + 0x42, 0x4d, 0x40, 0x0d, 0x52, 0x4d, 0x48, 0x02, 0x02, 0x07, 0x07, 0x0a, 0x35, 0x12, 0x0a, 0x07, + 0x58, 0x27, 0x05, 0x12, 0x40, 0x02, 0x10, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4d, 0x50, 0x45, 0x50, + 0x52, 0x4a, 0x4d, 0x58, 0x58, 0x4d, 0x4d, 0x55, 0x58, 0x58, 0x4d, 0x40, 0x02, 0x42, 0x4d, 0x50, + 0x45, 0x50, 0x52, 0x4a, 0x4d, 0x58, 0x58, 0x4d, 0x4d, 0x55, 0x58, 0x58, 0x4d, 0x40, 0x02, 0x42, + 0x12, 0x4a, 0x07, 0x40, 0x45, 0x40, 0x42, 0x07, 0x42, 0x02, 0x02, 0x48, 0x45, 0x1a, 0x0d, 0x4a, + 0x15, 0x07, 0x40, 0x1a, 0x0d, 0x4a, 0x15, 0x07, 0x40, 0x1a, 0x0d, 0x4a, 0x15, 0x07, 0x40, 0x45, + 0x07, 0x05, 0x05, 0x0a, 0x12, 0x0a, 0x12, 0x12, 0x17, 0x0d, 0x4a, 0x17, 0x0d, 0x4a, 0x40, 0x40, + 0x40, 0x20, 0x12, 0x12, 0x40, 0x0f, 0x12, 0x15, 0x15, 0x25, 0x27, 0x15, 0x07, 0x12, 0x15, 0x0a, + 0x02, 0x3a, 0x1a, 0x12, 0x40, 0x0f, 0x12, 0x15, 0x07, 0x12, 0x0d, 0x07, 0x07, 0x12, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x08, 0x42, 0x54, 0x40, 0x17, 0x43, 0x48, 0x25, 0x40, 0x42, 0x40, 0x40, 0x0c, 0x0f, + 0x42, 0x4b, 0x40, 0x0d, 0x51, 0x4b, 0x46, 0x04, 0x04, 0x07, 0x07, 0x0a, 0x33, 0x12, 0x0b, 0x07, + 0x57, 0x27, 0x06, 0x12, 0x40, 0x02, 0x0f, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4c, 0x4f, 0x44, 0x4f, + 0x51, 0x49, 0x4c, 0x57, 0x57, 0x4b, 0x4c, 0x54, 0x57, 0x57, 0x4b, 0x00, 0x03, 0x41, 0x4c, 0x4f, + 0x44, 0x4f, 0x51, 0x49, 0x4c, 0x57, 0x57, 0x4b, 0x4c, 0x54, 0x57, 0x57, 0x4b, 0x00, 0x03, 0x41, + 0x13, 0x4a, 0x09, 0x40, 0x45, 0x40, 0x42, 0x07, 0x42, 0x03, 0x03, 0x46, 0x44, 0x1a, 0x0c, 0x4a, + 0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x45, + 0x07, 0x05, 0x05, 0x0b, 0x13, 0x0b, 0x13, 0x12, 0x17, 0x0c, 0x4a, 0x17, 0x0c, 0x4a, 0x40, 0x40, + 0x40, 0x1f, 0x12, 0x12, 0x40, 0x0f, 0x12, 0x14, 0x14, 0x25, 0x27, 0x15, 0x07, 0x13, 0x15, 0x0b, + 0x02, 0x39, 0x1a, 0x12, 0x40, 0x0f, 0x12, 0x14, 0x08, 0x12, 0x0e, 0x08, 0x08, 0x12, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x09, 0x42, 0x54, 0x40, 0x16, 0x43, 0x49, 0x25, 0x40, 0x42, 0x40, 0x40, 0x0c, 0x0f, + 0x42, 0x4a, 0x40, 0x0d, 0x50, 0x4a, 0x44, 0x07, 0x07, 0x07, 0x07, 0x0a, 0x32, 0x12, 0x0b, 0x07, + 0x56, 0x27, 0x07, 0x12, 0x40, 0x02, 0x0e, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4c, 0x4e, 0x44, 0x4e, + 0x50, 0x48, 0x4c, 0x56, 0x56, 0x4a, 0x4c, 0x54, 0x56, 0x56, 0x4a, 0x01, 0x03, 0x40, 0x4c, 0x4e, + 0x44, 0x4e, 0x50, 0x48, 0x4c, 0x56, 0x56, 0x4a, 0x4c, 0x54, 0x56, 0x56, 0x4a, 0x01, 0x03, 0x40, + 0x13, 0x4a, 0x0b, 0x40, 0x45, 0x40, 0x42, 0x07, 0x42, 0x03, 0x03, 0x44, 0x44, 0x1a, 0x0c, 0x4a, + 0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x45, + 0x07, 0x05, 0x05, 0x0b, 0x13, 0x0b, 0x13, 0x12, 0x17, 0x0c, 0x4a, 0x17, 0x0c, 0x4a, 0x40, 0x40, + 0x40, 0x1e, 0x12, 0x12, 0x40, 0x0f, 0x12, 0x14, 0x14, 0x25, 0x27, 0x15, 0x07, 0x13, 0x15, 0x0b, + 0x02, 0x38, 0x1a, 0x12, 0x40, 0x0f, 0x12, 0x14, 0x09, 0x12, 0x0f, 0x09, 0x09, 0x12, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x0a, 0x41, 0x53, 0x40, 0x15, 0x44, 0x4a, 0x26, 0x40, 0x41, 0x40, 0x40, 0x0b, 0x0f, + 0x41, 0x48, 0x40, 0x0e, 0x4f, 0x48, 0x42, 0x09, 0x09, 0x07, 0x07, 0x09, 0x30, 0x11, 0x0c, 0x07, + 0x55, 0x27, 0x08, 0x11, 0x40, 0x01, 0x0d, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4b, 0x4d, 0x43, 0x4d, + 0x4f, 0x47, 0x4b, 0x55, 0x55, 0x48, 0x4b, 0x53, 0x55, 0x55, 0x48, 0x02, 0x04, 0x00, 0x4b, 0x4d, + 0x43, 0x4d, 0x4f, 0x47, 0x4b, 0x55, 0x55, 0x48, 0x4b, 0x53, 0x55, 0x55, 0x48, 0x02, 0x04, 0x00, + 0x14, 0x49, 0x0d, 0x40, 0x46, 0x40, 0x41, 0x07, 0x41, 0x04, 0x04, 0x42, 0x43, 0x19, 0x0b, 0x49, + 0x16, 0x07, 0x40, 0x19, 0x0b, 0x49, 0x16, 0x07, 0x40, 0x19, 0x0b, 0x49, 0x16, 0x07, 0x40, 0x46, + 0x07, 0x06, 0x06, 0x0c, 0x14, 0x0c, 0x14, 0x11, 0x17, 0x0b, 0x49, 0x17, 0x0b, 0x49, 0x40, 0x40, + 0x40, 0x1d, 0x11, 0x11, 0x40, 0x0f, 0x11, 0x13, 0x13, 0x26, 0x27, 0x16, 0x07, 0x14, 0x16, 0x0c, + 0x01, 0x36, 0x19, 0x11, 0x40, 0x0f, 0x11, 0x13, 0x0a, 0x11, 0x10, 0x0a, 0x0a, 0x11, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x0b, 0x41, 0x52, 0x40, 0x14, 0x45, 0x4b, 0x26, 0x40, 0x41, 0x40, 0x40, 0x0a, 0x0f, + 0x41, 0x47, 0x40, 0x0e, 0x4d, 0x47, 0x40, 0x0c, 0x0c, 0x07, 0x07, 0x09, 0x2f, 0x11, 0x0d, 0x07, + 0x54, 0x27, 0x0a, 0x11, 0x40, 0x01, 0x0c, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4a, 0x4c, 0x42, 0x4c, + 0x4d, 0x45, 0x4a, 0x54, 0x54, 0x47, 0x4a, 0x52, 0x54, 0x54, 0x47, 0x03, 0x05, 0x02, 0x4a, 0x4c, + 0x42, 0x4c, 0x4d, 0x45, 0x4a, 0x54, 0x54, 0x47, 0x4a, 0x52, 0x54, 0x54, 0x47, 0x03, 0x05, 0x02, + 0x15, 0x49, 0x0f, 0x40, 0x46, 0x40, 0x41, 0x07, 0x41, 0x05, 0x05, 0x40, 0x42, 0x19, 0x0a, 0x49, + 0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x46, + 0x07, 0x06, 0x06, 0x0d, 0x15, 0x0d, 0x15, 0x11, 0x17, 0x0a, 0x49, 0x17, 0x0a, 0x49, 0x40, 0x40, + 0x40, 0x1c, 0x11, 0x11, 0x40, 0x0f, 0x11, 0x12, 0x12, 0x26, 0x27, 0x16, 0x07, 0x15, 0x16, 0x0d, + 0x01, 0x35, 0x19, 0x11, 0x40, 0x0f, 0x11, 0x12, 0x0b, 0x11, 0x12, 0x0b, 0x0b, 0x11, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x0c, 0x41, 0x52, 0x40, 0x13, 0x45, 0x4c, 0x26, 0x40, 0x41, 0x40, 0x40, 0x0a, 0x0f, + 0x41, 0x45, 0x40, 0x0e, 0x4c, 0x45, 0x01, 0x0e, 0x0e, 0x07, 0x07, 0x09, 0x2d, 0x11, 0x0d, 0x07, + 0x53, 0x27, 0x0b, 0x11, 0x40, 0x01, 0x0b, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4a, 0x4b, 0x42, 0x4b, + 0x4c, 0x44, 0x4a, 0x53, 0x53, 0x45, 0x4a, 0x52, 0x53, 0x53, 0x45, 0x04, 0x05, 0x03, 0x4a, 0x4b, + 0x42, 0x4b, 0x4c, 0x44, 0x4a, 0x53, 0x53, 0x45, 0x4a, 0x52, 0x53, 0x53, 0x45, 0x04, 0x05, 0x03, + 0x15, 0x49, 0x11, 0x40, 0x46, 0x40, 0x41, 0x07, 0x41, 0x05, 0x05, 0x01, 0x42, 0x19, 0x0a, 0x49, + 0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x46, + 0x07, 0x06, 0x06, 0x0d, 0x15, 0x0d, 0x15, 0x11, 0x17, 0x0a, 0x49, 0x17, 0x0a, 0x49, 0x40, 0x40, + 0x40, 0x1b, 0x11, 0x11, 0x40, 0x0f, 0x11, 0x12, 0x12, 0x26, 0x27, 0x16, 0x07, 0x15, 0x16, 0x0d, + 0x01, 0x34, 0x19, 0x11, 0x40, 0x0f, 0x11, 0x12, 0x0c, 0x11, 0x13, 0x0c, 0x0c, 0x11, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x0d, 0x40, 0x51, 0x40, 0x12, 0x46, 0x4d, 0x27, 0x40, 0x40, 0x40, 0x40, 0x09, 0x0f, + 0x40, 0x44, 0x40, 0x0f, 0x4b, 0x44, 0x03, 0x11, 0x11, 0x07, 0x07, 0x08, 0x2c, 0x10, 0x0e, 0x07, + 0x52, 0x27, 0x0c, 0x10, 0x40, 0x00, 0x0a, 0x40, 0x40, 0x40, 0x40, 0x40, 0x49, 0x4a, 0x41, 0x4a, + 0x4b, 0x43, 0x49, 0x52, 0x52, 0x44, 0x49, 0x51, 0x52, 0x52, 0x44, 0x05, 0x06, 0x04, 0x49, 0x4a, + 0x41, 0x4a, 0x4b, 0x43, 0x49, 0x52, 0x52, 0x44, 0x49, 0x51, 0x52, 0x52, 0x44, 0x05, 0x06, 0x04, + 0x16, 0x48, 0x13, 0x40, 0x47, 0x40, 0x40, 0x07, 0x40, 0x06, 0x06, 0x03, 0x41, 0x18, 0x09, 0x48, + 0x17, 0x07, 0x40, 0x18, 0x09, 0x48, 0x17, 0x07, 0x40, 0x18, 0x09, 0x48, 0x17, 0x07, 0x40, 0x47, + 0x07, 0x07, 0x07, 0x0e, 0x16, 0x0e, 0x16, 0x10, 0x17, 0x09, 0x48, 0x17, 0x09, 0x48, 0x40, 0x40, + 0x40, 0x1a, 0x10, 0x10, 0x40, 0x0f, 0x10, 0x11, 0x11, 0x27, 0x27, 0x17, 0x07, 0x16, 0x17, 0x0e, + 0x00, 0x33, 0x18, 0x10, 0x40, 0x0f, 0x10, 0x11, 0x0d, 0x10, 0x14, 0x0d, 0x0d, 0x10, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x0e, 0x40, 0x51, 0x40, 0x11, 0x47, 0x4e, 0x27, 0x40, 0x40, 0x40, 0x40, 0x08, 0x0f, + 0x40, 0x42, 0x40, 0x0f, 0x4a, 0x42, 0x04, 0x13, 0x13, 0x07, 0x07, 0x08, 0x2a, 0x10, 0x0e, 0x07, + 0x51, 0x27, 0x0d, 0x10, 0x40, 0x00, 0x09, 0x40, 0x40, 0x40, 0x40, 0x40, 0x49, 0x49, 0x41, 0x49, + 0x4a, 0x42, 0x49, 0x51, 0x51, 0x42, 0x49, 0x51, 0x51, 0x51, 0x42, 0x06, 0x06, 0x05, 0x49, 0x49, + 0x41, 0x49, 0x4a, 0x42, 0x49, 0x51, 0x51, 0x42, 0x49, 0x51, 0x51, 0x51, 0x42, 0x06, 0x06, 0x05, + 0x16, 0x48, 0x14, 0x40, 0x47, 0x40, 0x40, 0x07, 0x40, 0x06, 0x06, 0x04, 0x41, 0x18, 0x08, 0x48, + 0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x47, + 0x07, 0x07, 0x07, 0x0e, 0x16, 0x0e, 0x16, 0x10, 0x17, 0x08, 0x48, 0x17, 0x08, 0x48, 0x40, 0x40, + 0x40, 0x19, 0x10, 0x10, 0x40, 0x0f, 0x10, 0x10, 0x10, 0x27, 0x27, 0x17, 0x07, 0x16, 0x17, 0x0e, + 0x00, 0x31, 0x18, 0x10, 0x40, 0x0f, 0x10, 0x10, 0x0e, 0x10, 0x15, 0x0e, 0x0e, 0x10, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x0f, 0x40, 0x50, 0x40, 0x10, 0x47, 0x4f, 0x27, 0x40, 0x40, 0x40, 0x40, 0x08, 0x0f, + 0x40, 0x40, 0x40, 0x0f, 0x48, 0x40, 0x06, 0x16, 0x16, 0x07, 0x07, 0x08, 0x28, 0x10, 0x0f, 0x07, + 0x50, 0x27, 0x0f, 0x10, 0x40, 0x00, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x48, 0x48, 0x40, 0x48, + 0x48, 0x40, 0x48, 0x50, 0x50, 0x40, 0x48, 0x50, 0x50, 0x50, 0x40, 0x07, 0x07, 0x07, 0x48, 0x48, + 0x40, 0x48, 0x48, 0x40, 0x48, 0x50, 0x50, 0x40, 0x48, 0x50, 0x50, 0x50, 0x40, 0x07, 0x07, 0x07, + 0x17, 0x48, 0x16, 0x40, 0x47, 0x40, 0x40, 0x07, 0x40, 0x07, 0x07, 0x06, 0x40, 0x18, 0x08, 0x48, + 0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x47, + 0x07, 0x07, 0x07, 0x0f, 0x17, 0x0f, 0x17, 0x10, 0x17, 0x08, 0x48, 0x17, 0x08, 0x48, 0x40, 0x40, + 0x40, 0x18, 0x10, 0x10, 0x40, 0x0f, 0x10, 0x10, 0x10, 0x27, 0x27, 0x17, 0x07, 0x17, 0x17, 0x0f, + 0x00, 0x30, 0x18, 0x10, 0x40, 0x0f, 0x10, 0x10, 0x0f, 0x10, 0x17, 0x0f, 0x0f, 0x10, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x10, 0x00, 0x4f, 0x40, 0x0f, 0x48, 0x50, 0x28, 0x40, 0x00, 0x40, 0x40, 0x07, 0x0f, + 0x00, 0x00, 0x40, 0x10, 0x47, 0x00, 0x08, 0x18, 0x18, 0x07, 0x07, 0x07, 0x27, 0x0f, 0x10, 0x07, + 0x4f, 0x27, 0x10, 0x0f, 0x40, 0x40, 0x07, 0x40, 0x40, 0x40, 0x00, 0x00, 0x47, 0x47, 0x00, 0x47, + 0x47, 0x00, 0x47, 0x4f, 0x4f, 0x00, 0x47, 0x4f, 0x4f, 0x4f, 0x00, 0x08, 0x08, 0x08, 0x47, 0x47, + 0x00, 0x47, 0x47, 0x00, 0x47, 0x4f, 0x4f, 0x00, 0x47, 0x4f, 0x4f, 0x4f, 0x00, 0x08, 0x08, 0x08, + 0x18, 0x47, 0x18, 0x40, 0x48, 0x40, 0x00, 0x07, 0x00, 0x08, 0x08, 0x08, 0x00, 0x17, 0x07, 0x47, + 0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x48, + 0x07, 0x08, 0x08, 0x10, 0x18, 0x10, 0x18, 0x0f, 0x17, 0x07, 0x47, 0x17, 0x07, 0x47, 0x40, 0x40, + 0x40, 0x17, 0x0f, 0x0f, 0x40, 0x0f, 0x0f, 0x0f, 0x0f, 0x28, 0x27, 0x18, 0x07, 0x18, 0x18, 0x10, + 0x40, 0x2f, 0x17, 0x0f, 0x40, 0x0f, 0x0f, 0x0f, 0x10, 0x0f, 0x18, 0x10, 0x10, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x11, 0x00, 0x4f, 0x40, 0x0e, 0x48, 0x51, 0x28, 0x40, 0x00, 0x40, 0x40, 0x07, 0x0f, + 0x00, 0x02, 0x40, 0x10, 0x46, 0x02, 0x0a, 0x1b, 0x1b, 0x07, 0x07, 0x07, 0x25, 0x0f, 0x10, 0x07, + 0x4e, 0x27, 0x11, 0x0f, 0x40, 0x40, 0x06, 0x40, 0x40, 0x40, 0x00, 0x00, 0x47, 0x46, 0x00, 0x46, + 0x46, 0x01, 0x47, 0x4e, 0x4e, 0x02, 0x47, 0x4f, 0x4e, 0x4e, 0x02, 0x09, 0x08, 0x09, 0x47, 0x46, + 0x00, 0x46, 0x46, 0x01, 0x47, 0x4e, 0x4e, 0x02, 0x47, 0x4f, 0x4e, 0x4e, 0x02, 0x09, 0x08, 0x09, + 0x18, 0x47, 0x1a, 0x40, 0x48, 0x40, 0x00, 0x07, 0x00, 0x08, 0x08, 0x0a, 0x00, 0x17, 0x07, 0x47, + 0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x48, + 0x07, 0x08, 0x08, 0x10, 0x18, 0x10, 0x18, 0x0f, 0x17, 0x07, 0x47, 0x17, 0x07, 0x47, 0x40, 0x40, + 0x40, 0x16, 0x0f, 0x0f, 0x40, 0x0f, 0x0f, 0x0f, 0x0f, 0x28, 0x27, 0x18, 0x07, 0x18, 0x18, 0x10, + 0x40, 0x2e, 0x17, 0x0f, 0x40, 0x0f, 0x0f, 0x0f, 0x11, 0x0f, 0x19, 0x11, 0x11, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x12, 0x00, 0x4e, 0x40, 0x0d, 0x49, 0x52, 0x28, 0x40, 0x00, 0x40, 0x40, 0x06, 0x0f, + 0x00, 0x03, 0x40, 0x10, 0x45, 0x03, 0x0c, 0x1d, 0x1d, 0x07, 0x07, 0x07, 0x24, 0x0f, 0x11, 0x07, + 0x4d, 0x27, 0x12, 0x0f, 0x40, 0x40, 0x05, 0x40, 0x40, 0x40, 0x00, 0x00, 0x46, 0x45, 0x01, 0x45, + 0x45, 0x02, 0x46, 0x4d, 0x4d, 0x03, 0x46, 0x4e, 0x4d, 0x4d, 0x03, 0x0a, 0x09, 0x0a, 0x46, 0x45, + 0x01, 0x45, 0x45, 0x02, 0x46, 0x4d, 0x4d, 0x03, 0x46, 0x4e, 0x4d, 0x4d, 0x03, 0x0a, 0x09, 0x0a, + 0x19, 0x47, 0x1c, 0x40, 0x48, 0x40, 0x00, 0x07, 0x00, 0x09, 0x09, 0x0c, 0x01, 0x17, 0x06, 0x47, + 0x18, 0x07, 0x40, 0x17, 0x06, 0x47, 0x18, 0x07, 0x40, 0x17, 0x06, 0x47, 0x18, 0x07, 0x40, 0x48, + 0x07, 0x08, 0x08, 0x11, 0x19, 0x11, 0x19, 0x0f, 0x17, 0x06, 0x47, 0x17, 0x06, 0x47, 0x40, 0x40, + 0x40, 0x15, 0x0f, 0x0f, 0x40, 0x0f, 0x0f, 0x0e, 0x0e, 0x28, 0x27, 0x18, 0x07, 0x19, 0x18, 0x11, + 0x40, 0x2c, 0x17, 0x0f, 0x40, 0x0f, 0x0f, 0x0e, 0x12, 0x0f, 0x1a, 0x12, 0x12, 0x0f, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x13, 0x01, 0x4d, 0x40, 0x0c, 0x4a, 0x53, 0x29, 0x40, 0x01, 0x40, 0x40, 0x05, 0x0f, + 0x01, 0x05, 0x40, 0x11, 0x43, 0x05, 0x0e, 0x20, 0x20, 0x07, 0x07, 0x06, 0x22, 0x0e, 0x12, 0x07, + 0x4c, 0x27, 0x14, 0x0e, 0x40, 0x41, 0x04, 0x40, 0x40, 0x40, 0x01, 0x01, 0x45, 0x44, 0x02, 0x44, + 0x43, 0x04, 0x45, 0x4c, 0x4c, 0x05, 0x45, 0x4d, 0x4c, 0x4c, 0x05, 0x0b, 0x0a, 0x0c, 0x45, 0x44, + 0x02, 0x44, 0x43, 0x04, 0x45, 0x4c, 0x4c, 0x05, 0x45, 0x4d, 0x4c, 0x4c, 0x05, 0x0b, 0x0a, 0x0c, + 0x1a, 0x46, 0x1e, 0x40, 0x49, 0x40, 0x01, 0x07, 0x01, 0x0a, 0x0a, 0x0e, 0x02, 0x16, 0x05, 0x46, + 0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x49, + 0x07, 0x09, 0x09, 0x12, 0x1a, 0x12, 0x1a, 0x0e, 0x17, 0x05, 0x46, 0x17, 0x05, 0x46, 0x40, 0x40, + 0x40, 0x14, 0x0e, 0x0e, 0x40, 0x0f, 0x0e, 0x0d, 0x0d, 0x29, 0x27, 0x19, 0x07, 0x1a, 0x19, 0x12, + 0x41, 0x2b, 0x16, 0x0e, 0x40, 0x0f, 0x0e, 0x0d, 0x13, 0x0e, 0x1c, 0x13, 0x13, 0x0e, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x14, 0x01, 0x4d, 0x40, 0x0b, 0x4a, 0x54, 0x29, 0x40, 0x01, 0x40, 0x40, 0x05, 0x0f, + 0x01, 0x06, 0x40, 0x11, 0x42, 0x06, 0x10, 0x22, 0x22, 0x07, 0x07, 0x06, 0x21, 0x0e, 0x12, 0x07, + 0x4b, 0x27, 0x15, 0x0e, 0x40, 0x41, 0x03, 0x40, 0x40, 0x40, 0x01, 0x01, 0x45, 0x43, 0x02, 0x43, + 0x42, 0x05, 0x45, 0x4b, 0x4b, 0x06, 0x45, 0x4d, 0x4b, 0x4b, 0x06, 0x0c, 0x0a, 0x0d, 0x45, 0x43, + 0x02, 0x43, 0x42, 0x05, 0x45, 0x4b, 0x4b, 0x06, 0x45, 0x4d, 0x4b, 0x4b, 0x06, 0x0c, 0x0a, 0x0d, + 0x1a, 0x46, 0x20, 0x40, 0x49, 0x40, 0x01, 0x07, 0x01, 0x0a, 0x0a, 0x10, 0x02, 0x16, 0x05, 0x46, + 0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x49, + 0x07, 0x09, 0x09, 0x12, 0x1a, 0x12, 0x1a, 0x0e, 0x17, 0x05, 0x46, 0x17, 0x05, 0x46, 0x40, 0x40, + 0x40, 0x13, 0x0e, 0x0e, 0x40, 0x0f, 0x0e, 0x0d, 0x0d, 0x29, 0x27, 0x19, 0x07, 0x1a, 0x19, 0x12, + 0x41, 0x2a, 0x16, 0x0e, 0x40, 0x0f, 0x0e, 0x0d, 0x14, 0x0e, 0x1d, 0x14, 0x14, 0x0e, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x15, 0x01, 0x4c, 0x40, 0x0a, 0x4b, 0x55, 0x29, 0x40, 0x01, 0x40, 0x40, 0x04, 0x0f, + 0x01, 0x08, 0x40, 0x11, 0x41, 0x08, 0x12, 0x25, 0x25, 0x07, 0x07, 0x06, 0x1f, 0x0e, 0x13, 0x07, + 0x4a, 0x27, 0x16, 0x0e, 0x40, 0x41, 0x02, 0x40, 0x40, 0x40, 0x01, 0x01, 0x44, 0x42, 0x03, 0x42, + 0x41, 0x06, 0x44, 0x4a, 0x4a, 0x08, 0x44, 0x4c, 0x4a, 0x4a, 0x08, 0x0d, 0x0b, 0x0e, 0x44, 0x42, + 0x03, 0x42, 0x41, 0x06, 0x44, 0x4a, 0x4a, 0x08, 0x44, 0x4c, 0x4a, 0x4a, 0x08, 0x0d, 0x0b, 0x0e, + 0x1b, 0x46, 0x22, 0x40, 0x49, 0x40, 0x01, 0x07, 0x01, 0x0b, 0x0b, 0x12, 0x03, 0x16, 0x04, 0x46, + 0x19, 0x07, 0x40, 0x16, 0x04, 0x46, 0x19, 0x07, 0x40, 0x16, 0x04, 0x46, 0x19, 0x07, 0x40, 0x49, + 0x07, 0x09, 0x09, 0x13, 0x1b, 0x13, 0x1b, 0x0e, 0x17, 0x04, 0x46, 0x17, 0x04, 0x46, 0x40, 0x40, + 0x40, 0x12, 0x0e, 0x0e, 0x40, 0x0f, 0x0e, 0x0c, 0x0c, 0x29, 0x27, 0x19, 0x07, 0x1b, 0x19, 0x13, + 0x41, 0x29, 0x16, 0x0e, 0x40, 0x0f, 0x0e, 0x0c, 0x15, 0x0e, 0x1e, 0x15, 0x15, 0x0e, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x15, 0x01, 0x4c, 0x40, 0x09, 0x4c, 0x56, 0x29, 0x40, 0x01, 0x40, 0x40, 0x03, 0x0f, + 0x01, 0x09, 0x40, 0x11, 0x40, 0x09, 0x13, 0x27, 0x27, 0x07, 0x07, 0x05, 0x1d, 0x0d, 0x13, 0x07, + 0x4a, 0x27, 0x17, 0x0d, 0x40, 0x42, 0x01, 0x40, 0x40, 0x40, 0x01, 0x01, 0x44, 0x42, 0x03, 0x42, + 0x40, 0x07, 0x44, 0x4a, 0x4a, 0x09, 0x44, 0x4c, 0x4a, 0x4a, 0x09, 0x0d, 0x0b, 0x0f, 0x44, 0x42, + 0x03, 0x42, 0x40, 0x07, 0x44, 0x4a, 0x4a, 0x09, 0x44, 0x4c, 0x4a, 0x4a, 0x09, 0x0d, 0x0b, 0x0f, + 0x1b, 0x46, 0x23, 0x40, 0x4a, 0x40, 0x01, 0x07, 0x01, 0x0b, 0x0b, 0x13, 0x03, 0x15, 0x03, 0x46, + 0x19, 0x07, 0x40, 0x15, 0x03, 0x46, 0x19, 0x07, 0x40, 0x15, 0x03, 0x46, 0x19, 0x07, 0x40, 0x4a, + 0x07, 0x09, 0x09, 0x13, 0x1b, 0x13, 0x1b, 0x0d, 0x17, 0x03, 0x46, 0x17, 0x03, 0x46, 0x40, 0x40, + 0x40, 0x11, 0x0d, 0x0d, 0x40, 0x0f, 0x0d, 0x0b, 0x0b, 0x29, 0x27, 0x19, 0x07, 0x1b, 0x19, 0x13, + 0x42, 0x27, 0x15, 0x0d, 0x40, 0x0f, 0x0d, 0x0b, 0x15, 0x0d, 0x1f, 0x15, 0x15, 0x0d, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x16, 0x02, 0x4b, 0x40, 0x09, 0x4c, 0x56, 0x2a, 0x40, 0x02, 0x40, 0x40, 0x03, 0x0f, + 0x02, 0x0b, 0x40, 0x12, 0x01, 0x0b, 0x15, 0x2a, 0x2a, 0x07, 0x07, 0x05, 0x1c, 0x0d, 0x14, 0x07, + 0x49, 0x27, 0x19, 0x0d, 0x40, 0x42, 0x01, 0x40, 0x40, 0x40, 0x02, 0x02, 0x43, 0x41, 0x04, 0x41, + 0x01, 0x09, 0x43, 0x49, 0x49, 0x0b, 0x43, 0x4b, 0x49, 0x49, 0x0b, 0x0e, 0x0c, 0x11, 0x43, 0x41, + 0x04, 0x41, 0x01, 0x09, 0x43, 0x49, 0x49, 0x0b, 0x43, 0x4b, 0x49, 0x49, 0x0b, 0x0e, 0x0c, 0x11, + 0x1c, 0x45, 0x25, 0x40, 0x4a, 0x40, 0x02, 0x07, 0x02, 0x0c, 0x0c, 0x15, 0x04, 0x15, 0x03, 0x45, + 0x1a, 0x07, 0x40, 0x15, 0x03, 0x45, 0x1a, 0x07, 0x40, 0x15, 0x03, 0x45, 0x1a, 0x07, 0x40, 0x4a, + 0x07, 0x0a, 0x0a, 0x14, 0x1c, 0x14, 0x1c, 0x0d, 0x17, 0x03, 0x45, 0x17, 0x03, 0x45, 0x40, 0x40, + 0x40, 0x11, 0x0d, 0x0d, 0x40, 0x0f, 0x0d, 0x0b, 0x0b, 0x2a, 0x27, 0x1a, 0x07, 0x1c, 0x1a, 0x14, + 0x42, 0x26, 0x15, 0x0d, 0x40, 0x0f, 0x0d, 0x0b, 0x16, 0x0d, 0x21, 0x16, 0x16, 0x0d, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x17, 0x02, 0x4a, 0x40, 0x08, 0x4d, 0x57, 0x2a, 0x40, 0x02, 0x40, 0x40, 0x02, 0x0f, + 0x02, 0x0d, 0x40, 0x12, 0x02, 0x0d, 0x17, 0x2c, 0x2c, 0x07, 0x07, 0x05, 0x1a, 0x0d, 0x15, 0x07, + 0x48, 0x27, 0x1a, 0x0d, 0x40, 0x42, 0x00, 0x40, 0x40, 0x40, 0x02, 0x02, 0x42, 0x40, 0x05, 0x40, + 0x02, 0x0a, 0x42, 0x48, 0x48, 0x0d, 0x42, 0x4a, 0x48, 0x48, 0x0d, 0x0f, 0x0d, 0x12, 0x42, 0x40, + 0x05, 0x40, 0x02, 0x0a, 0x42, 0x48, 0x48, 0x0d, 0x42, 0x4a, 0x48, 0x48, 0x0d, 0x0f, 0x0d, 0x12, + 0x1d, 0x45, 0x27, 0x40, 0x4a, 0x40, 0x02, 0x07, 0x02, 0x0d, 0x0d, 0x17, 0x05, 0x15, 0x02, 0x45, + 0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x4a, + 0x07, 0x0a, 0x0a, 0x15, 0x1d, 0x15, 0x1d, 0x0d, 0x17, 0x02, 0x45, 0x17, 0x02, 0x45, 0x40, 0x40, + 0x40, 0x10, 0x0d, 0x0d, 0x40, 0x0f, 0x0d, 0x0a, 0x0a, 0x2a, 0x27, 0x1a, 0x07, 0x1d, 0x1a, 0x15, + 0x42, 0x25, 0x15, 0x0d, 0x40, 0x0f, 0x0d, 0x0a, 0x17, 0x0d, 0x22, 0x17, 0x17, 0x0d, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x18, 0x02, 0x4a, 0x40, 0x07, 0x4d, 0x58, 0x2a, 0x40, 0x02, 0x40, 0x40, 0x02, 0x0f, + 0x02, 0x0e, 0x40, 0x12, 0x03, 0x0e, 0x19, 0x2f, 0x2f, 0x07, 0x07, 0x05, 0x19, 0x0d, 0x15, 0x07, + 0x47, 0x27, 0x1b, 0x0d, 0x40, 0x42, 0x40, 0x40, 0x40, 0x40, 0x02, 0x02, 0x42, 0x00, 0x05, 0x00, + 0x03, 0x0b, 0x42, 0x47, 0x47, 0x0e, 0x42, 0x4a, 0x47, 0x47, 0x0e, 0x10, 0x0d, 0x13, 0x42, 0x00, + 0x05, 0x00, 0x03, 0x0b, 0x42, 0x47, 0x47, 0x0e, 0x42, 0x4a, 0x47, 0x47, 0x0e, 0x10, 0x0d, 0x13, + 0x1d, 0x45, 0x29, 0x40, 0x4a, 0x40, 0x02, 0x07, 0x02, 0x0d, 0x0d, 0x19, 0x05, 0x15, 0x02, 0x45, + 0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x4a, + 0x07, 0x0a, 0x0a, 0x15, 0x1d, 0x15, 0x1d, 0x0d, 0x17, 0x02, 0x45, 0x17, 0x02, 0x45, 0x40, 0x40, + 0x40, 0x0f, 0x0d, 0x0d, 0x40, 0x0f, 0x0d, 0x0a, 0x0a, 0x2a, 0x27, 0x1a, 0x07, 0x1d, 0x1a, 0x15, + 0x42, 0x24, 0x15, 0x0d, 0x40, 0x0f, 0x0d, 0x0a, 0x18, 0x0d, 0x23, 0x18, 0x18, 0x0d, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x19, 0x03, 0x49, 0x40, 0x06, 0x4e, 0x59, 0x2b, 0x40, 0x03, 0x40, 0x40, 0x01, 0x0f, + 0x03, 0x10, 0x40, 0x13, 0x04, 0x10, 0x1b, 0x31, 0x31, 0x07, 0x07, 0x04, 0x17, 0x0c, 0x16, 0x07, + 0x46, 0x27, 0x1c, 0x0c, 0x40, 0x43, 0x41, 0x40, 0x40, 0x40, 0x03, 0x03, 0x41, 0x01, 0x06, 0x01, + 0x04, 0x0c, 0x41, 0x46, 0x46, 0x10, 0x41, 0x49, 0x46, 0x46, 0x10, 0x11, 0x0e, 0x14, 0x41, 0x01, + 0x06, 0x01, 0x04, 0x0c, 0x41, 0x46, 0x46, 0x10, 0x41, 0x49, 0x46, 0x46, 0x10, 0x11, 0x0e, 0x14, + 0x1e, 0x44, 0x2b, 0x40, 0x4b, 0x40, 0x03, 0x07, 0x03, 0x0e, 0x0e, 0x1b, 0x06, 0x14, 0x01, 0x44, + 0x1b, 0x07, 0x40, 0x14, 0x01, 0x44, 0x1b, 0x07, 0x40, 0x14, 0x01, 0x44, 0x1b, 0x07, 0x40, 0x4b, + 0x07, 0x0b, 0x0b, 0x16, 0x1e, 0x16, 0x1e, 0x0c, 0x17, 0x01, 0x44, 0x17, 0x01, 0x44, 0x40, 0x40, + 0x40, 0x0e, 0x0c, 0x0c, 0x40, 0x0f, 0x0c, 0x09, 0x09, 0x2b, 0x27, 0x1b, 0x07, 0x1e, 0x1b, 0x16, + 0x43, 0x22, 0x14, 0x0c, 0x40, 0x0f, 0x0c, 0x09, 0x19, 0x0c, 0x24, 0x19, 0x19, 0x0c, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x1a, 0x03, 0x48, 0x40, 0x05, 0x4f, 0x5a, 0x2b, 0x40, 0x03, 0x40, 0x40, 0x00, 0x0f, + 0x03, 0x11, 0x40, 0x13, 0x06, 0x11, 0x1d, 0x34, 0x34, 0x07, 0x07, 0x04, 0x16, 0x0c, 0x17, 0x07, + 0x45, 0x27, 0x1e, 0x0c, 0x40, 0x43, 0x42, 0x40, 0x40, 0x40, 0x03, 0x03, 0x40, 0x02, 0x07, 0x02, + 0x06, 0x0e, 0x40, 0x45, 0x45, 0x11, 0x40, 0x48, 0x45, 0x45, 0x11, 0x12, 0x0f, 0x16, 0x40, 0x02, + 0x07, 0x02, 0x06, 0x0e, 0x40, 0x45, 0x45, 0x11, 0x40, 0x48, 0x45, 0x45, 0x11, 0x12, 0x0f, 0x16, + 0x1f, 0x44, 0x2d, 0x40, 0x4b, 0x40, 0x03, 0x07, 0x03, 0x0f, 0x0f, 0x1d, 0x07, 0x14, 0x00, 0x44, + 0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x4b, + 0x07, 0x0b, 0x0b, 0x17, 0x1f, 0x17, 0x1f, 0x0c, 0x17, 0x00, 0x44, 0x17, 0x00, 0x44, 0x40, 0x40, + 0x40, 0x0d, 0x0c, 0x0c, 0x40, 0x0f, 0x0c, 0x08, 0x08, 0x2b, 0x27, 0x1b, 0x07, 0x1f, 0x1b, 0x17, + 0x43, 0x21, 0x14, 0x0c, 0x40, 0x0f, 0x0c, 0x08, 0x1a, 0x0c, 0x26, 0x1a, 0x1a, 0x0c, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x1b, 0x03, 0x48, 0x40, 0x04, 0x4f, 0x5b, 0x2b, 0x40, 0x03, 0x40, 0x40, 0x00, 0x0f, + 0x03, 0x13, 0x40, 0x13, 0x07, 0x13, 0x1f, 0x36, 0x36, 0x07, 0x07, 0x04, 0x14, 0x0c, 0x17, 0x07, + 0x44, 0x27, 0x1f, 0x0c, 0x40, 0x43, 0x43, 0x40, 0x40, 0x40, 0x03, 0x03, 0x40, 0x03, 0x07, 0x03, + 0x07, 0x0f, 0x40, 0x44, 0x44, 0x13, 0x40, 0x48, 0x44, 0x44, 0x13, 0x13, 0x0f, 0x17, 0x40, 0x03, + 0x07, 0x03, 0x07, 0x0f, 0x40, 0x44, 0x44, 0x13, 0x40, 0x48, 0x44, 0x44, 0x13, 0x13, 0x0f, 0x17, + 0x1f, 0x44, 0x2f, 0x40, 0x4b, 0x40, 0x03, 0x07, 0x03, 0x0f, 0x0f, 0x1f, 0x07, 0x14, 0x00, 0x44, + 0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x4b, + 0x07, 0x0b, 0x0b, 0x17, 0x1f, 0x17, 0x1f, 0x0c, 0x17, 0x00, 0x44, 0x17, 0x00, 0x44, 0x40, 0x40, + 0x40, 0x0c, 0x0c, 0x0c, 0x40, 0x0f, 0x0c, 0x08, 0x08, 0x2b, 0x27, 0x1b, 0x07, 0x1f, 0x1b, 0x17, + 0x43, 0x20, 0x14, 0x0c, 0x40, 0x0f, 0x0c, 0x08, 0x1b, 0x0c, 0x27, 0x1b, 0x1b, 0x0c, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x1c, 0x04, 0x47, 0x40, 0x03, 0x50, 0x5c, 0x2c, 0x40, 0x04, 0x40, 0x40, 0x40, 0x0f, + 0x04, 0x14, 0x40, 0x14, 0x08, 0x14, 0x21, 0x39, 0x39, 0x07, 0x07, 0x03, 0x13, 0x0b, 0x18, 0x07, + 0x43, 0x27, 0x20, 0x0b, 0x40, 0x44, 0x44, 0x40, 0x40, 0x40, 0x04, 0x04, 0x00, 0x04, 0x08, 0x04, + 0x08, 0x10, 0x00, 0x43, 0x43, 0x14, 0x00, 0x47, 0x43, 0x43, 0x14, 0x14, 0x10, 0x18, 0x00, 0x04, + 0x08, 0x04, 0x08, 0x10, 0x00, 0x43, 0x43, 0x14, 0x00, 0x47, 0x43, 0x43, 0x14, 0x14, 0x10, 0x18, + 0x20, 0x43, 0x31, 0x40, 0x4c, 0x40, 0x04, 0x07, 0x04, 0x10, 0x10, 0x21, 0x08, 0x13, 0x40, 0x43, + 0x1c, 0x07, 0x40, 0x13, 0x40, 0x43, 0x1c, 0x07, 0x40, 0x13, 0x40, 0x43, 0x1c, 0x07, 0x40, 0x4c, + 0x07, 0x0c, 0x0c, 0x18, 0x20, 0x18, 0x20, 0x0b, 0x17, 0x40, 0x43, 0x17, 0x40, 0x43, 0x40, 0x40, + 0x40, 0x0b, 0x0b, 0x0b, 0x40, 0x0f, 0x0b, 0x07, 0x07, 0x2c, 0x27, 0x1c, 0x07, 0x20, 0x1c, 0x18, + 0x44, 0x1f, 0x13, 0x0b, 0x40, 0x0f, 0x0b, 0x07, 0x1c, 0x0b, 0x28, 0x1c, 0x1c, 0x0b, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x1d, 0x04, 0x47, 0x40, 0x02, 0x51, 0x5d, 0x2c, 0x40, 0x04, 0x40, 0x40, 0x41, 0x0f, + 0x04, 0x16, 0x40, 0x14, 0x09, 0x16, 0x22, 0x3b, 0x3b, 0x07, 0x07, 0x03, 0x11, 0x0b, 0x18, 0x07, + 0x42, 0x27, 0x21, 0x0b, 0x40, 0x44, 0x45, 0x40, 0x40, 0x40, 0x04, 0x04, 0x00, 0x05, 0x08, 0x05, + 0x09, 0x11, 0x00, 0x42, 0x42, 0x16, 0x00, 0x47, 0x42, 0x42, 0x16, 0x15, 0x10, 0x19, 0x00, 0x05, + 0x08, 0x05, 0x09, 0x11, 0x00, 0x42, 0x42, 0x16, 0x00, 0x47, 0x42, 0x42, 0x16, 0x15, 0x10, 0x19, + 0x20, 0x43, 0x32, 0x40, 0x4c, 0x40, 0x04, 0x07, 0x04, 0x10, 0x10, 0x22, 0x08, 0x13, 0x41, 0x43, + 0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x4c, + 0x07, 0x0c, 0x0c, 0x18, 0x20, 0x18, 0x20, 0x0b, 0x17, 0x41, 0x43, 0x17, 0x41, 0x43, 0x40, 0x40, + 0x40, 0x0a, 0x0b, 0x0b, 0x40, 0x0f, 0x0b, 0x06, 0x06, 0x2c, 0x27, 0x1c, 0x07, 0x20, 0x1c, 0x18, + 0x44, 0x1d, 0x13, 0x0b, 0x40, 0x0f, 0x0b, 0x06, 0x1d, 0x0b, 0x29, 0x1d, 0x1d, 0x0b, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x1e, 0x04, 0x46, 0x40, 0x01, 0x51, 0x5e, 0x2c, 0x40, 0x04, 0x40, 0x40, 0x41, 0x0f, + 0x04, 0x18, 0x40, 0x14, 0x0b, 0x18, 0x24, 0x3e, 0x3e, 0x07, 0x07, 0x03, 0x0f, 0x0b, 0x19, 0x07, + 0x41, 0x27, 0x23, 0x0b, 0x40, 0x44, 0x46, 0x40, 0x40, 0x40, 0x04, 0x04, 0x01, 0x06, 0x09, 0x06, + 0x0b, 0x13, 0x01, 0x41, 0x41, 0x18, 0x01, 0x46, 0x41, 0x41, 0x18, 0x16, 0x11, 0x1b, 0x01, 0x06, + 0x09, 0x06, 0x0b, 0x13, 0x01, 0x41, 0x41, 0x18, 0x01, 0x46, 0x41, 0x41, 0x18, 0x16, 0x11, 0x1b, + 0x21, 0x43, 0x34, 0x40, 0x4c, 0x40, 0x04, 0x07, 0x04, 0x11, 0x11, 0x24, 0x09, 0x13, 0x41, 0x43, + 0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x4c, + 0x07, 0x0c, 0x0c, 0x19, 0x21, 0x19, 0x21, 0x0b, 0x17, 0x41, 0x43, 0x17, 0x41, 0x43, 0x40, 0x40, + 0x40, 0x09, 0x0b, 0x0b, 0x40, 0x0f, 0x0b, 0x06, 0x06, 0x2c, 0x27, 0x1c, 0x07, 0x21, 0x1c, 0x19, + 0x44, 0x1c, 0x13, 0x0b, 0x40, 0x0f, 0x0b, 0x06, 0x1e, 0x0b, 0x2b, 0x1e, 0x1e, 0x0b, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x1f, 0x05, 0x45, 0x40, 0x00, 0x52, 0x5f, 0x2d, 0x40, 0x05, 0x40, 0x40, 0x42, 0x0f, + 0x05, 0x19, 0x40, 0x15, 0x0c, 0x19, 0x26, 0x3e, 0x3e, 0x07, 0x07, 0x02, 0x0e, 0x0a, 0x1a, 0x07, + 0x40, 0x27, 0x24, 0x0a, 0x40, 0x45, 0x47, 0x40, 0x40, 0x40, 0x05, 0x05, 0x02, 0x07, 0x0a, 0x07, + 0x0c, 0x14, 0x02, 0x40, 0x40, 0x19, 0x02, 0x45, 0x40, 0x40, 0x19, 0x17, 0x12, 0x1c, 0x02, 0x07, + 0x0a, 0x07, 0x0c, 0x14, 0x02, 0x40, 0x40, 0x19, 0x02, 0x45, 0x40, 0x40, 0x19, 0x17, 0x12, 0x1c, + 0x22, 0x42, 0x36, 0x40, 0x4d, 0x40, 0x05, 0x07, 0x05, 0x12, 0x12, 0x26, 0x0a, 0x12, 0x42, 0x42, + 0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x4d, + 0x07, 0x0d, 0x0d, 0x1a, 0x22, 0x1a, 0x22, 0x0a, 0x17, 0x42, 0x42, 0x17, 0x42, 0x42, 0x40, 0x40, + 0x40, 0x08, 0x0a, 0x0a, 0x40, 0x0f, 0x0a, 0x05, 0x05, 0x2d, 0x27, 0x1d, 0x07, 0x22, 0x1d, 0x1a, + 0x45, 0x1b, 0x12, 0x0a, 0x40, 0x0f, 0x0a, 0x05, 0x1f, 0x0a, 0x2c, 0x1f, 0x1f, 0x0a, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x20, 0x05, 0x45, 0x40, 0x40, 0x52, 0x60, 0x2d, 0x40, 0x05, 0x40, 0x40, 0x42, 0x0f, + 0x05, 0x1b, 0x40, 0x15, 0x0d, 0x1b, 0x28, 0x3e, 0x3e, 0x07, 0x07, 0x02, 0x0c, 0x0a, 0x1a, 0x07, + 0x00, 0x27, 0x25, 0x0a, 0x40, 0x45, 0x48, 0x40, 0x40, 0x40, 0x05, 0x05, 0x02, 0x08, 0x0a, 0x08, + 0x0d, 0x15, 0x02, 0x00, 0x00, 0x1b, 0x02, 0x45, 0x00, 0x00, 0x1b, 0x18, 0x12, 0x1d, 0x02, 0x08, + 0x0a, 0x08, 0x0d, 0x15, 0x02, 0x00, 0x00, 0x1b, 0x02, 0x45, 0x00, 0x00, 0x1b, 0x18, 0x12, 0x1d, + 0x22, 0x42, 0x38, 0x40, 0x4d, 0x40, 0x05, 0x07, 0x05, 0x12, 0x12, 0x28, 0x0a, 0x12, 0x42, 0x42, + 0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x4d, + 0x07, 0x0d, 0x0d, 0x1a, 0x22, 0x1a, 0x22, 0x0a, 0x17, 0x42, 0x42, 0x17, 0x42, 0x42, 0x40, 0x40, + 0x40, 0x07, 0x0a, 0x0a, 0x40, 0x0f, 0x0a, 0x05, 0x05, 0x2d, 0x27, 0x1d, 0x07, 0x22, 0x1d, 0x1a, + 0x45, 0x1a, 0x12, 0x0a, 0x40, 0x0f, 0x0a, 0x05, 0x20, 0x0a, 0x2d, 0x20, 0x20, 0x0a, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x21, 0x05, 0x44, 0x40, 0x41, 0x53, 0x61, 0x2d, 0x40, 0x05, 0x40, 0x40, 0x43, 0x0f, + 0x05, 0x1c, 0x40, 0x15, 0x0e, 0x1c, 0x2a, 0x3e, 0x3e, 0x07, 0x07, 0x02, 0x0b, 0x0a, 0x1b, 0x07, + 0x01, 0x27, 0x26, 0x0a, 0x40, 0x45, 0x49, 0x40, 0x40, 0x40, 0x05, 0x05, 0x03, 0x09, 0x0b, 0x09, + 0x0e, 0x16, 0x03, 0x01, 0x01, 0x1c, 0x03, 0x44, 0x01, 0x01, 0x1c, 0x19, 0x13, 0x1e, 0x03, 0x09, + 0x0b, 0x09, 0x0e, 0x16, 0x03, 0x01, 0x01, 0x1c, 0x03, 0x44, 0x01, 0x01, 0x1c, 0x19, 0x13, 0x1e, + 0x23, 0x42, 0x3a, 0x40, 0x4d, 0x40, 0x05, 0x07, 0x05, 0x13, 0x13, 0x2a, 0x0b, 0x12, 0x43, 0x42, + 0x1d, 0x07, 0x40, 0x12, 0x43, 0x42, 0x1d, 0x07, 0x40, 0x12, 0x43, 0x42, 0x1d, 0x07, 0x40, 0x4d, + 0x07, 0x0d, 0x0d, 0x1b, 0x23, 0x1b, 0x23, 0x0a, 0x17, 0x43, 0x42, 0x17, 0x43, 0x42, 0x40, 0x40, + 0x40, 0x06, 0x0a, 0x0a, 0x40, 0x0f, 0x0a, 0x04, 0x04, 0x2d, 0x27, 0x1d, 0x07, 0x23, 0x1d, 0x1b, + 0x45, 0x18, 0x12, 0x0a, 0x40, 0x0f, 0x0a, 0x04, 0x21, 0x0a, 0x2e, 0x21, 0x21, 0x0a, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x22, 0x06, 0x43, 0x40, 0x42, 0x54, 0x62, 0x2e, 0x40, 0x06, 0x40, 0x40, 0x44, 0x0f, + 0x06, 0x1e, 0x40, 0x16, 0x10, 0x1e, 0x2c, 0x3e, 0x3e, 0x07, 0x07, 0x01, 0x09, 0x09, 0x1c, 0x07, + 0x02, 0x27, 0x28, 0x09, 0x40, 0x46, 0x4a, 0x40, 0x40, 0x40, 0x06, 0x06, 0x04, 0x0a, 0x0c, 0x0a, + 0x10, 0x18, 0x04, 0x02, 0x02, 0x1e, 0x04, 0x43, 0x02, 0x02, 0x1e, 0x1a, 0x14, 0x20, 0x04, 0x0a, + 0x0c, 0x0a, 0x10, 0x18, 0x04, 0x02, 0x02, 0x1e, 0x04, 0x43, 0x02, 0x02, 0x1e, 0x1a, 0x14, 0x20, + 0x24, 0x41, 0x3c, 0x40, 0x4e, 0x40, 0x06, 0x07, 0x06, 0x14, 0x14, 0x2c, 0x0c, 0x11, 0x44, 0x41, + 0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x4e, + 0x07, 0x0e, 0x0e, 0x1c, 0x24, 0x1c, 0x24, 0x09, 0x17, 0x44, 0x41, 0x17, 0x44, 0x41, 0x40, 0x40, + 0x40, 0x05, 0x09, 0x09, 0x40, 0x0f, 0x09, 0x03, 0x03, 0x2e, 0x27, 0x1e, 0x07, 0x24, 0x1e, 0x1c, + 0x46, 0x17, 0x11, 0x09, 0x40, 0x0f, 0x09, 0x03, 0x22, 0x09, 0x30, 0x22, 0x22, 0x09, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x23, 0x06, 0x43, 0x40, 0x43, 0x54, 0x63, 0x2e, 0x40, 0x06, 0x40, 0x40, 0x44, 0x0f, + 0x06, 0x1f, 0x40, 0x16, 0x11, 0x1f, 0x2e, 0x3e, 0x3e, 0x07, 0x07, 0x01, 0x08, 0x09, 0x1c, 0x07, + 0x03, 0x27, 0x29, 0x09, 0x40, 0x46, 0x4b, 0x40, 0x40, 0x40, 0x06, 0x06, 0x04, 0x0b, 0x0c, 0x0b, + 0x11, 0x19, 0x04, 0x03, 0x03, 0x1f, 0x04, 0x43, 0x03, 0x03, 0x1f, 0x1b, 0x14, 0x21, 0x04, 0x0b, + 0x0c, 0x0b, 0x11, 0x19, 0x04, 0x03, 0x03, 0x1f, 0x04, 0x43, 0x03, 0x03, 0x1f, 0x1b, 0x14, 0x21, + 0x24, 0x41, 0x3e, 0x40, 0x4e, 0x40, 0x06, 0x07, 0x06, 0x14, 0x14, 0x2e, 0x0c, 0x11, 0x44, 0x41, + 0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x4e, + 0x07, 0x0e, 0x0e, 0x1c, 0x24, 0x1c, 0x24, 0x09, 0x17, 0x44, 0x41, 0x17, 0x44, 0x41, 0x40, 0x40, + 0x40, 0x04, 0x09, 0x09, 0x40, 0x0f, 0x09, 0x03, 0x03, 0x2e, 0x27, 0x1e, 0x07, 0x24, 0x1e, 0x1c, + 0x46, 0x16, 0x11, 0x09, 0x40, 0x0f, 0x09, 0x03, 0x23, 0x09, 0x31, 0x23, 0x23, 0x09, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x24, 0x06, 0x42, 0x40, 0x44, 0x55, 0x64, 0x2e, 0x40, 0x06, 0x40, 0x40, 0x45, 0x0f, + 0x06, 0x21, 0x40, 0x16, 0x12, 0x21, 0x30, 0x3e, 0x3e, 0x07, 0x07, 0x01, 0x06, 0x09, 0x1d, 0x07, + 0x04, 0x27, 0x2a, 0x09, 0x40, 0x46, 0x4c, 0x40, 0x40, 0x40, 0x06, 0x06, 0x05, 0x0c, 0x0d, 0x0c, + 0x12, 0x1a, 0x05, 0x04, 0x04, 0x21, 0x05, 0x42, 0x04, 0x04, 0x21, 0x1c, 0x15, 0x22, 0x05, 0x0c, + 0x0d, 0x0c, 0x12, 0x1a, 0x05, 0x04, 0x04, 0x21, 0x05, 0x42, 0x04, 0x04, 0x21, 0x1c, 0x15, 0x22, + 0x25, 0x41, 0x3e, 0x40, 0x4e, 0x40, 0x06, 0x07, 0x06, 0x15, 0x15, 0x30, 0x0d, 0x11, 0x45, 0x41, + 0x1e, 0x07, 0x40, 0x11, 0x45, 0x41, 0x1e, 0x07, 0x40, 0x11, 0x45, 0x41, 0x1e, 0x07, 0x40, 0x4e, + 0x07, 0x0e, 0x0e, 0x1d, 0x25, 0x1d, 0x25, 0x09, 0x17, 0x45, 0x41, 0x17, 0x45, 0x41, 0x40, 0x40, + 0x40, 0x03, 0x09, 0x09, 0x40, 0x0f, 0x09, 0x02, 0x02, 0x2e, 0x27, 0x1e, 0x07, 0x25, 0x1e, 0x1d, + 0x46, 0x15, 0x11, 0x09, 0x40, 0x0f, 0x09, 0x02, 0x24, 0x09, 0x32, 0x24, 0x24, 0x09, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x24, 0x06, 0x42, 0x40, 0x45, 0x56, 0x65, 0x2e, 0x40, 0x06, 0x40, 0x40, 0x46, 0x0f, + 0x06, 0x22, 0x40, 0x16, 0x13, 0x22, 0x31, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x04, 0x08, 0x1d, 0x07, + 0x04, 0x27, 0x2b, 0x08, 0x40, 0x47, 0x4d, 0x40, 0x40, 0x40, 0x06, 0x06, 0x05, 0x0c, 0x0d, 0x0c, + 0x13, 0x1b, 0x05, 0x04, 0x04, 0x22, 0x05, 0x42, 0x04, 0x04, 0x22, 0x1c, 0x15, 0x23, 0x05, 0x0c, + 0x0d, 0x0c, 0x13, 0x1b, 0x05, 0x04, 0x04, 0x22, 0x05, 0x42, 0x04, 0x04, 0x22, 0x1c, 0x15, 0x23, + 0x25, 0x41, 0x3e, 0x40, 0x4f, 0x40, 0x06, 0x07, 0x06, 0x15, 0x15, 0x31, 0x0d, 0x10, 0x46, 0x41, + 0x1e, 0x07, 0x40, 0x10, 0x46, 0x41, 0x1e, 0x07, 0x40, 0x10, 0x46, 0x41, 0x1e, 0x07, 0x40, 0x4f, + 0x07, 0x0e, 0x0e, 0x1d, 0x25, 0x1d, 0x25, 0x08, 0x17, 0x46, 0x41, 0x17, 0x46, 0x41, 0x40, 0x40, + 0x40, 0x02, 0x08, 0x08, 0x40, 0x0f, 0x08, 0x01, 0x01, 0x2e, 0x27, 0x1e, 0x07, 0x25, 0x1e, 0x1d, + 0x47, 0x13, 0x10, 0x08, 0x40, 0x0f, 0x08, 0x01, 0x24, 0x08, 0x33, 0x24, 0x24, 0x08, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x25, 0x07, 0x41, 0x40, 0x45, 0x56, 0x65, 0x2f, 0x40, 0x07, 0x40, 0x40, 0x46, 0x0f, + 0x07, 0x24, 0x40, 0x17, 0x15, 0x24, 0x33, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x03, 0x08, 0x1e, 0x07, + 0x05, 0x27, 0x2d, 0x08, 0x40, 0x47, 0x4d, 0x40, 0x40, 0x40, 0x07, 0x07, 0x06, 0x0d, 0x0e, 0x0d, + 0x15, 0x1d, 0x06, 0x05, 0x05, 0x24, 0x06, 0x41, 0x05, 0x05, 0x24, 0x1d, 0x16, 0x25, 0x06, 0x0d, + 0x0e, 0x0d, 0x15, 0x1d, 0x06, 0x05, 0x05, 0x24, 0x06, 0x41, 0x05, 0x05, 0x24, 0x1d, 0x16, 0x25, + 0x26, 0x40, 0x3e, 0x40, 0x4f, 0x40, 0x07, 0x07, 0x07, 0x16, 0x16, 0x33, 0x0e, 0x10, 0x46, 0x40, + 0x1f, 0x07, 0x40, 0x10, 0x46, 0x40, 0x1f, 0x07, 0x40, 0x10, 0x46, 0x40, 0x1f, 0x07, 0x40, 0x4f, + 0x07, 0x0f, 0x0f, 0x1e, 0x26, 0x1e, 0x26, 0x08, 0x17, 0x46, 0x40, 0x17, 0x46, 0x40, 0x40, 0x40, + 0x40, 0x02, 0x08, 0x08, 0x40, 0x0f, 0x08, 0x01, 0x01, 0x2f, 0x27, 0x1f, 0x07, 0x26, 0x1f, 0x1e, + 0x47, 0x12, 0x10, 0x08, 0x40, 0x0f, 0x08, 0x01, 0x25, 0x08, 0x35, 0x25, 0x25, 0x08, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x26, 0x07, 0x40, 0x40, 0x46, 0x57, 0x66, 0x2f, 0x40, 0x07, 0x40, 0x40, 0x47, 0x0f, + 0x07, 0x26, 0x40, 0x17, 0x16, 0x26, 0x35, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x01, 0x08, 0x1f, 0x07, + 0x06, 0x27, 0x2e, 0x08, 0x40, 0x47, 0x4e, 0x40, 0x40, 0x40, 0x07, 0x07, 0x07, 0x0e, 0x0f, 0x0e, + 0x16, 0x1e, 0x07, 0x06, 0x06, 0x26, 0x07, 0x40, 0x06, 0x06, 0x26, 0x1e, 0x17, 0x26, 0x07, 0x0e, + 0x0f, 0x0e, 0x16, 0x1e, 0x07, 0x06, 0x06, 0x26, 0x07, 0x40, 0x06, 0x06, 0x26, 0x1e, 0x17, 0x26, + 0x27, 0x40, 0x3e, 0x40, 0x4f, 0x40, 0x07, 0x07, 0x07, 0x17, 0x17, 0x35, 0x0f, 0x10, 0x47, 0x40, + 0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x4f, + 0x07, 0x0f, 0x0f, 0x1f, 0x27, 0x1f, 0x27, 0x08, 0x17, 0x47, 0x40, 0x17, 0x47, 0x40, 0x40, 0x40, + 0x40, 0x01, 0x08, 0x08, 0x40, 0x0f, 0x08, 0x00, 0x00, 0x2f, 0x27, 0x1f, 0x07, 0x27, 0x1f, 0x1f, + 0x47, 0x11, 0x10, 0x08, 0x40, 0x0f, 0x08, 0x00, 0x26, 0x08, 0x36, 0x26, 0x26, 0x08, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x3e, 0x27, 0x07, 0x40, 0x40, 0x47, 0x57, 0x67, 0x2f, 0x40, 0x07, 0x40, 0x40, 0x47, 0x0f, + 0x07, 0x27, 0x40, 0x17, 0x17, 0x27, 0x37, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x00, 0x08, 0x1f, 0x07, + 0x07, 0x27, 0x2f, 0x08, 0x40, 0x47, 0x4f, 0x40, 0x40, 0x40, 0x07, 0x07, 0x07, 0x0f, 0x0f, 0x0f, + 0x17, 0x1f, 0x07, 0x07, 0x07, 0x27, 0x07, 0x40, 0x07, 0x07, 0x27, 0x1f, 0x17, 0x27, 0x07, 0x0f, + 0x0f, 0x0f, 0x17, 0x1f, 0x07, 0x07, 0x07, 0x27, 0x07, 0x40, 0x07, 0x07, 0x27, 0x1f, 0x17, 0x27, + 0x27, 0x40, 0x3e, 0x40, 0x4f, 0x40, 0x07, 0x07, 0x07, 0x17, 0x17, 0x37, 0x0f, 0x10, 0x47, 0x40, + 0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x4f, + 0x07, 0x0f, 0x0f, 0x1f, 0x27, 0x1f, 0x27, 0x08, 0x17, 0x47, 0x40, 0x17, 0x47, 0x40, 0x40, 0x40, + 0x40, 0x00, 0x08, 0x08, 0x40, 0x0f, 0x08, 0x00, 0x00, 0x2f, 0x27, 0x1f, 0x07, 0x27, 0x1f, 0x1f, + 0x47, 0x10, 0x10, 0x08, 0x40, 0x0f, 0x08, 0x00, 0x27, 0x08, 0x37, 0x27, 0x27, 0x08, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +///<- zrh add end +#endif diff --git a/mpp/hal/rkdec/h265d/hal_h265d_reg.c b/mpp/hal/rkdec/h265d/hal_h265d_reg.c new file mode 100644 index 00000000..65d4c43a --- /dev/null +++ b/mpp/hal/rkdec/h265d/hal_h265d_reg.c @@ -0,0 +1,1469 @@ +/* + * + * Copyright 2010 Rockchip Electronics Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * @file hal_h265d_reg.c + * @brief + * @author csy(csy@rock-chips.com) + + * @version 1.0.0 + * @history + * 2015.7.15 : Create + */ + +#define MODULE_TAG "H265HAL" +#include "hal_h265d_reg.h" +#include "mpp_buffer.h" +#include +#include +#include "h265d_syntax.h" +#include "mpp_log.h" +#include "mpp_err.h" +#include "cabac.h" +#include "mpp_mem.h" +#include "mpp_bitread.h" +#include "mpp_dec.h" +#include "vpu.h" +#include "mpp_buffer.h" + +#ifdef dump +FILE *fp = NULL; +#endif + +RK_U32 h265h_debug = 0; +typedef struct h265d_reg_context { + RK_S32 vpu_socket; + MppBufSlots slots; + MppBufferGroup group; + MppBuffer cabac_table_data; + MppBuffer scaling_list_data; + MppBuffer pps_data; + MppBuffer rps_data; + void* hw_regs; +} h265d_reg_context_t; + +typedef struct ScalingList { + /* This is a little wasteful, since sizeID 0 only needs 8 coeffs, + * and size ID 3 only has 2 arrays, not 6. */ + RK_U8 sl[4][6][64]; + RK_U8 sl_dc[2][6]; +} scalingList_t; + +typedef struct ScalingFactor_Model { + RK_U8 scalingfactor0[1248]; + RK_U8 scalingfactor1[96]; /*4X4 TU Rotate, total 16X4*/ + RK_U8 scalingdc[12]; /*N1005 Vienna Meeting*/ + RK_U8 reserverd[4]; /*16Bytes align*/ +} scalingFactor_t; + +static RK_U8 hal_hevc_diag_scan4x4_x[16] = { + 0, 0, 1, 0, + 1, 2, 0, 1, + 2, 3, 1, 2, + 3, 2, 3, 3, +}; + +static RK_U8 hal_hevc_diag_scan4x4_y[16] = { + 0, 1, 0, 2, + 1, 0, 3, 2, + 1, 0, 3, 2, + 1, 3, 2, 3, +}; + +static RK_U8 hal_hevc_diag_scan8x8_x[64] = { + 0, 0, 1, 0, + 1, 2, 0, 1, + 2, 3, 0, 1, + 2, 3, 4, 0, + 1, 2, 3, 4, + 5, 0, 1, 2, + 3, 4, 5, 6, + 0, 1, 2, 3, + 4, 5, 6, 7, + 1, 2, 3, 4, + 5, 6, 7, 2, + 3, 4, 5, 6, + 7, 3, 4, 5, + 6, 7, 4, 5, + 6, 7, 5, 6, + 7, 6, 7, 7, +}; + +static RK_U8 hal_hevc_diag_scan8x8_y[64] = { + 0, 1, 0, 2, + 1, 0, 3, 2, + 1, 0, 4, 3, + 2, 1, 0, 5, + 4, 3, 2, 1, + 0, 6, 5, 4, + 3, 2, 1, 0, + 7, 6, 5, 4, + 3, 2, 1, 0, + 7, 6, 5, 4, + 3, 2, 1, 7, + 6, 5, 4, 3, + 2, 7, 6, 5, + 4, 3, 7, 6, + 5, 4, 7, 6, + 5, 7, 6, 7, +}; + +typedef struct slice_ref_map { + RK_U8 dbp_index; + RK_U8 is_long_term; +} slice_ref_map_t; + +#define SCALING_LIST_SIZE 81 * 1360 +#define PPS_SIZE 80 * 64 +#define RPS_SIZE 600 * 32 +#define SCALING_LIST_SIZE_NUM 4 + +#define IS_IDR(nal_type) (nal_type == 19 || nal_type == 20) +#define IS_BLA(nal_type) (nal_type == 17 || nal_type == 16 || \ + nal_type == 18) + +#define IS_IRAP(nal_type) (nal_type >= 16 && nal_type <= 23) + +#define L0 0 +#define L1 1 +#define MAX_REFS 16 + +enum RPSType { + ST_CURR_BEF = 0, + ST_CURR_AFT, + ST_FOLL, + LT_CURR, + LT_FOLL, + NB_RPS_TYPE, +}; + +enum SliceType { + B_SLICE = 0, + P_SLICE = 1, + I_SLICE = 2, +}; + +typedef struct ShortTermRPS { + RK_U32 num_negative_pics; + RK_S32 num_delta_pocs; + RK_S32 delta_poc[32]; + RK_U8 used[32]; +} ShortTermRPS; + +typedef struct LongTermRPS { + RK_S32 poc[32]; + RK_U8 used[32]; + RK_U8 nb_refs; +} LongTermRPS; + +typedef struct RefPicList { + RK_U32 dpb_index[MAX_REFS]; + RK_U32 nb_refs; +} RefPicList_t; + +typedef struct RefPicListTab { + RefPicList_t refPicList[2]; +} RefPicListTab_t; + + +typedef struct SliceHeader { + RK_U32 pps_id; + + ///< address (in raster order) of the first block in the current slice segment + RK_U32 slice_segment_addr; + ///< address (in raster order) of the first block in the current slice + RK_U32 slice_addr; + + enum SliceType slice_type; + + RK_S32 pic_order_cnt_lsb; + + RK_U8 first_slice_in_pic_flag; + RK_U8 dependent_slice_segment_flag; + RK_U8 pic_output_flag; + RK_U8 colour_plane_id; + + ///< RPS coded in the slice header itself is stored here + ShortTermRPS slice_rps; + const ShortTermRPS *short_term_rps; + LongTermRPS long_term_rps; + RK_U32 list_entry_lx[2][32]; + + RK_U8 rpl_modification_flag[2]; + RK_U8 no_output_of_prior_pics_flag; + RK_U8 slice_temporal_mvp_enabled_flag; + + RK_U32 nb_refs[2]; + + RK_U8 slice_sample_adaptive_offset_flag[3]; + RK_U8 mvd_l1_zero_flag; + + RK_U8 cabac_init_flag; + RK_U8 disable_deblocking_filter_flag; ///< slice_header_disable_deblocking_filter_flag + RK_U8 slice_loop_filter_across_slices_enabled_flag; + RK_U8 collocated_list; + + RK_U32 collocated_ref_idx; + + RK_S32 slice_qp_delta; + RK_S32 slice_cb_qp_offset; + RK_S32 slice_cr_qp_offset; + + RK_S32 beta_offset; ///< beta_offset_div2 * 2 + RK_S32 tc_offset; ///< tc_offset_div2 * 2 + + RK_U32 max_num_merge_cand; ///< 5 - 5_minus_max_num_merge_cand + + RK_S32 *entry_point_offset; + RK_S32 * offset; + RK_S32 * size; + RK_S32 num_entry_point_offsets; + + RK_S8 slice_qp; + + RK_U8 luma_log2_weight_denom; + RK_S16 chroma_log2_weight_denom; + + RK_S32 slice_ctb_addr_rs; +} SliceHeader_t; + + +RK_S32 hal_h265d_init(void *hal, MppHalCfg *cfg) +{ + + RK_S32 ret = 0; + h265d_reg_context_t *reg_cxt = (h265d_reg_context_t *)hal; + + if (NULL == reg_cxt) { + mpp_err("hal instan no alloc"); + return MPP_ERR_UNKNOW; + } + + reg_cxt->slots = cfg->slots; + + ///<- VPUClientInit +#ifdef ANDROID + if (reg_cxt->vpu_socket <= 0) { + reg_cxt->vpu_socket = VPUClientInit(VPU_DEC_HEVC); + if (reg_cxt->vpu_socket <= 0) { + mpp_err("reg_cxt->vpu_socket <= 0\n"); + return MPP_ERR_UNKNOW; + } + } +#endif + if (reg_cxt->group == NULL) { + +#ifdef ANDROID + mpp_err("mpp_buffer_group_normal_get used ion in"); + ret = mpp_buffer_group_normal_get(®_cxt->group, MPP_BUFFER_TYPE_ION); +#else + ret = mpp_buffer_group_normal_get(®_cxt->group, MPP_BUFFER_TYPE_NORMAL); +#endif + if (MPP_OK != ret) { + mpp_err("h265d mpp_buffer_group_get failed\n"); + return ret; + } + } + reg_cxt->hw_regs = mpp_calloc(void, sizeof(REGS_t)); + + ret = mpp_buffer_get(reg_cxt->group, ®_cxt->cabac_table_data, sizeof(cabac_table)); + if (MPP_OK != ret) { + mpp_err("h265d cabac_table get buffer failed\n"); + return ret; + } + ret = mpp_buffer_write(reg_cxt->cabac_table_data, 0, (void*)cabac_table, sizeof(cabac_table)); + if (MPP_OK != ret) { + mpp_err("h265d write cabac_table data failed\n"); + return ret; + } + + ret = mpp_buffer_get(reg_cxt->group, ®_cxt->scaling_list_data, SCALING_LIST_SIZE); + if (MPP_OK != ret) { + mpp_err("h265d scaling_list_data get buffer failed\n"); + return ret; + } + + ret = mpp_buffer_get(reg_cxt->group, ®_cxt->pps_data, PPS_SIZE); + if (MPP_OK != ret) { + mpp_err("h265d pps_data get buffer failed\n"); + return ret; + } + + ret = mpp_buffer_get(reg_cxt->group, ®_cxt->rps_data, RPS_SIZE); + if (MPP_OK != ret) { + mpp_err("h265d rps_data get buffer failed\n"); + return ret; + } + + + +#ifdef dump + fp = fopen("/data/hal.bin", "wb"); +#endif + return MPP_OK; +} + +RK_S32 hal_h265d_deinit(void *hal) +{ + + RK_S32 ret = 0; + h265d_reg_context_t *reg_cxt = ( h265d_reg_context_t *)hal; + + ///<- VPUClientInit +#ifdef ANDROID + if (reg_cxt->vpu_socket >= 0) { + VPUClientRelease(reg_cxt->vpu_socket); + + } +#endif + + ret = mpp_buffer_put(reg_cxt->cabac_table_data); + if (MPP_OK != ret) { + mpp_err("h265d cabac_table free buffer failed\n"); + return ret; + } + + + ret = mpp_buffer_put(reg_cxt->scaling_list_data); + if (MPP_OK != ret) { + mpp_err("h265d scaling_list_data free buffer failed\n"); + return ret; + } + + ret = mpp_buffer_put(reg_cxt->pps_data); + if (MPP_OK != ret) { + mpp_err("h265d pps_data free buffer failed\n"); + return ret; + } + + ret = mpp_buffer_put(reg_cxt->rps_data); + if (MPP_OK != ret) { + mpp_err("h265d rps_data free buffer failed\n"); + return ret; + } + + if (reg_cxt->group) { + ret = mpp_buffer_group_put(reg_cxt->group); + if (MPP_OK != ret) { + mpp_err("h265d group free buffer failed\n"); + return ret; + } + } + + if (reg_cxt->hw_regs) { + mpp_free(reg_cxt->hw_regs); + reg_cxt->hw_regs = NULL; + } + return MPP_OK; +} +static RK_S32 _count = 0; + +static RK_U64 mpp_get_bits(RK_U64 src, RK_S32 size, RK_S32 offset) +{ + RK_U64 temp = 0; + mpp_assert(size + offset <= 64);// 64 is the FIFO_BIT_WIDTH + RK_S32 i; + for (i = 0; i < size ; i++) { + temp <<= 1; + temp |= 1; + } + temp &= (src >> offset); + temp <<= offset; + return temp; +} + +static void mpp_put_bits(RK_U64 data, RK_S32 size, RK_U64* Dec_Fifo, RK_S32 *p_fifo_index, RK_S32 *p_bit_offset, RK_S32 *p_bit_len, RK_S32 fifo_len) +{ + h265h_dbg(H265H_DBG_RPS , "_count = %d value = %d", _count++, (RK_U32)data); + if (*p_fifo_index >= fifo_len) return; + if (size + *p_bit_offset >= 64) { // 64 is the FIFO_BIT_WIDTH + RK_S32 len = 64 - *p_bit_offset; + Dec_Fifo[*p_fifo_index] = (mpp_get_bits(data, len, 0) << *p_bit_offset) | mpp_get_bits(Dec_Fifo[*p_fifo_index], *p_bit_offset, 0); + (*p_fifo_index)++; + if (*p_fifo_index > fifo_len) p_fifo_index = 0; + + Dec_Fifo[*p_fifo_index] = (mpp_get_bits(data, size - len, len) >> len); + *p_bit_offset = size + *p_bit_offset - 64; // 64 is the FIFO_BIT_WIDTH + + } else { + Dec_Fifo[*p_fifo_index] = ((data << (64 - size)) >> (64 - size - *p_bit_offset)) | mpp_get_bits(Dec_Fifo[*p_fifo_index], *p_bit_offset, 0); + (*p_bit_offset) += size; + } + (*p_bit_len) += size; +} + +static void mpp_align(RK_S32 align_width, RK_U64* Dec_Fifo, RK_S32 *p_fifo_index, RK_S32 *p_bit_offset, RK_S32 *p_bit_len, RK_S32 fifo_len) +{ + if (*p_fifo_index >= fifo_len) return; + RK_U64 temp = 0; + RK_S32 i; + for (i = 0; i < align_width; i++) { + temp <<= 1; + temp |= 1; + } + RK_S32 len = (align_width - ((*p_bit_offset) % align_width )) % align_width ; + + while (len > 0) { + if (len >= 8) { + mpp_put_bits((0xffffffffffffffff << (64 - 8)) >> (64 - 8), 8, + Dec_Fifo, p_fifo_index, p_bit_offset, p_bit_len, fifo_len); + len -= 8; + } else { + mpp_put_bits((0xffffffffffffffff << (64 - len)) >> (64 - len), len, + Dec_Fifo, p_fifo_index, p_bit_offset, p_bit_len, fifo_len); + len -= len; + } + } +} + +static void hal_record_scaling_list(scalingFactor_t *pScalingFactor_out, scalingList_t *pScalingList) +{ + RK_U32 g_scalingListNum_model[SCALING_LIST_SIZE_NUM] = {6, 6, 6, 2}; // from C Model + RK_U32 nIndex = 0; + RK_U32 sizeId, matrixId, listId, i; + RK_U8 *p = pScalingFactor_out->scalingfactor0; + RK_U8 tmpBuf[8 * 8]; + + //output non-default scalingFactor Table (1248 BYTES) + for (sizeId = 0; sizeId < SCALING_LIST_SIZE_NUM; sizeId++) { + for (listId = 0; listId < g_scalingListNum_model[sizeId]; listId++) { + if (sizeId < 3) { + for (i = 0; i < (sizeId == 0 ? 16 : 64); i++) { + pScalingFactor_out->scalingfactor0[nIndex++] = (RK_U8)pScalingList->sl[sizeId][listId][i]; + } + } else { + for (i = 0; i < 64; i ++) { + pScalingFactor_out->scalingfactor0[nIndex++] = (RK_U8)pScalingList->sl[sizeId][listId][i]; + } + for (i = 0; i < 128; i ++) { + pScalingFactor_out->scalingfactor0[nIndex++] = 0; + } + } + } + } + //output non-default scalingFactor Table Rotation(96 Bytes) + nIndex = 0; + for (listId = 0; listId < g_scalingListNum_model[0]; listId++) { + RK_U8 temp16[16] = {0}; + for (i = 0; i < 16; i ++) { + temp16[i] = (RK_U8)pScalingList->sl[0][listId][i]; + } + for (i = 0; i < 4; i ++) { + pScalingFactor_out->scalingfactor1[nIndex++] = temp16[i]; + pScalingFactor_out->scalingfactor1[nIndex++] = temp16[i + 4]; + pScalingFactor_out->scalingfactor1[nIndex++] = temp16[i + 8]; + pScalingFactor_out->scalingfactor1[nIndex++] = temp16[i + 12]; + } + } + //output non-default ScalingList_DC_Coeff (12 BYTES) + nIndex = 0; + for (listId = 0; listId < g_scalingListNum_model[2]; listId++) { //sizeId = 2 + pScalingFactor_out->scalingdc[nIndex++] = (RK_U8)pScalingList->sl_dc[0][listId];// zrh warning: sl_dc differed from scalingList->getScalingListDC + } + for (listId = 0; listId < g_scalingListNum_model[3]; listId++) { //sizeId = 3 + pScalingFactor_out->scalingdc[nIndex++] = (RK_U8)pScalingList->sl_dc[1][listId];// zrh warning: sl_dc differed from scalingList->getScalingListDC + pScalingFactor_out->scalingdc[nIndex++] = 0; + pScalingFactor_out->scalingdc[nIndex++] = 0; + } + + //align 16X address + nIndex = 0; + for (i = 0; i < 4; i ++) { + pScalingFactor_out->reserverd[nIndex++] = 0; + } + + //----------------------All above code show the normal store way in HM-------------------------- + //--------from now on, the scalingfactor0 is rotated 90', the scalingfactor1 is also rotated 90' + + //sizeId == 0 + for (matrixId = 0; matrixId < 6; matrixId++) { + p = pScalingFactor_out->scalingfactor0 + matrixId * 16; + + for (i = 0; i < 4; i++) { + tmpBuf[4 * 0 + i] = p[i * 4 + 0]; + tmpBuf[4 * 1 + i] = p[i * 4 + 1]; + tmpBuf[4 * 2 + i] = p[i * 4 + 2]; + tmpBuf[4 * 3 + i] = p[i * 4 + 3]; + } + memcpy(p, tmpBuf, 4 * 4 * sizeof(RK_U8)); + } + //sizeId == 1 + for (matrixId = 0; matrixId < 6; matrixId++) { + p = pScalingFactor_out->scalingfactor0 + 6 * 16 + matrixId * 64; + + for (i = 0; i < 8; i++) { + tmpBuf[8 * 0 + i] = p[i * 8 + 0]; + tmpBuf[8 * 1 + i] = p[i * 8 + 1]; + tmpBuf[8 * 2 + i] = p[i * 8 + 2]; + tmpBuf[8 * 3 + i] = p[i * 8 + 3]; + tmpBuf[8 * 4 + i] = p[i * 8 + 4]; + tmpBuf[8 * 5 + i] = p[i * 8 + 5]; + tmpBuf[8 * 6 + i] = p[i * 8 + 6]; + tmpBuf[8 * 7 + i] = p[i * 8 + 7]; + } + memcpy(p, tmpBuf, 8 * 8 * sizeof(RK_U8)); + } + //sizeId == 2 + for (matrixId = 0; matrixId < 6; matrixId++) { + p = pScalingFactor_out->scalingfactor0 + 6 * 16 + 6 * 64 + matrixId * 64; + + for (i = 0; i < 8; i++) { + tmpBuf[8 * 0 + i] = p[i * 8 + 0]; + tmpBuf[8 * 1 + i] = p[i * 8 + 1]; + tmpBuf[8 * 2 + i] = p[i * 8 + 2]; + tmpBuf[8 * 3 + i] = p[i * 8 + 3]; + tmpBuf[8 * 4 + i] = p[i * 8 + 4]; + tmpBuf[8 * 5 + i] = p[i * 8 + 5]; + tmpBuf[8 * 6 + i] = p[i * 8 + 6]; + tmpBuf[8 * 7 + i] = p[i * 8 + 7]; + } + memcpy(p, tmpBuf, 8 * 8 * sizeof(RK_U8)); + } + //sizeId == 3 + for (matrixId = 0; matrixId < 6; matrixId++) { + p = pScalingFactor_out->scalingfactor0 + 6 * 16 + 6 * 64 + 6 * 64 + matrixId * 64; + + for (i = 0; i < 8; i++) { + tmpBuf[8 * 0 + i] = p[i * 8 + 0]; + tmpBuf[8 * 1 + i] = p[i * 8 + 1]; + tmpBuf[8 * 2 + i] = p[i * 8 + 2]; + tmpBuf[8 * 3 + i] = p[i * 8 + 3]; + tmpBuf[8 * 4 + i] = p[i * 8 + 4]; + tmpBuf[8 * 5 + i] = p[i * 8 + 5]; + tmpBuf[8 * 6 + i] = p[i * 8 + 6]; + tmpBuf[8 * 7 + i] = p[i * 8 + 7]; + } + memcpy(p, tmpBuf, 8 * 8 * sizeof(RK_U8)); + } + + //sizeId == 0 + for (matrixId = 0; matrixId < 6; matrixId++) { + p = pScalingFactor_out->scalingfactor1 + matrixId * 16; + + for (i = 0; i < 4; i++) { + tmpBuf[4 * 0 + i] = p[i * 4 + 0]; + tmpBuf[4 * 1 + i] = p[i * 4 + 1]; + tmpBuf[4 * 2 + i] = p[i * 4 + 2]; + tmpBuf[4 * 3 + i] = p[i * 4 + 3]; + } + memcpy(p, tmpBuf, 4 * 4 * sizeof(RK_U8)); + } +} + +static int hal_h265d_slice_rpl(void *dxva, SliceHeader_t *sh, RefPicListTab_t *ref) +{ + RK_U8 nb_list = sh->slice_type == B_SLICE ? 2 : 1; + RK_U8 list_idx; + RK_U32 i, j; + RK_U8 bef_nb_refs = 0, aft_nb_refs = 0, lt_cur_nb_refs = 0; + + memset(ref, 0, sizeof(RefPicListTab_t)); + + h265d_dxva2_picture_context_t *dxva_cxt = (h265d_dxva2_picture_context_t*)dxva; + + for (i = 0; i < 8; i++ ) { + if (dxva_cxt->pp.RefPicSetStCurrBefore[i] != 0xff) { + bef_nb_refs ++; + } + + if (dxva_cxt->pp.RefPicSetStCurrAfter[i] != 0xff) { + aft_nb_refs ++; + } + + if (dxva_cxt->pp.RefPicSetLtCurr[i] != 0xff) { + lt_cur_nb_refs ++; + } + } + + if (!(bef_nb_refs + aft_nb_refs + + lt_cur_nb_refs)) { + mpp_err( "Zero refs in the frame RPS.\n"); + return MPP_ERR_STREAM; + } + + for (list_idx = 0; list_idx < nb_list; list_idx++) { + RefPicList_t rpl_tmp; + RefPicList_t *rpl = &ref->refPicList[list_idx]; + memset(&rpl_tmp, 0, sizeof(RefPicList_t)); + + /* The order of the elements is + * ST_CURR_BEF - ST_CURR_AFT - LT_CURR for the L0 and + * ST_CURR_AFT - ST_CURR_BEF - LT_CURR for the L1 */ + RK_S32 cand_lists[3] = { list_idx ? ST_CURR_AFT : ST_CURR_BEF, + list_idx ? ST_CURR_BEF : ST_CURR_AFT, + LT_CURR + }; + + /* concatenate the candidate lists for the current frame */ + while ((RK_U32)rpl_tmp.nb_refs < sh->nb_refs[list_idx]) { + for (i = 0; i < MPP_ARRAY_ELEMS(cand_lists); i++) { + RK_U8 *rps = NULL; + RK_U32 nb_refs = 0; + if (cand_lists[i] == ST_CURR_BEF) { + rps = &dxva_cxt->pp.RefPicSetStCurrBefore[0]; + nb_refs = bef_nb_refs; + } else if (cand_lists[i] == ST_CURR_AFT) { + rps = &dxva_cxt->pp.RefPicSetStCurrAfter[0]; + nb_refs = aft_nb_refs; + } else { + rps = &dxva_cxt->pp.RefPicSetLtCurr[0]; + nb_refs = lt_cur_nb_refs; + } + for (j = 0; j < nb_refs && rpl_tmp.nb_refs < MAX_REFS; j++) { + rpl_tmp.dpb_index[rpl_tmp.nb_refs] = rps[j]; + rpl_tmp.nb_refs++; + } + } + } + + /* reorder the references if necessary */ + if (sh->rpl_modification_flag[list_idx]) { + for (i = 0; i < sh->nb_refs[list_idx]; i++) { + int idx = sh->list_entry_lx[list_idx][i]; + rpl->dpb_index[i] = rpl_tmp.dpb_index[idx]; + rpl->nb_refs++; + } + } else { + memcpy(rpl, &rpl_tmp, sizeof(*rpl)); + rpl->nb_refs = MPP_MIN((RK_U32)rpl->nb_refs, sh->nb_refs[list_idx]); + } + } + return 0; +} + +static RK_S32 hal_h265d_slice_output_rps(void *dxva, void *rps_buf) +{ + + RK_S32 i, j; + RK_U32 k; + RK_S32 value; + RK_U32 nal_type; + RK_S32 slice_idx = 0; + GetBitCxt_t gb_cxt, *gb; + SliceHeader_t sh; + RK_U8 rps_bit_offset[600]; + RK_U8 rps_bit_offset_st[600]; + RK_U8 slice_nb_rps_poc[600]; + RK_U8 lowdelay_flag[600]; + slice_ref_map_t rps_pic_info[600][2][15]; + RK_U32 nb_refs = 0; + + memset(&rps_pic_info, 0, sizeof(rps_pic_info)); + memset(&slice_nb_rps_poc, 0, sizeof(slice_nb_rps_poc)); + memset(&rps_bit_offset, 0, sizeof(rps_bit_offset)); + memset(&rps_bit_offset_st, 0, sizeof(rps_bit_offset_st)); + memset(&lowdelay_flag, 0, sizeof(lowdelay_flag)); + + h265d_dxva2_picture_context_t *dxva_cxt = (h265d_dxva2_picture_context_t*)dxva; + for (k = 0; k < dxva_cxt->slice_count; k++) { + RefPicListTab_t ref; + memset(&sh, 0, sizeof(SliceHeader_t)); + // mpp_err("data[%d]= 0x%x,size[%d] = %d \n", + // k,dxva_cxt->slice_short[k].BSNALunitDataLocation, k,dxva_cxt->slice_short[k].SliceBytesInBuffer); + mpp_Init_Bits(&gb_cxt, (RK_U8*)(dxva_cxt->bitstream + dxva_cxt->slice_short[k].BSNALunitDataLocation), + dxva_cxt->slice_short[k].SliceBytesInBuffer); + + gb = &gb_cxt; + + READ_BIT1(gb, &value); + + if ( value != 0) + return MPP_ERR_STREAM; + + READ_BITS(gb, 6, &nal_type); + + if (nal_type > 23) { + continue; + } + + READ_SKIPBITS(gb, 9); + + READ_BIT1(gb, &sh.first_slice_in_pic_flag); + + if (nal_type >= 16 && nal_type <= 23) + READ_BIT1(gb, &sh.no_output_of_prior_pics_flag); + + READ_UE(gb, &sh.pps_id); + + if (sh.pps_id >= 64 ) { + mpp_err( "PPS id out of range: %d\n", sh.pps_id); + return MPP_ERR_STREAM; + } + + sh.dependent_slice_segment_flag = 0; + if (!sh.first_slice_in_pic_flag) { + RK_S32 slice_address_length; + RK_S32 width, height, ctb_width, ctb_height; + RK_S32 log2_min_cb_size = dxva_cxt->pp.log2_min_luma_coding_block_size_minus3 + 3; + RK_S32 log2_ctb_size = log2_min_cb_size + dxva_cxt->pp.log2_diff_max_min_luma_coding_block_size; + + width = (dxva_cxt->pp.PicWidthInMinCbsY << log2_min_cb_size); + height = (dxva_cxt->pp.PicHeightInMinCbsY << log2_min_cb_size); + + ctb_width = (width + (1 << log2_ctb_size) - 1) >> log2_ctb_size; + ctb_height = (height + (1 << log2_ctb_size) - 1) >> log2_ctb_size; + + if (dxva_cxt->pp.dependent_slice_segments_enabled_flag) + READ_BIT1(gb, &sh.dependent_slice_segment_flag); + + slice_address_length = mpp_ceil_log2(ctb_width * ctb_height); + + READ_BITS(gb, slice_address_length, &sh.slice_segment_addr); + + if (sh.slice_segment_addr >= (RK_U32)(ctb_width * ctb_height)) { + mpp_err( + "Invalid slice segment address: %u.\n", + sh.slice_segment_addr); + return MPP_ERR_STREAM; + } + + if (!sh.dependent_slice_segment_flag) { + sh.slice_addr = sh.slice_segment_addr; + slice_idx++; + } + } else { + sh.slice_segment_addr = sh.slice_addr = 0; + slice_idx = 0; + } + + if (!sh.dependent_slice_segment_flag) { + for (i = 0; i < dxva_cxt->pp.num_extra_slice_header_bits; i++) + READ_SKIPBITS(gb, 1); + + READ_UE(gb, &sh.slice_type); + if (!(sh.slice_type == I_SLICE || + sh.slice_type == P_SLICE || + sh.slice_type == B_SLICE)) { + mpp_err( "Unknown slice type: %d.\n", + sh.slice_type); + return MPP_ERR_STREAM; + } + /* if (!s->decoder_id && IS_IRAP(nal_type) && sh->slice_type != I_SLICE) { + mpp_err( "Inter slices in an IRAP frame.\n"); + return MPP_ERR_STREAM; + }*/ + + if (dxva_cxt->pp.output_flag_present_flag) + READ_BIT1(gb, &sh.pic_output_flag); + + if (dxva_cxt->pp.separate_colour_plane_flag) + READ_BITS(gb, 2, &sh.colour_plane_id ); + + if (!IS_IDR(nal_type)) { + int short_term_ref_pic_set_sps_flag; + + READ_BITS(gb, (dxva_cxt->pp.log2_max_pic_order_cnt_lsb_minus4 + 4), &sh.pic_order_cnt_lsb); + + READ_BIT1(gb, &short_term_ref_pic_set_sps_flag); + + RK_S32 bit_begin = gb->UsedBits; + + if (!short_term_ref_pic_set_sps_flag) { + READ_SKIPBITS(gb, dxva_cxt->pp.wNumBitsForShortTermRPSInSlice); + } else { + RK_S32 numbits, rps_idx; + if (!dxva_cxt->pp.num_short_term_ref_pic_sets) { + mpp_err( "No ref lists in the SPS.\n"); + return MPP_ERR_STREAM; + } + numbits = mpp_ceil_log2(dxva_cxt->pp.num_short_term_ref_pic_sets); + rps_idx = 0; + if (numbits > 0) + READ_BITS(gb, numbits, &rps_idx); + } + + rps_bit_offset_st[slice_idx] = gb->UsedBits - bit_begin; + rps_bit_offset[slice_idx] = rps_bit_offset_st[slice_idx]; + if (dxva_cxt->pp.long_term_ref_pics_present_flag) { + +// RK_S32 max_poc_lsb = 1 << (dxva_cxt->pp.log2_max_pic_order_cnt_lsb_minus4 + 4); + RK_U32 nb_sps = 0, nb_sh; + + bit_begin = gb->UsedBits; + if (dxva_cxt->pp.num_long_term_ref_pics_sps > 0) + READ_UE(gb, &nb_sps); + + READ_UE(gb, &nb_sh); + + nb_refs = nb_sh + nb_sps; + + for (i = 0; i < (RK_S32)nb_refs; i++) { + RK_U8 delta_poc_msb_present; + + if ((RK_U32)i < nb_sps) { + RK_U8 lt_idx_sps = 0; + + if (dxva_cxt->pp.num_long_term_ref_pics_sps > 1) + READ_BITS(gb, mpp_ceil_log2(dxva_cxt->pp.num_long_term_ref_pics_sps), <_idx_sps); + } else { + READ_SKIPBITS(gb, (dxva_cxt->pp.log2_max_pic_order_cnt_lsb_minus4 + 4)); + READ_SKIPBITS(gb, 1); + } + + READ_BIT1(gb, &delta_poc_msb_present); + if (delta_poc_msb_present) { + RK_S32 delta = 0; + READ_UE(gb, &delta); + } + } + rps_bit_offset[slice_idx] += (gb->UsedBits - bit_begin); + + } + + if (dxva_cxt->pp.sps_temporal_mvp_enabled_flag) + READ_BIT1(gb, &sh.slice_temporal_mvp_enabled_flag); + else + sh.slice_temporal_mvp_enabled_flag = 0; + } else { + sh.short_term_rps = NULL; + } + + if (dxva_cxt->pp.sample_adaptive_offset_enabled_flag) { + READ_BIT1(gb, &sh.slice_sample_adaptive_offset_flag[0]); + READ_BIT1(gb, &sh.slice_sample_adaptive_offset_flag[1]); + sh.slice_sample_adaptive_offset_flag[2] = + sh.slice_sample_adaptive_offset_flag[1]; + } else { + sh.slice_sample_adaptive_offset_flag[0] = 0; + sh.slice_sample_adaptive_offset_flag[1] = 0; + sh.slice_sample_adaptive_offset_flag[2] = 0; + } + + sh.nb_refs[L0] = sh.nb_refs[L1] = 0; + if (sh.slice_type == P_SLICE || sh.slice_type == B_SLICE) { + + sh.nb_refs[L0] = dxva_cxt->pp.num_ref_idx_l0_default_active_minus1 + 1; + if (sh.slice_type == B_SLICE) + sh.nb_refs[L1] = dxva_cxt->pp.num_ref_idx_l1_default_active_minus1 + 1; + + READ_BIT1(gb, &value); + + if (value) { // num_ref_idx_active_override_flag + READ_UE(gb, &sh.nb_refs[L0]); + sh.nb_refs[L0] += 1; + if (sh.slice_type == B_SLICE) { + READ_UE(gb, &sh.nb_refs[L1]); + sh.nb_refs[L1] += 1; + } + } + if (sh.nb_refs[L0] > MAX_REFS || sh.nb_refs[L1] > MAX_REFS) { + mpp_err( "Too many refs: %d/%d.\n", + sh.nb_refs[L0], sh.nb_refs[L1]); + return MPP_ERR_STREAM; + } + + sh.rpl_modification_flag[0] = 0; + sh.rpl_modification_flag[1] = 0; + nb_refs = 0; + for (i = 0; i < (RK_S32)MPP_ARRAY_ELEMS(dxva_cxt->pp.RefPicList); i++) { + if (dxva_cxt->pp.RefPicList[i].bPicEntry != 0xff) { + h265h_dbg(H265H_DBG_RPS, "dxva_cxt->pp.RefPicList[i].bPicEntry = %d", dxva_cxt->pp.RefPicList[i].bPicEntry); + nb_refs++; + } + } + + if (!nb_refs) { + mpp_err( "Zero refs for a frame with P or B slices.\n"); + return MPP_ERR_STREAM; + } + + if (dxva_cxt->pp.lists_modification_present_flag && nb_refs > 1) { + READ_BIT1(gb, &sh.rpl_modification_flag[0]); + if (sh.rpl_modification_flag[0]) { + for (i = 0; (RK_U32)i < sh.nb_refs[L0]; i++) + READ_BITS(gb, mpp_ceil_log2(nb_refs), &sh.list_entry_lx[0][i]); + } + + if (sh.slice_type == B_SLICE) { + READ_BIT1(gb, &sh.rpl_modification_flag[1]); + if (sh.rpl_modification_flag[1] == 1) + for (i = 0; (RK_U32)i < sh.nb_refs[L1]; i++) + READ_BITS(gb, mpp_ceil_log2(nb_refs), &sh.list_entry_lx[1][i]); + } + } + } + } + + if (!sh.dependent_slice_segment_flag && + sh.slice_type != I_SLICE) { + hal_h265d_slice_rpl(dxva, &sh, &ref); + lowdelay_flag[slice_idx] = 1; + if (ref.refPicList) { + RK_U32 nb_list = I_SLICE - sh.slice_type; + for (j = 0; j < (RK_S32)nb_list; j++) { + for (i = 0; i < (RK_S32)ref.refPicList[j].nb_refs; i++) { + RK_U8 index = 0; + index = ref.refPicList[j].dpb_index[i]; + // mpp_err("slice_idx = %d index = %d,j = %d i = %d",slice_idx,index,j,i); + if (index != 0xff) { + rps_pic_info[slice_idx][j][i].dbp_index = index; + rps_pic_info[slice_idx][j][i].is_long_term + = dxva_cxt->pp.RefPicList[index].AssociatedFlag; + if (dxva_cxt->pp.PicOrderCntValList[index] > dxva_cxt->pp.CurrPicOrderCntVal) + lowdelay_flag[slice_idx] = 0; + } + } + } + } + if (sh.slice_type == I_SLICE) + slice_nb_rps_poc[slice_idx] = 0; + else + slice_nb_rps_poc[slice_idx] = nb_refs; + + } + } +//out put for rk format + { + RK_S32 nb_slice = slice_idx + 1; + RK_S32 fifo_index = 0; + RK_S32 bit_offset = 0; + RK_S32 fifo_len = nb_slice * 4;//size of rps_packet + RK_S32 bit_len = 0; + + RK_U64 rps_packet[fifo_len]; + for (k = 0; k < (RK_U32)nb_slice; k++) { + for (j = 0; j < 2; j++) { + for (i = 0; i < 15; i++) { + mpp_put_bits(rps_pic_info[k][j][i].is_long_term, 1, + rps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + if (j == 1 && i == 4) { + mpp_align (64, + rps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + } + mpp_put_bits(rps_pic_info[k][j][i].dbp_index, 4, + rps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + } + } + mpp_put_bits(lowdelay_flag [k], 1, + rps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + h265h_dbg(H265H_DBG_RPS, "lowdelay_flag = %d \n", lowdelay_flag[k]); + mpp_put_bits(rps_bit_offset [k], 10, + rps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + h265h_dbg(H265H_DBG_RPS, "rps_bit_offset = %d \n", rps_bit_offset[k]); + mpp_put_bits(rps_bit_offset_st [k], 9, + rps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + h265h_dbg(H265H_DBG_RPS, "rps_bit_offset_st = %d \n", rps_bit_offset_st[k]); + mpp_put_bits(slice_nb_rps_poc [k], 4, + rps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + h265h_dbg(H265H_DBG_RPS, "slice_nb_rps_poc = %d \n", slice_nb_rps_poc[k]); + mpp_align (64, + rps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + } + if (rps_buf != NULL) { + memcpy(rps_buf, rps_packet, nb_slice * 32); + } + } + return 0; +} + +static void hal_h265d_output_scalinglist_packet(void *ptr, void *dxva) +{ + scalingList_t sl; + RK_U32 i, j, pos; + h265d_dxva2_picture_context_t *dxva_cxt = (h265d_dxva2_picture_context_t*)dxva; + memset(&sl, 0, sizeof(scalingList_t)); + for (i = 0; i < 6; i++) { + for (j = 0; j < 16; j++) { + pos = 4 * hal_hevc_diag_scan4x4_y[j] + hal_hevc_diag_scan4x4_x[j]; + sl.sl[0][i][pos] = dxva_cxt->qm.ucScalingLists0[i][j]; + } + + for (j = 0; j < 64; j++) { + pos = 8 * hal_hevc_diag_scan8x8_y[j] + hal_hevc_diag_scan8x8_x[j]; + sl.sl[1][i][pos] = dxva_cxt->qm.ucScalingLists1[i][j]; + sl.sl[2][i][pos] = dxva_cxt->qm.ucScalingLists2[i][j]; + + if (i < 2) + sl.sl[3][i * 3][pos] = dxva_cxt->qm.ucScalingLists3[i][j]; + } + + sl.sl_dc[0][i] = dxva_cxt->qm.ucScalingListDCCoefSizeID2[i]; + if (i < 2) + sl.sl_dc[1][i * 3] = dxva_cxt->qm.ucScalingListDCCoefSizeID3[i]; + } + hal_record_scaling_list((scalingFactor_t *)ptr, &sl); +} + + +RK_S32 hal_h265d_output_pps_packet(void *hal, void *dxva) +{ + + RK_S32 fifo_index = 0; + RK_S32 bit_offset = 0; + RK_S32 fifo_len = 10; + RK_S32 bit_len = 0; + RK_S32 i, j; + RK_U32 addr; + + _count = 0; + + h265d_reg_context_t *reg_cxt = ( h265d_reg_context_t *)hal; + h265d_dxva2_picture_context_t *dxva_cxt = (h265d_dxva2_picture_context_t*)dxva; + + if (NULL == reg_cxt || dxva_cxt == NULL) { + + mpp_err("%s:%s:%d reg_cxt or dxva_cxt is NULL", __FILE__, __func__, __LINE__); + return MPP_ERR_NULL_PTR; + } +#ifdef ANDROID + void *pps_ptr = mpp_buffer_get_ptr(reg_cxt->pps_data); + if (NULL == pps_ptr) { + + mpp_err("pps_data get ptr error"); + return MPP_ERR_NOMEM; + } + memset(pps_ptr, 0, 80 * 64); + RK_U64* pps_packet = (RK_U64 *)(pps_ptr + dxva_cxt->pp.pps_id * 80); +#else + RK_U64 pps_packet[fifo_len]; +#endif + + + for (i = 0; i < 10; i++) pps_packet[i] = 0; + + // SPS + mpp_put_bits(dxva_cxt->pp.vps_id, 4, pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.sps_id, 4, pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.chroma_format_idc, 2, pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + RK_U32 log2_min_cb_size = dxva_cxt->pp.log2_min_luma_coding_block_size_minus3 + 3; + RK_S32 width = (dxva_cxt->pp.PicWidthInMinCbsY << log2_min_cb_size); + RK_S32 height = (dxva_cxt->pp.PicHeightInMinCbsY << log2_min_cb_size); + + mpp_put_bits(width , 13, pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(height , 13, pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.bit_depth_luma_minus8 + 8 , 4 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.bit_depth_chroma_minus8 + 8 , 4 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.log2_max_pic_order_cnt_lsb_minus4 + 4, 5 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.log2_diff_max_min_luma_coding_block_size, 2 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); //log2_maxa_coding_block_depth + mpp_put_bits(dxva_cxt->pp.log2_min_luma_coding_block_size_minus3 + 3, 3 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.log2_min_transform_block_size_minus2 + 2, 3 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + ///<-zrh comment ^ 57 bit above + mpp_put_bits(dxva_cxt->pp.log2_diff_max_min_transform_block_size, 2 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.max_transform_hierarchy_depth_inter , 3 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.max_transform_hierarchy_depth_intra , 3 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.scaling_list_enabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.amp_enabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.sample_adaptive_offset_enabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + ///<-zrh comment ^ 68 bit above + mpp_put_bits(dxva_cxt->pp.pcm_enabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.pcm_enabled_flag ? (dxva_cxt->pp.pcm_sample_bit_depth_luma_minus1 + 1) : 0, + 4 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.pcm_enabled_flag ? (dxva_cxt->pp.pcm_sample_bit_depth_chroma_minus1 + 1) : 0, + 4 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.pcm_loop_filter_disabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.log2_diff_max_min_pcm_luma_coding_block_size , 3 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.pcm_enabled_flag ? (dxva_cxt->pp.log2_min_pcm_luma_coding_block_size_minus3 + 3) : 0, + 3 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.num_short_term_ref_pic_sets , 7 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.long_term_ref_pics_present_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.num_long_term_ref_pics_sps , 6 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.sps_temporal_mvp_enabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.strong_intra_smoothing_enabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + ///<-zrh comment ^ 100 bit above + + mpp_put_bits(0 , 7 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_align( 32, pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + // PPS + mpp_put_bits(dxva_cxt->pp.pps_id , 6 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.sps_id , 4 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.dependent_slice_segments_enabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.output_flag_present_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.num_extra_slice_header_bits , 13, pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.sign_data_hiding_enabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.cabac_init_present_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.num_ref_idx_l0_default_active_minus1 + 1 , 4 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.num_ref_idx_l1_default_active_minus1 + 1 , 4 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.init_qp_minus26 , 7 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.constrained_intra_pred_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.transform_skip_enabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.cu_qp_delta_enabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(log2_min_cb_size + + dxva_cxt->pp.log2_diff_max_min_luma_coding_block_size - + dxva_cxt->pp.diff_cu_qp_delta_depth , 3 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + h265h_dbg(H265H_DBG_PPS, "log2_min_cb_size %d %d %d \n", log2_min_cb_size, + dxva_cxt->pp.log2_diff_max_min_luma_coding_block_size, dxva_cxt->pp.diff_cu_qp_delta_depth ); + mpp_put_bits(dxva_cxt->pp.pps_cb_qp_offset , 5 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.pps_cr_qp_offset , 5 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.pps_slice_chroma_qp_offsets_present_flag + , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.weighted_pred_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.weighted_bipred_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.transquant_bypass_enabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.tiles_enabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.entropy_coding_sync_enabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.pps_loop_filter_across_slices_enabled_flag, 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.loop_filter_across_tiles_enabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + mpp_put_bits(dxva_cxt->pp.deblocking_filter_override_enabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.pps_deblocking_filter_disabled_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.pps_beta_offset_div2 , 4 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.pps_tc_offset_div2 , 4 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.lists_modification_present_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.log2_parallel_merge_level_minus2 + 2 , 3 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.slice_segment_header_extension_present_flag , 1 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(0 , 3 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.num_tile_columns_minus1 + 1 , 5 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(dxva_cxt->pp.num_tile_rows_minus1 + 1 , 5 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + mpp_put_bits(3 , 2 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); //mSps_Pps[i]->mMode + mpp_align( 64, pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + { + /// tiles info begin + unsigned char column_width[20]; + unsigned char row_height[22]; + + memset(column_width, 0, 20); + memset(row_height, 0, 22); + + if (dxva_cxt->pp.tiles_enabled_flag) { + if (dxva_cxt->pp.uniform_spacing_flag == 0) { + RK_S32 ctu_width_in_pic = dxva_cxt->pp.PicWidthInMinCbsY; + RK_S32 ctu_height_in_pic = dxva_cxt->pp.PicHeightInMinCbsY; + RK_S32 sum = 0; + for (i = 0; i < dxva_cxt->pp.num_tile_columns_minus1; i++) { + column_width[i] = dxva_cxt->pp.column_width_minus1[i] + 1; + sum += column_width[i] ; + } + column_width[i] = ctu_width_in_pic - sum; + + sum = 0; + for (i = 0; i < dxva_cxt->pp.num_tile_rows_minus1; i++) { + row_height[i] = dxva_cxt->pp.row_height_minus1[i] + 1; + sum += row_height[i]; + } + row_height[i] = ctu_height_in_pic - sum; + } // end of (pps->uniform_spacing_flag == 0) + else { + RK_S32 pic_in_cts_width = dxva_cxt->pp.PicWidthInMinCbsY; + RK_S32 pic_in_cts_height = dxva_cxt->pp.PicHeightInMinCbsY; + + + for (i = 0; i < dxva_cxt->pp.num_tile_columns_minus1; i++) + column_width[i] = ((i + 1) * pic_in_cts_width) / (dxva_cxt->pp.num_tile_columns_minus1 + 1) - + (i * pic_in_cts_width) / (dxva_cxt->pp.num_tile_columns_minus1 + 1); + + for (i = 0; i < dxva_cxt->pp.num_tile_rows_minus1; i++) + row_height[i] = ((i + 1) * pic_in_cts_height) / (dxva_cxt->pp.num_tile_rows_minus1 + 1) - + (i * pic_in_cts_height) / (dxva_cxt->pp.num_tile_rows_minus1 + 1); + } + } // pps->tiles_enabled_flag + else { + RK_S32 MaxCUWidth = (1 << (dxva_cxt->pp.log2_diff_max_min_luma_coding_block_size + log2_min_cb_size)); + column_width[0] = (width + MaxCUWidth - 1) / MaxCUWidth; + row_height[0] = (height + MaxCUWidth - 1) / MaxCUWidth; + } + + for (j = 0; j < 20; j++) { + if (column_width[j] > 0) + column_width[j]--; + mpp_put_bits(column_width[j] , 8 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + } + + for (j = 0; j < 22; j++) { + if (row_height[j] > 0) + row_height[j]--; + mpp_put_bits(row_height[j] , 8 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + } + } + + { + + void *ptr_scaling = mpp_buffer_get_ptr(reg_cxt->scaling_list_data); + if (dxva_cxt->pp.scaling_list_data_present_flag) { + addr = (dxva_cxt->pp.pps_id + 16) * 1360; + } else if (dxva_cxt->pp.scaling_list_enabled_flag) { + addr = dxva_cxt->pp.sps_id * 1360; + } else { + addr = 80 * 1360; + } + + hal_h265d_output_scalinglist_packet(ptr_scaling + addr, dxva); + +#ifdef ANDROID + RK_U32 fd = mpp_buffer_get_fd(reg_cxt->scaling_list_data); + /* need to config addr */ + if (1) { //VPUMemJudgeIommu()) { + addr = fd | (addr << 10); + } else { + addr += fd; + } +#endif + + mpp_put_bits(0 , 32 , pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + + unsigned char *p0, *p1; + p0 = (unsigned char*)&pps_packet[9]; + p1 = (unsigned char*)&addr; + p0[2] = p1[0]; + p0[3] = p1[1]; + p0[4] = p1[2]; + p0[5] = p1[3]; + + mpp_align( 64, pps_packet, &fifo_index, &bit_offset, &bit_len, fifo_len); + } + +#ifdef dump + fwrite(pps_ptr, 1, 80 * 64, fp); + fflush(fp); +#endif + return 0; +} + +RK_S32 hal_h265d_gen_regs(void *hal, HalTask *syn) +{ + REGS_t *hw_regs; + RK_S32 ret = MPP_SUCCESS; +#ifdef ANDROID + MppBuffer framebuf = NULL; +#endif + + h265d_dxva2_picture_context_t *dxva_cxt = (h265d_dxva2_picture_context_t *)syn->dec.syntax.data; + h265d_reg_context_t *reg_cxt = ( h265d_reg_context_t *)hal; + + void *rps_ptr = mpp_buffer_get_ptr(reg_cxt->rps_data); + if (NULL == rps_ptr) { + + mpp_err("rps_data get ptr error"); + return MPP_ERR_NOMEM; + } + + + if (syn->dec.syntax.data == NULL) { + mpp_err("%s:%s:%d dxva is NULL", __FILE__, __func__, __LINE__); + return MPP_ERR_NULL_PTR; + } + + /* output pps */ + hal_h265d_output_pps_packet(hal, syn->dec.syntax.data); + +#ifdef dump + if (fp != NULL) { + fwrite(dxva_cxt->bitstream, 1, dxva_cxt->bitstream_size, fp); + fflush(fp); + } +#endif + + hal_h265d_slice_output_rps(syn->dec.syntax.data, rps_ptr); + if (NULL == reg_cxt->hw_regs) { + return MPP_ERR_NULL_PTR; + } + + hw_regs = (REGS_t*)reg_cxt->hw_regs; + + RK_U32 uiMaxCUWidth = 1 << (dxva_cxt->pp.log2_diff_max_min_luma_coding_block_size + + dxva_cxt->pp.log2_min_luma_coding_block_size_minus3 + 3); + RK_U32 uiMaxCUHeight = uiMaxCUWidth; + + RK_U32 log2_min_cb_size = dxva_cxt->pp.log2_min_luma_coding_block_size_minus3 + 3; + + RK_S32 width = (dxva_cxt->pp.PicWidthInMinCbsY << log2_min_cb_size); + + RK_S32 height = (dxva_cxt->pp.PicHeightInMinCbsY << log2_min_cb_size); + + RK_S32 numCuInWidth = width / uiMaxCUWidth + (width % uiMaxCUWidth != 0); + + RK_S32 stride_y = ((((numCuInWidth * uiMaxCUWidth * (dxva_cxt->pp.bit_depth_luma_minus8 + 8) + 2047) + & (~2047)) | 2048) >> 3); + RK_S32 stride_uv = ((((numCuInWidth * uiMaxCUHeight * (dxva_cxt->pp.bit_depth_chroma_minus8 + 8) + 2047) + & (~2047)) | 2048) >> 3); + RK_S32 virstrid_y = stride_y * height; + + RK_S32 virstrid_yuv = virstrid_y + stride_uv * height / 2; + + hw_regs->sw_picparameter.sw_slice_num = dxva_cxt->slice_count; + hw_regs->sw_picparameter.sw_y_hor_virstride + = stride_y >> 4; + hw_regs->sw_picparameter.sw_uv_hor_virstride + = stride_uv >> 4; + hw_regs->sw_y_virstride + = virstrid_y >> 4; + hw_regs->sw_yuv_virstride + = virstrid_yuv >> 4; + +#ifdef ANDROID + framebuf = mpp_buf_slot_get_buffer(reg_cxt->slots, dxva_cxt->pp.CurrPic.Index7Bits); + hw_regs->sw_decout_base = mpp_buffer_get_fd(framebuf); //just index need map +#endif + + /*if out_base is equal to zero it means this frame may error + we return directly add by csy*/ + + if (hw_regs->sw_decout_base == 0) { + return 0; + } + hw_regs->sw_cur_poc = dxva_cxt->pp.CurrPicOrderCntVal; + +#ifdef ANDROID + hw_regs->sw_cabactbl_base = mpp_buffer_get_fd(reg_cxt->cabac_table_data); + hw_regs->sw_pps_base = mpp_buffer_get_fd(reg_cxt->pps_data); + hw_regs->sw_rps_base = mpp_buffer_get_fd(reg_cxt->rps_data); + hw_regs->sw_strm_rlc_base = mpp_buffer_get_fd(syn->dec.stmbuf); +#endif + + hw_regs->sw_stream_len = ((dxva_cxt->bitstream_size + 15) & (~15)) + 64; + hw_regs->sw_interrupt.sw_dec_e = 1; + hw_regs->sw_interrupt.sw_dec_timeout_e = 1; + + + ///find s->rps_model[i] position, and set register + hw_regs->sw_ref_valid = 0; + + hw_regs->cabac_error_en = 0xfdfffffd; + +#ifdef ANDROID + int i = 0; + for (i = 0; i < (RK_S32)MPP_ARRAY_ELEMS(dxva_cxt->pp.RefPicList); i++) { + if (dxva_cxt->pp.RefPicList[i].bPicEntry != 0xff && + dxva_cxt->pp.RefPicList[i].bPicEntry != 0x7f) { + hw_regs->sw_refer_poc[i] = dxva_cxt->pp.PicOrderCntValList[i]; + framebuf = mpp_buf_slot_get_buffer(reg_cxt->slots, dxva_cxt->pp.RefPicList[i].Index7Bits); + if (framebuf != NULL) { + hw_regs->sw_refer_base[i] = mpp_buffer_get_fd(framebuf); + } + hw_regs->sw_ref_valid |= (1 << i); + } else { + hw_regs->sw_refer_base[i] = hw_regs->sw_decout_base; + } + } + + if (1) { + hw_regs->sw_refer_base[0] |= ((hw_regs->sw_ref_valid & 0xf) << 10); + hw_regs->sw_refer_base[1] |= (((hw_regs->sw_ref_valid >> 4) & 0xf) << 10); + hw_regs->sw_refer_base[2] |= (((hw_regs->sw_ref_valid >> 8) & 0xf) << 10); + hw_regs->sw_refer_base[3] |= (((hw_regs->sw_ref_valid >> 12) & 0x7) << 10); + } else { + hw_regs->sw_refer_base[0] |= (hw_regs->sw_ref_valid & 0xf); + hw_regs->sw_refer_base[1] |= ((hw_regs->sw_ref_valid >> 4) & 0xf); + hw_regs->sw_refer_base[2] |= ((hw_regs->sw_ref_valid >> 8) & 0xf); + hw_regs->sw_refer_base[3] |= ((hw_regs->sw_ref_valid >> 12) & 0x7); + } +#endif + return ret; +} + +MPP_RET hal_h265d_start(void *hal, HalTask *task) +{ + MPP_RET ret = MPP_OK; + h265d_reg_context_t *reg_cxt = (h265d_reg_context_t *)hal; + RK_U8* p = (RK_U8*)reg_cxt->hw_regs; + RK_S32 i; + (void) task; + for (i = 0; i < 68; i++) { + h265h_dbg(H265H_DBG_REG, "RK_HEVC_DEC: regs[%02d]=%08X\n", i, *((RK_U32*)p)); + p += 4; + } +#ifdef ANDROID + ret = VPUClientSendReg(reg_cxt->vpu_socket, (RK_U32*)reg_cxt->hw_regs, 68); // 68 is the nb of uint32_t + if (ret != 0) { + mpp_err("RK_HEVC_DEC: ERROR: VPUClientSendReg Failed!!!\n"); + return MPP_ERR_VPUHW; + } +#endif + return ret; +} + + +MPP_RET hal_h265d_wait(void *hal, HalTask *task) +{ + MPP_RET ret = MPP_OK; + (void) task; + (void) hal; +#ifdef ANDROID + h265d_reg_context_t *reg_cxt = (h265d_reg_context_t *)hal; + RK_U8* p = (RK_U8*)reg_cxt->hw_regs; + RK_S32 i; + VPU_CMD_TYPE cmd; + RK_S32 len; + ret = VPUClientWaitResult(reg_cxt->vpu_socket, (RK_U32*)reg_cxt->hw_regs, 68, &cmd, &len); + for (i = 0; i < 68; i++) { + if (i == 1) { + h265h_dbg(H265H_DBG_REG, "RK_HEVC_DEC: regs[%02d]=%08X\n", i, *((RK_U32*)p)); + } + + if (i == 45) { + h265h_dbg(H265H_DBG_REG, "RK_HEVC_DEC: regs[%02d]=%08X\n", i, *((RK_U32*)p)); + } + p += 4; + } +#endif + return ret; +} + + +MPP_RET hal_h265d_reset(void *hal) +{ + MPP_RET ret = MPP_OK; + (void)hal; + return ret; +} + +MPP_RET hal_h265d_flush(void *hal) +{ + MPP_RET ret = MPP_OK; + + (void)hal; + return ret; +} + +MPP_RET hal_h265d_control(void *hal, RK_S32 cmd_type, void *param) +{ + MPP_RET ret = MPP_OK; + + (void)hal; + (void)cmd_type; + (void)param; + return ret; +} + +#if 1 +const MppHalApi hal_api_h265d = { + "h265d_rkdec", + MPP_CTX_DEC, + MPP_VIDEO_CodingHEVC, + sizeof(h265d_reg_context_t), + 0, + hal_h265d_init, + hal_h265d_deinit, + hal_h265d_gen_regs, + hal_h265d_start, + hal_h265d_wait, + hal_h265d_reset, + hal_h265d_flush, + hal_h265d_control, +}; +#endif diff --git a/mpp/hal/rkdec/h265d/hal_h265d_reg.h b/mpp/hal/rkdec/h265d/hal_h265d_reg.h new file mode 100644 index 00000000..bd097129 --- /dev/null +++ b/mpp/hal/rkdec/h265d/hal_h265d_reg.h @@ -0,0 +1,131 @@ +/* + * + * Copyright 2010 Rockchip Electronics Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * @file hal_h265d_reg.h + * @brief + * @author csy(csy@rock-chips.com) + + * @version 1.0.0 + * @history + * 2015.7.15 : Create + */ + +#ifndef __HAL_H265D_REG_H__ +#define __HAL_H265D_REG_H__ +#include "rk_type.h" +#include "mpp_log.h" + +extern RK_U32 h265h_debug; +#define H265H_DBG_FUNCTION (0x00000001) +#define H265H_DBG_RPS (0x00000002) +#define H265H_DBG_PPS (0x00000004) +#define H265H_DBG_REG (0x00000008) + + +#define h265h_dbg(flag, fmt, ...) _mpp_dbg(h265h_debug, flag, fmt, ## __VA_ARGS__) + +typedef struct { + struct swreg_id { + RK_U32 minor_ver : 8 ; + RK_U32 major_ver : 8 ; + RK_U32 prod_num : 16 ; + } sw_id; + + struct swreg_int { + RK_U32 sw_dec_e : 1 ; + RK_U32 sw_dec_clkgate_e : 1 ; + RK_U32 reserve0 : 2 ; + RK_U32 sw_dec_irq_dis : 1 ; + RK_U32 sw_dec_timeout_e : 1 ; + RK_U32 sw_buf_empty_en : 1 ; + RK_U32 reserve1 : 1 ; + RK_U32 sw_dec_irq : 1 ; + RK_U32 sw_dec_irq_raw : 1 ; + RK_U32 reserve2 : 2 ; + RK_U32 sw_dec_rdy_sta : 1 ; + RK_U32 sw_dec_bus_sta : 1 ; + RK_U32 sw_dec_error_sta : 1 ; + RK_U32 sw_dec_empty_sta : 1 ; + RK_U32 reserve3 : 3 ; + RK_U32 sw_softrst_en_p : 1 ; + RK_U32 sw_force_softreset_valid: 1 ; + RK_U32 sw_softreset_rdy : 1 ; + } sw_interrupt; ///<- zrh: do nothing in C Model + + struct swreg_sysctrl { + RK_U32 sw_in_endian : 1 ; + RK_U32 sw_in_swap32_e : 1 ; + RK_U32 sw_in_swap64_e : 1 ; + RK_U32 sw_str_endian : 1 ; + RK_U32 sw_str_swap32_e : 1 ; + RK_U32 sw_str_swap64_e : 1 ; + RK_U32 sw_out_endian : 1 ; + RK_U32 sw_out_swap32_e : 1 ; + RK_U32 sw_out_cbcr_swap : 1 ; + RK_U32 reserve : 1 ; + RK_U32 sw_rlc_mode_direct_write : 1; + RK_U32 sw_rlc_mode : 1 ; + RK_U32 sw_strm_start_bit : 7 ; + } sw_sysctrl; ///<- zrh: do nothing in C Model + + struct swreg_pic { + RK_U32 sw_y_hor_virstride : 9 ; + RK_U32 reserve : 3 ; + RK_U32 sw_uv_hor_virstride : 9 ; + RK_U32 sw_slice_num : 8 ; + } sw_picparameter; + + RK_U32 sw_strm_rlc_base ;///<- zrh: do nothing in C Model + RK_U32 sw_stream_len ;///<- zrh: do nothing in C Model + RK_U32 sw_cabactbl_base ;///<- zrh: do nothing in C Model + RK_U32 sw_decout_base ; + RK_U32 sw_y_virstride ; + RK_U32 sw_yuv_virstride ; + RK_U32 sw_refer_base[15] ; + RK_S32 sw_refer_poc[15] ; + RK_S32 sw_cur_poc ; + RK_U32 sw_rlcwrite_base ;///<- zrh: do nothing in C Model + RK_U32 sw_pps_base ;///<- zrh: do nothing in C Model + RK_U32 sw_rps_base ;///<- zrh: do nothing in C Model + RK_U32 cabac_error_en ;///<- zrh add + RK_U32 cabac_error_status ;///<- zrh add + + struct cabac_error_ctu { + RK_U32 sw_cabac_error_ctu_xoffset : 8; + RK_U32 sw_cabac_error_ctu_yoffset : 8; + RK_U32 sw_streamfifo_space2full : 7; + RK_U32 reversed0 : 9; + } cabac_error_ctu; + + struct sao_ctu_position { + RK_U32 sw_saowr_xoffset : 9; + RK_U32 reversed0 : 7; + RK_U32 sw_saowr_yoffset : 10; + RK_U32 reversed1 : 6; + } sao_ctu_position; + + RK_U32 sw_ref_valid ; //this is not same with hardware + RK_U32 sw_refframe_index[15]; + + RK_U32 performance_cycle; + RK_U32 axi_ddr_rdata; + RK_U32 axi_ddr_wdata; + RK_U32 fpgadebug_reset; +} REGS_t; + +#endif diff --git a/mpp/hal/vpu/h265d/dxva2_hevc.c b/mpp/hal/vpu/h265d/dxva2_hevc.c new file mode 100644 index 00000000..6ca79667 --- /dev/null +++ b/mpp/hal/vpu/h265d/dxva2_hevc.c @@ -0,0 +1,437 @@ +/* + * DXVA2 HEVC HW acceleration. + * Copyright 2010 Rockchip Electronics Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#include "h265d_parser.h" +#define MAX_SLICES 256 + +struct hevc_dxva2_picture_context { + DXVA_PicParams_HEVC pp; + DXVA_Qmatrix_HEVC qm; + unsigned slice_count; + DXVA_Slice_HEVC_Short slice_short[MAX_SLICES]; + const uint8_t *bitstream; + unsigned bitstream_size; +}; + +static void fill_picture_entry(DXVA_PicEntry_HEVC *pic, + unsigned index, unsigned flag) +{ + av_assert0((index & 0x7f) == index && (flag & 0x01) == flag); + pic->bPicEntry = index | (flag << 7); +} + +static int get_refpic_index(const DXVA_PicParams_HEVC *pp, int surface_index) +{ + int i; + for (i = 0; i < FF_ARRAY_ELEMS(pp->RefPicList); i++) { + if ((pp->RefPicList[i].bPicEntry & 0x7f) == surface_index) + return i; + } + return 0xff; +} + +static void fill_picture_parameters(const AVCodecContext *avctx, AVDXVAContext *ctx, const HEVCContext *h, + DXVA_PicParams_HEVC *pp) +{ + const HEVCFrame *current_picture = h->ref; + const HEVCSPS *sps = h->ps.sps; + const HEVCPPS *pps = h->ps.pps; + int i, j; + + memset(pp, 0, sizeof(*pp)); + + pp->PicWidthInMinCbsY = sps->min_cb_width; + pp->PicHeightInMinCbsY = sps->min_cb_height; + + pp->wFormatAndSequenceInfoFlags = (sps->chroma_format_idc << 0) | + (sps->separate_colour_plane_flag << 2) | + ((sps->bit_depth - 8) << 3) | + ((sps->bit_depth - 8) << 6) | + ((sps->log2_max_poc_lsb - 4) << 9) | + (0 << 13) | + (0 << 14) | + (0 << 15); + + fill_picture_entry(&pp->CurrPic, ff_dxva2_get_surface_index(avctx, ctx, current_picture->frame), 0); + + pp->sps_max_dec_pic_buffering_minus1 = sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering - 1; + pp->log2_min_luma_coding_block_size_minus3 = sps->log2_min_cb_size - 3; + pp->log2_diff_max_min_luma_coding_block_size = sps->log2_diff_max_min_coding_block_size; + pp->log2_min_transform_block_size_minus2 = sps->log2_min_tb_size - 2; + pp->log2_diff_max_min_transform_block_size = sps->log2_max_trafo_size - sps->log2_min_tb_size; + pp->max_transform_hierarchy_depth_inter = sps->max_transform_hierarchy_depth_inter; + pp->max_transform_hierarchy_depth_intra = sps->max_transform_hierarchy_depth_intra; + pp->num_short_term_ref_pic_sets = sps->nb_st_rps; + pp->num_long_term_ref_pics_sps = sps->num_long_term_ref_pics_sps; + + pp->num_ref_idx_l0_default_active_minus1 = pps->num_ref_idx_l0_default_active - 1; + pp->num_ref_idx_l1_default_active_minus1 = pps->num_ref_idx_l1_default_active - 1; + pp->init_qp_minus26 = pps->pic_init_qp_minus26; + + if (h->sh.short_term_ref_pic_set_sps_flag == 0 && h->sh.short_term_rps) { + pp->ucNumDeltaPocsOfRefRpsIdx = h->sh.short_term_rps->rps_idx_num_delta_pocs; + pp->wNumBitsForShortTermRPSInSlice = h->sh.short_term_ref_pic_set_size; + } + + pp->dwCodingParamToolFlags = (sps->scaling_list_enable_flag << 0) | + (sps->amp_enabled_flag << 1) | + (sps->sao_enabled << 2) | + (sps->pcm_enabled_flag << 3) | + ((sps->pcm_enabled_flag ? (sps->pcm.bit_depth - 1) : 0) << 4) | + ((sps->pcm_enabled_flag ? (sps->pcm.bit_depth_chroma - 1) : 0) << 8) | + ((sps->pcm_enabled_flag ? (sps->pcm.log2_min_pcm_cb_size - 3) : 0) << 12) | + ((sps->pcm_enabled_flag ? (sps->pcm.log2_max_pcm_cb_size - sps->pcm.log2_min_pcm_cb_size) : 0) << 14) | + (sps->pcm.loop_filter_disable_flag << 16) | + (sps->long_term_ref_pics_present_flag << 17) | + (sps->sps_temporal_mvp_enabled_flag << 18) | + (sps->sps_strong_intra_smoothing_enable_flag << 19) | + (pps->dependent_slice_segments_enabled_flag << 20) | + (pps->output_flag_present_flag << 21) | + (pps->num_extra_slice_header_bits << 22) | + (pps->sign_data_hiding_flag << 25) | + (pps->cabac_init_present_flag << 26) | + (0 << 27); + + pp->dwCodingSettingPicturePropertyFlags = (pps->constrained_intra_pred_flag << 0) | + (pps->transform_skip_enabled_flag << 1) | + (pps->cu_qp_delta_enabled_flag << 2) | + (pps->pic_slice_level_chroma_qp_offsets_present_flag << 3) | + (pps->weighted_pred_flag << 4) | + (pps->weighted_bipred_flag << 5) | + (pps->transquant_bypass_enable_flag << 6) | + (pps->tiles_enabled_flag << 7) | + (pps->entropy_coding_sync_enabled_flag << 8) | + (pps->uniform_spacing_flag << 9) | + ((pps->tiles_enabled_flag ? pps->loop_filter_across_tiles_enabled_flag : 0) << 10) | + (pps->seq_loop_filter_across_slices_enabled_flag << 11) | + (pps->deblocking_filter_override_enabled_flag << 12) | + (pps->disable_dbf << 13) | + (pps->lists_modification_present_flag << 14) | + (pps->slice_header_extension_present_flag << 15) | + (IS_IRAP(h) << 16) | + (IS_IDR(h) << 17) | + /* IntraPicFlag */ + (IS_IRAP(h) << 18) | + (0 << 19); + pp->pps_cb_qp_offset = pps->cb_qp_offset; + pp->pps_cr_qp_offset = pps->cr_qp_offset; + if (pps->tiles_enabled_flag) { + pp->num_tile_columns_minus1 = pps->num_tile_columns - 1; + pp->num_tile_rows_minus1 = pps->num_tile_rows - 1; + + if (!pps->uniform_spacing_flag) { + for (i = 0; i < pps->num_tile_columns; i++) + pp->column_width_minus1[i] = pps->column_width[i] - 1; + + for (i = 0; i < pps->num_tile_rows; i++) + pp->row_height_minus1[i] = pps->row_height[i] - 1; + } + } + + pp->diff_cu_qp_delta_depth = pps->diff_cu_qp_delta_depth; + pp->pps_beta_offset_div2 = pps->beta_offset / 2; + pp->pps_tc_offset_div2 = pps->tc_offset / 2; + pp->log2_parallel_merge_level_minus2 = pps->log2_parallel_merge_level - 2; + pp->CurrPicOrderCntVal = h->poc; + + // fill RefPicList from the DPB + for (i = 0, j = 0; i < FF_ARRAY_ELEMS(pp->RefPicList); i++) { + const HEVCFrame *frame = NULL; + while (!frame && j < FF_ARRAY_ELEMS(h->DPB)) { + if (&h->DPB[j] != current_picture && (h->DPB[j].flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF))) + frame = &h->DPB[j]; + j++; + } + + if (frame) { + fill_picture_entry(&pp->RefPicList[i], ff_dxva2_get_surface_index(avctx, ctx, frame->frame), !!(frame->flags & HEVC_FRAME_FLAG_LONG_REF)); + pp->PicOrderCntValList[i] = frame->poc; + } else { + pp->RefPicList[i].bPicEntry = 0xff; + pp->PicOrderCntValList[i] = 0; + } + } + +#define DO_REF_LIST(ref_idx, ref_list) { \ + const RefPicList *rpl = &h->rps[ref_idx]; \ + for (i = 0, j = 0; i < FF_ARRAY_ELEMS(pp->ref_list); i++) { \ + const HEVCFrame *frame = NULL; \ + while (!frame && j < rpl->nb_refs) \ + frame = rpl->ref[j++]; \ + if (frame) \ + pp->ref_list[i] = get_refpic_index(pp, ff_dxva2_get_surface_index(avctx, ctx, frame->frame)); \ + else \ + pp->ref_list[i] = 0xff; \ + } \ + } + + // Fill short term and long term lists + DO_REF_LIST(ST_CURR_BEF, RefPicSetStCurrBefore); + DO_REF_LIST(ST_CURR_AFT, RefPicSetStCurrAfter); + DO_REF_LIST(LT_CURR, RefPicSetLtCurr); + + pp->StatusReportFeedbackNumber = 1 + DXVA_CONTEXT_REPORT_ID(avctx, ctx)++; +} + +static void fill_scaling_lists(AVDXVAContext *ctx, const HEVCContext *h, DXVA_Qmatrix_HEVC *qm) +{ + unsigned i, j, pos; + const ScalingList *sl = h->ps.pps->scaling_list_data_present_flag ? + &h->ps.pps->scaling_list : &h->ps.sps->scaling_list; + + memset(qm, 0, sizeof(*qm)); + for (i = 0; i < 6; i++) { + for (j = 0; j < 16; j++) { + pos = 4 * mpp_hevc_diag_scan4x4_y[j] + mpp_hevc_diag_scan4x4_x[j]; + qm->ucScalingLists0[i][j] = sl->sl[0][i][pos]; + } + + for (j = 0; j < 64; j++) { + pos = 8 * mpp_hevc_diag_scan8x8_y[j] + mpp_hevc_diag_scan8x8_x[j]; + qm->ucScalingLists1[i][j] = sl->sl[1][i][pos]; + qm->ucScalingLists2[i][j] = sl->sl[2][i][pos]; + + if (i < 2) + qm->ucScalingLists3[i][j] = sl->sl[3][i * 3][pos]; + } + + qm->ucScalingListDCCoefSizeID2[i] = sl->sl_dc[0][i]; + if (i < 2) + qm->ucScalingListDCCoefSizeID3[i] = sl->sl_dc[1][i * 3]; + } +} + +static void fill_slice_short(DXVA_Slice_HEVC_Short *slice, + unsigned position, unsigned size) +{ + memset(slice, 0, sizeof(*slice)); + slice->BSNALunitDataLocation = position; + slice->SliceBytesInBuffer = size; + slice->wBadSliceChopping = 0; +} + +static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx, + DECODER_BUFFER_DESC *bs, + DECODER_BUFFER_DESC *sc) +{ + const HEVCContext *h = avctx->priv_data; + AVDXVAContext *ctx = avctx->hwaccel_context; + const HEVCFrame *current_picture = h->ref; + struct hevc_dxva2_picture_context *ctx_pic = current_picture->hwaccel_picture_private; + DXVA_Slice_HEVC_Short *slice = NULL; + void *dxva_data_ptr; + uint8_t *dxva_data, *current, *end; + unsigned dxva_size; + void *slice_data; + unsigned slice_size; + unsigned padding; + unsigned i; + unsigned type; + + /* Create an annex B bitstream buffer with only slice NAL and finalize slice */ +#if CONFIG_D3D11VA + if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD) { + type = D3D11_VIDEO_DECODER_BUFFER_BITSTREAM; + if (FAILED(ID3D11VideoContext_GetDecoderBuffer(D3D11VA_CONTEXT(ctx)->video_context, + D3D11VA_CONTEXT(ctx)->decoder, + type, + &dxva_size, &dxva_data_ptr))) + return -1; + } +#endif +#if CONFIG_DXVA2 + if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD) { + type = DXVA2_BitStreamDateBufferType; + if (FAILED(IDirectXVideoDecoder_GetBuffer(DXVA2_CONTEXT(ctx)->decoder, + type, + &dxva_data_ptr, &dxva_size))) + return -1; + } +#endif + + dxva_data = dxva_data_ptr; + current = dxva_data; + end = dxva_data + dxva_size; + + for (i = 0; i < ctx_pic->slice_count; i++) { + static const uint8_t start_code[] = { 0, 0, 1 }; + static const unsigned start_code_size = sizeof(start_code); + unsigned position, size; + + slice = &ctx_pic->slice_short[i]; + + position = slice->BSNALunitDataLocation; + size = slice->SliceBytesInBuffer; + if (start_code_size + size > end - current) { + av_log(avctx, AV_LOG_ERROR, "Failed to build bitstream"); + break; + } + + slice->BSNALunitDataLocation = current - dxva_data; + slice->SliceBytesInBuffer = start_code_size + size; + + memcpy(current, start_code, start_code_size); + current += start_code_size; + + memcpy(current, &ctx_pic->bitstream[position], size); + current += size; + } + padding = FFMIN(128 - ((current - dxva_data) & 127), end - current); + if (slice && padding > 0) { + memset(current, 0, padding); + current += padding; + + slice->SliceBytesInBuffer += padding; + } +#if CONFIG_D3D11VA + if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD) + if (FAILED(ID3D11VideoContext_ReleaseDecoderBuffer(D3D11VA_CONTEXT(ctx)->video_context, D3D11VA_CONTEXT(ctx)->decoder, type))) + return -1; +#endif +#if CONFIG_DXVA2 + if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD) + if (FAILED(IDirectXVideoDecoder_ReleaseBuffer(DXVA2_CONTEXT(ctx)->decoder, type))) + return -1; +#endif + if (i < ctx_pic->slice_count) + return -1; + +#if CONFIG_D3D11VA + if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD) { + D3D11_VIDEO_DECODER_BUFFER_DESC *dsc11 = bs; + memset(dsc11, 0, sizeof(*dsc11)); + dsc11->BufferType = type; + dsc11->DataSize = current - dxva_data; + dsc11->NumMBsInBuffer = 0; + + type = D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL; + } +#endif +#if CONFIG_DXVA2 + if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD) { + DXVA2_DecodeBufferDesc *dsc2 = bs; + memset(dsc2, 0, sizeof(*dsc2)); + dsc2->CompressedBufferType = type; + dsc2->DataSize = current - dxva_data; + dsc2->NumMBsInBuffer = 0; + + type = DXVA2_SliceControlBufferType; + } +#endif + + slice_data = ctx_pic->slice_short; + slice_size = ctx_pic->slice_count * sizeof(*ctx_pic->slice_short); + + av_assert0(((current - dxva_data) & 127) == 0); + return ff_dxva2_commit_buffer(avctx, ctx, sc, + type, + slice_data, slice_size, 0); +} + + +static int dxva2_hevc_start_frame(AVCodecContext *avctx, + av_unused const uint8_t *buffer, + av_unused RK_U32 size) +{ + const HEVCContext *h = avctx->priv_data; + AVDXVAContext *ctx = avctx->hwaccel_context; + struct hevc_dxva2_picture_context *ctx_pic = h->ref->hwaccel_picture_private; + + if (DXVA_CONTEXT_DECODER(avctx, ctx) == NULL || + DXVA_CONTEXT_CFG(avctx, ctx) == NULL || + DXVA_CONTEXT_COUNT(avctx, ctx) <= 0) + return -1; + av_assert0(ctx_pic); + + /* Fill up DXVA_PicParams_HEVC */ + fill_picture_parameters(avctx, ctx, h, &ctx_pic->pp); + + /* Fill up DXVA_Qmatrix_HEVC */ + fill_scaling_lists(ctx, h, &ctx_pic->qm); + + ctx_pic->slice_count = 0; + ctx_pic->bitstream_size = 0; + ctx_pic->bitstream = NULL; + return 0; +} + +static int dxva2_hevc_decode_slice(AVCodecContext *avctx, + const uint8_t *buffer, + uint32_t size) +{ + const HEVCContext *h = avctx->priv_data; + const HEVCFrame *current_picture = h->ref; + struct hevc_dxva2_picture_context *ctx_pic = current_picture->hwaccel_picture_private; + unsigned position; + + if (ctx_pic->slice_count >= MAX_SLICES) + return -1; + + if (!ctx_pic->bitstream) + ctx_pic->bitstream = buffer; + ctx_pic->bitstream_size += size; + + position = buffer - ctx_pic->bitstream; + fill_slice_short(&ctx_pic->slice_short[ctx_pic->slice_count], position, size); + ctx_pic->slice_count++; + + return 0; +} + +static int dxva2_hevc_end_frame(AVCodecContext *avctx) +{ + HEVCContext *h = avctx->priv_data; + struct hevc_dxva2_picture_context *ctx_pic = h->ref->hwaccel_picture_private; + int scale = ctx_pic->pp.dwCodingParamToolFlags & 1; + int ret; + + if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0) + return -1; + + ret = ff_dxva2_common_end_frame(avctx, h->ref->frame, + &ctx_pic->pp, sizeof(ctx_pic->pp), + scale ? &ctx_pic->qm : NULL, scale ? sizeof(ctx_pic->qm) : 0, + commit_bitstream_and_slice_buffer); + return ret; +} + +#if CONFIG_HEVC_DXVA2_HWACCEL +AVHWAccel ff_hevc_dxva2_hwaccel = { + .name = "hevc_dxva2", + .type = AVMEDIA_TYPE_VIDEO, + .id = AV_CODEC_ID_HEVC, + .pix_fmt = AV_PIX_FMT_DXVA2_VLD, + .start_frame = dxva2_hevc_start_frame, + .decode_slice = dxva2_hevc_decode_slice, + .end_frame = dxva2_hevc_end_frame, + .frame_priv_data_size = sizeof(struct hevc_dxva2_picture_context), +}; +#endif + +#if CONFIG_HEVC_D3D11VA_HWACCEL +AVHWAccel ff_hevc_d3d11va_hwaccel = { + .name = "hevc_d3d11va", + .type = AVMEDIA_TYPE_VIDEO, + .id = AV_CODEC_ID_HEVC, + .pix_fmt = AV_PIX_FMT_D3D11VA_VLD, + .start_frame = dxva2_hevc_start_frame, + .decode_slice = dxva2_hevc_decode_slice, + .end_frame = dxva2_hevc_end_frame, + .frame_priv_data_size = sizeof(struct hevc_dxva2_picture_context), +}; +#endif diff --git a/mpp/mpp_bitread.c b/mpp/mpp_bitread.c new file mode 100644 index 00000000..92077d58 --- /dev/null +++ b/mpp/mpp_bitread.c @@ -0,0 +1,193 @@ +#include +#include "mpp_mem.h" +#include "mpp_bitread.h" +#include "rk_type.h" +#include + +static RK_S32 rk_UpdateCurrByte(GetBitCxt_t *pBitCtx) +{ + if (pBitCtx->bytes_left_ < 1) + return MPP_ERR_STREAM; + + // Emulation prevention three-byte detection. + // If a sequence of 0x000003 is found, skip (ignore) the last byte (0x03). + if (*pBitCtx->data_ == 0x03 && (pBitCtx->prev_two_bytes_ & 0xffff) == 0) { + // Detected 0x000003, skip last byte. + ++pBitCtx->data_; + --pBitCtx->bytes_left_; + ++pBitCtx->emulation_prevention_bytes_; + // Need another full three bytes before we can detect the sequence again. + pBitCtx->prev_two_bytes_ = 0xffff; + + if (pBitCtx->bytes_left_ < 1) + return MPP_ERR_STREAM; + } + + // Load a new byte and advance pointers. + pBitCtx->curr_byte_ = *pBitCtx->data_++ & 0xff; + --pBitCtx->bytes_left_; + pBitCtx->num_remaining_bits_in_curr_byte_ = 8; + + pBitCtx->prev_two_bytes_ = (pBitCtx->prev_two_bytes_ << 8) | pBitCtx->curr_byte_; + + return MPP_OK; +} + + +// Read |num_bits| (1 to 31 inclusive) from the stream and return them +// in |out|, with first bit in the stream as MSB in |out| at position +// (|num_bits| - 1). +RK_S32 mpp_ReadBits(GetBitCxt_t *pBitCtx, RK_S32 num_bits, RK_S32 *out) +{ + RK_S32 bits_left = num_bits; + *out = 0; + if (num_bits > 31) { + // rk_err("%s num bit exceed 32",__function__); + return MPP_ERR_STREAM; + + } + + while (pBitCtx->num_remaining_bits_in_curr_byte_ < bits_left) { + // Take all that's left in current byte, shift to make space for the rest. + *out |= (pBitCtx->curr_byte_ << (bits_left - pBitCtx->num_remaining_bits_in_curr_byte_)); + bits_left -= pBitCtx->num_remaining_bits_in_curr_byte_; + + if (rk_UpdateCurrByte(pBitCtx)) { + return MPP_ERR_STREAM; + } + } + + *out |= (pBitCtx->curr_byte_ >> (pBitCtx->num_remaining_bits_in_curr_byte_ - bits_left)); + *out &= ((1 << num_bits) - 1); + pBitCtx->num_remaining_bits_in_curr_byte_ -= bits_left; + pBitCtx->UsedBits += num_bits; + + return MPP_OK; +} + +RK_S32 mpp_ReadLongBits(GetBitCxt_t *pBitCtx, RK_S32 num_bits, RK_U32 *out) +{ + RK_S32 val = 0, val1 = 0; + if (mpp_ReadBits(pBitCtx, 16, &val)) { + return MPP_ERR_STREAM; + } + if (mpp_ReadBits(pBitCtx, (num_bits - 16), &val1)) { + return MPP_ERR_STREAM; + } + val = val << 16; + *out = (RK_U32)(val | val1); + return MPP_OK; +} + +RK_S32 mpp_SkipBits(GetBitCxt_t *pBitCtx, RK_S32 num_bits) +{ + RK_S32 bits_left = num_bits; + + while (pBitCtx->num_remaining_bits_in_curr_byte_ < bits_left) { + // Take all that's left in current byte, shift to make space for the rest. + bits_left -= pBitCtx->num_remaining_bits_in_curr_byte_; + + if (rk_UpdateCurrByte(pBitCtx)) { + return MPP_ERR_STREAM; + } + } + pBitCtx->num_remaining_bits_in_curr_byte_ -= bits_left; + pBitCtx->UsedBits += num_bits; + return MPP_OK; +} + + +RK_S32 mpp_ReadUE(GetBitCxt_t *pBitCtx, RK_U32 *val) +{ + RK_S32 num_bits = -1; + RK_S32 bit; + RK_S32 rest; + // Count the number of contiguous zero bits. + do { + if (mpp_ReadBits(pBitCtx, 1, &bit)) { + return MPP_ERR_STREAM; + } + num_bits++; + } while (bit == 0); + + if (num_bits > 31) { + return MPP_ERR_STREAM; + } + // Calculate exp-Golomb code value of size num_bits. + *val = (1 << num_bits) - 1; + + if (num_bits > 0) { + if (mpp_ReadBits(pBitCtx, num_bits, &rest)) { + return MPP_ERR_STREAM; + } + *val += rest; + } + + return MPP_OK; +} + +RK_S32 mpp_ReadSE(GetBitCxt_t *pBitCtx, RK_S32 *val) +{ + RK_U32 ue; + if (mpp_ReadUE(pBitCtx, &ue)) { + return MPP_ERR_STREAM; + } + if (ue % 2 == 0) { // odd + *val = -(RK_S32)(ue >> 1); + } else { + *val = (RK_S32)((ue >> 1) + 1); + } + return MPP_OK; +} + + +RK_S32 mpp_has_more_rbsp_data(GetBitCxt_t *pBitCtx) +{ + // Make sure we have more bits, if we are at 0 bits in current byte + // and updating current byte fails, we don't have more data anyway. + if (pBitCtx->num_remaining_bits_in_curr_byte_ == 0 && !rk_UpdateCurrByte(pBitCtx)) + return 0; + + // On last byte? + if (pBitCtx->bytes_left_) + return 0; + + // Last byte, look for stop bit; + // We have more RBSP data if the last non-zero bit we find is not the + // first available bit. + return (pBitCtx->curr_byte_ & + ((1 << (pBitCtx->num_remaining_bits_in_curr_byte_ - 1)) - 1)) != 0; +} + +void mpp_Init_Bits(GetBitCxt_t *pBitCtx, RK_U8 *data, RK_S32 size) +{ + memset(pBitCtx, 0, sizeof(GetBitCxt_t)); + pBitCtx->data_ = data; + pBitCtx->bytes_left_ = size; + pBitCtx->num_remaining_bits_in_curr_byte_ = 0; + // Initially set to 0xffff to accept all initial two-byte sequences. + pBitCtx->prev_two_bytes_ = 0xffff; + pBitCtx->emulation_prevention_bytes_ = 0; + // add + pBitCtx->buf = data; + pBitCtx->buf_len = size; + pBitCtx->UsedBits = 0; +} + +#if 0 +void mpp_Set_Bits_LogContex(GetBitCxt_t *pBitCtx, RK_LOG_CONTEX_t *p_ctx) +{ + //pBitCtx->ctx = p_ctx; +} +#endif + +void mpp_Reset_UseBits(GetBitCxt_t *pBitCtx) +{ + pBitCtx->UsedBits = 0; +} + +RK_U8 mpp_get_curdata_value(GetBitCxt_t *pBitCtx) +{ + + return (*pBitCtx->data_); +} diff --git a/mpp/mpp_bitread.h b/mpp/mpp_bitread.h new file mode 100644 index 00000000..2d65593d --- /dev/null +++ b/mpp/mpp_bitread.h @@ -0,0 +1,120 @@ +#ifndef __RK_BIT_READ_H__ +#define __RK_BIT_READ_H__ +#include +#include +#include "rk_type.h" +#include "mpp_log.h" +#include "mpp_common.h" +#include "mpp_err.h" + +#define READ_BITS(pBitCtx, num_bits, out) \ + do { \ + RK_S32 _out; \ + RK_S32 _ret = 0; \ + _ret = mpp_ReadBits(pBitCtx, num_bits, &_out); \ + if (!_ret) { *out = _out; } \ + else { return MPP_ERR_STREAM; } \ + } while (0) + +#define READ_SKIPBITS(pBitCtx, num_bits) \ + do { \ + RK_S32 _ret = 0; \ + _ret = mpp_SkipBits(pBitCtx, num_bits); \ + if (_ret) {return MPP_ERR_STREAM; } \ + } while (0) + + +#define READ_BIT1(pBitCtx, out) \ + do { \ + RK_S32 _out; \ + RK_S32 _ret = 0; \ + _ret = mpp_ReadBits(pBitCtx, 1, &_out); \ + if (!_ret) { *out = _out; } \ + else { return MPP_ERR_STREAM;} \ + } while (0) + + +#define READ_UE(pBitCtx, out) \ + do { \ + RK_U32 _out; \ + RK_S32 _ret = 0; \ + _ret = mpp_ReadUE(pBitCtx, &_out); \ + if (!_ret) { *out = _out; } \ + else { return MPP_ERR_STREAM; } \ + } while (0) + + +#define READ_SE(pBitCtx, out) \ + do { \ + RK_S32 _out; \ + RK_S32 _ret = 0; \ + _ret = mpp_ReadSE(pBitCtx, &_out); \ + if (!_ret) { *out = _out; } \ + else { return MPP_ERR_STREAM; } \ + } while (0) + + +#define CHECK_RANGE(pBitCtx,val, _min, _max) \ + do { \ + if ((val) < (_min) || (val) > (_max)) { \ + mpp_log("%d[%d,%d]", val, _min, _max); \ + return MPP_ERR_STREAM; \ + } \ + } while (0) + + +#define CHECK_ERROR(pBitCtx,val) \ + do { \ + if (!(val)) { \ + mpp_log("value false"); \ + mpp_assert(0); \ + return MPP_ERR_STREAM; \ + } \ + } while (0) + + +//===================================================================== + +typedef struct { + // Pointer to the next unread (not in curr_byte_) byte in the stream. + RK_U8 *data_; + // Bytes left in the stream (without the curr_byte_). + RK_U32 bytes_left_; + // Contents of the current byte; first unread bit starting at position + // 8 - num_remaining_bits_in_curr_byte_ from MSB. + RK_S64 curr_byte_; + // Number of bits remaining in curr_byte_ + RK_S32 num_remaining_bits_in_curr_byte_; + // Used in emulation prevention three byte detection (see spec). + // Initially set to 0xffff to accept all initial two-byte sequences. + RK_S64 prev_two_bytes_; + // Number of emulation preventation bytes (0x000003) we met. + RK_S64 emulation_prevention_bytes_; + // file to debug + // count PPS SPS SEI read bits + RK_S32 UsedBits; + RK_U8 *buf; + RK_S32 buf_len; +} GetBitCxt_t; + + +#ifdef __cplusplus +extern "C" { +#endif + +RK_S32 mpp_ReadBits(GetBitCxt_t *pBitCtx, RK_S32 num_bits, RK_S32 *out); +RK_S32 mpp_ReadLongBits(GetBitCxt_t *pBitCtx, RK_S32 num_bits, RK_U32 *out); +RK_S32 mpp_SkipBits(GetBitCxt_t *pBitCtx, RK_S32 num_bits); +RK_S32 mpp_ReadUE(GetBitCxt_t *pBitCtx, RK_U32* val); +RK_S32 mpp_ReadSE(GetBitCxt_t *pBitCtx, RK_S32* val); +void mpp_Init_Bits(GetBitCxt_t *pBitCtx, RK_U8 *data, RK_S32 size); +RK_S32 mpp_has_more_rbsp_data(GetBitCxt_t * pBitCtx); +//void mpp_Set_Bits_LogContex(GetBitCxt_t *pBitCtx, RK_LOG_CONTEX_t *p_ctx); +void mpp_Reset_UseBits(GetBitCxt_t *pBitCtx); + +#ifdef __cplusplus +} +#endif + + +#endif /* __RK_BIT_READ_H__ */