{"action":"created","comment":{"url":"https://api.github.com/repos/01org/libyami/pulls/comments/33841690","id":33841690,"diff_hunk":"@@ -0,0 +1,1784 @@\n+/*\n+ *  vaapidecoder_h265.cpp - h265 decoder\n+ *\n+ *  Copyright (C) 2013-2014 Intel Corporation\n+ *    Author: Sreerenj Balachandran <sreerenj.balachandran@intel.com>\n+ *    Author: YuJiankang<jiankang.yu@intel.com>\n+ *\n+ *  This library is free software; you can redistribute it and/or\n+ *  modify it under the terms of the GNU Lesser General Public License\n+ *  as published by the Free Software Foundation; either version 2.1\n+ *  of the License, or (at your option) any later version.\n+ *\n+ *  This library is distributed in the hope that it will be useful,\n+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ *  Lesser General Public License for more details\n+ *\n+ *  You should have received a copy of the GNU Lesser General Public\n+ *  License along with this library; if not, write to the Free\n+ *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n+ *  Boston, MA 02110-1301 USA\n+ */\n+\n+\n+#ifdef HAVE_CONFIG_H\n+#include \"config.h\"\n+#endif\n+#include <stdlib.h>\n+#include <string.h>\n+#include <tr1/functional>\n+#include \"common/log.h\"\n+#include \"vaapidecoder_h265.h\"\n+#include \"vaapidecoder_factory.h\"\n+\n+namespace YamiMediaCodec{\n+\n+typedef enum {\n+    VAAPI_DECODER_UNIT_FLAG_FRAME_START = (1 << 0),\n+    VAAPI_DECODER_UNIT_FLAG_FRAME_END   = (1 << 1),\n+    VAAPI_DECODER_UNIT_FLAG_STREAM_END  = (1 << 2),\n+    VAAPI_DECODER_UNIT_FLAG_SLICE       = (1 << 3),\n+    VAAPI_DECODER_UNIT_FLAG_SKIP        = (1 << 4),\n+    VAAPI_DECODER_UNIT_FLAG_LAST        = (1 << 5)\n+} VaapiDecoderUnitFlags;\n+\n+enum\n+{\n+  VAAPI_DECODER_UNIT_FLAG_AU_START =\n+      (VAAPI_DECODER_UNIT_FLAG_LAST << 0),\n+  VAAPI_DECODER_UNIT_FLAG_AU_END = (VAAPI_DECODER_UNIT_FLAG_LAST << 1),\n+\n+  VAAPI_DECODER_UNIT_FLAGS_AU = (VAAPI_DECODER_UNIT_FLAG_AU_START |\n+      VAAPI_DECODER_UNIT_FLAG_AU_END),\n+};\n+\n+enum\n+{\n+  VAAPI_PICTURE_FLAG_IDR = (VAAPI_PICTURE_FLAG_LAST << 0),\n+  VAAPI_PICTURE_FLAG_REFERENCE2 = (VAAPI_PICTURE_FLAG_LAST << 1),\n+  VAAPI_PICTURE_FLAG_AU_START = (VAAPI_PICTURE_FLAG_LAST << 4),\n+  VAAPI_PICTURE_FLAG_AU_END = (VAAPI_PICTURE_FLAG_LAST << 5),\n+  VAAPI_PICTURE_FLAG_RPS_ST_CURR_BEFORE =\n+      (VAAPI_PICTURE_FLAG_LAST << 6),\n+  VAAPI_PICTURE_FLAG_RPS_ST_CURR_AFTER = (VAAPI_PICTURE_FLAG_LAST << 7),\n+  VAAPI_PICTURE_FLAG_RPS_ST_FOLL = (VAAPI_PICTURE_FLAG_LAST << 8),\n+  VAAPI_PICTURE_FLAG_RPS_LT_CURR = (VAAPI_PICTURE_FLAG_LAST << 9),\n+  VAAPI_PICTURE_FLAG_RPS_LT_FOLL = (VAAPI_PICTURE_FLAG_LAST << 10),\n+\n+  VAAPI_PICTURE_FLAG_SHORT_TERM_REFERENCE =\n+      (VAAPI_PICTURE_FLAG_REFERENCE),\n+  VAAPI_PICTURE_FLAG_LONG_TERM_REFERENCE =\n+      (VAAPI_PICTURE_FLAG_REFERENCE | VAAPI_PICTURE_FLAG_REFERENCE2),\n+  VAAPI_PICTURE_FLAGS_REFERENCE =\n+      (VAAPI_PICTURE_FLAG_SHORT_TERM_REFERENCE |\n+      VAAPI_PICTURE_FLAG_LONG_TERM_REFERENCE),\n+\n+  VAAPI_PICTURE_FLAGS_RPS_ST =\n+      (VAAPI_PICTURE_FLAG_RPS_ST_CURR_BEFORE |\n+      VAAPI_PICTURE_FLAG_RPS_ST_CURR_AFTER |\n+      VAAPI_PICTURE_FLAG_RPS_ST_FOLL),\n+  VAAPI_PICTURE_FLAGS_RPS_LT =\n+      (VAAPI_PICTURE_FLAG_RPS_LT_CURR | VAAPI_PICTURE_FLAG_RPS_LT_FOLL),\n+};\n+\n+#define VAAPI_PICTURE_IS_IDR(picture) \\\n+    (VAAPI_PICTURE_FLAG_IS_SET(picture, VAAPI_PICTURE_FLAG_IDR))\n+\n+#define VAAPI_PICTURE_IS_SHORT_TERM_REFERENCE(picture)      \\\n+    ((VAAPI_PICTURE_FLAGS(picture) &                        \\\n+      VAAPI_PICTURE_FLAGS_REFERENCE) ==                     \\\n+     VAAPI_PICTURE_FLAG_SHORT_TERM_REFERENCE)\n+\n+#define VAAPI_PICTURE_IS_LONG_TERM_REFERENCE(picture)       \\\n+    ((VAAPI_PICTURE_FLAGS(picture) &                        \\\n+      VAAPI_PICTURE_FLAGS_REFERENCE) ==                     \\\n+     VAAPI_PICTURE_FLAG_LONG_TERM_REFERENCE)\n+\n+#define G_N_ELEMENTS(arr)\t\t(sizeof (arr) / sizeof ((arr)[0]))\n+\n+#define RSV_VCL_N10 10\n+#define RSV_VCL_N12 12\n+#define RSV_VCL_N14 14\n+VaapiH265FrameStore::VaapiH265FrameStore(PicturePtr& pic)\n+{\n+    buffer = pic;\n+}\n+\n+VaapiH265FrameStore::~VaapiH265FrameStore()\n+{\n+}\n+\n+VaapiDecoderH265::VaapiDecoderH265()\n+{\n+    m_flags = 0;\n+    m_dpb_count = 0;\n+    m_nalLengthSize = 4;\n+    m_new_bitstream = true;\n+    m_prev_nal_is_eos = false;\n+    m_currentPicture.reset();\n+}\n+\n+VaapiDecoderH265::~VaapiDecoderH265()\n+{\n+    stop();\n+}\n+Decode_Status VaapiDecoderH265::start(VideoConfigBuffer *buffer)\n+{\n+    Decode_Status status;\n+    buffer->profile = VAProfileHEVCMain;\n+    buffer->surfaceNumber = 30;\n+    m_configBuffer = *buffer;\n+\n+    /* check info and reset VA resource if necessary */\n+    status = ensureContext();\n+    return status;\n+}\n+\n+Decode_Status VaapiDecoderH265::reset(VideoConfigBuffer *buffer)\n+{\n+    return VaapiDecoderBase::reset(buffer);\n+}\n+\n+void VaapiDecoderH265::stop(void)\n+{\n+    VaapiDecoderBase::stop();\n+}\n+\n+void VaapiDecoderH265::flush(void)\n+{\n+    if (m_currentPicture) {\n+        m_currentPicture->decode();\n+        dpb_add (m_currentPicture,  &m_slice_hdr, NULL);\n+        m_currentPicture.reset();\n+    }\n+\n+    dpb_flush();\n+}\n+\n+Decode_Status VaapiDecoderH265::ensureContext()\n+{\n+    Decode_Status status;\n+    m_configBuffer.surfaceWidth = m_configBuffer.width;\n+    m_configBuffer.surfaceHeight = m_configBuffer.height;\n+    status = VaapiDecoderBase::start(&m_configBuffer);\n+    return status;\n+}\n+\n+static inline int32_t\n+scanForStartCode(const uint8_t * data,\n+                 uint32_t offset, uint32_t size, uint32_t * scp)\n+{\n+    uint32_t i;\n+    const uint8_t *buf;\n+\n+    if (offset + 3 > size)\n+        return -1;\n+\n+    for (i = 0; i < size - offset - 3 + 1; i++) {\n+        buf = data + offset + i;\n+        if (buf[0] == 0 && buf[1] == 0 && buf[2] == 1)\n+            return i;\n+    }\n+\n+    return -1;\n+}\n+\n+Decode_Status VaapiDecoderH265::decode(VideoDecodeBuffer * buffer)\n+{\n+    int32_t ofs = 0;\n+    H265NalUnit nalu;\n+    uint8_t *buf;\n+    uint32_t bufSize = 0;\n+    uint32_t i, naluSize, size;\n+    uint32_t startCode;\n+    bool isEOS = false;\n+    bool at_au_end = false;\n+    Decode_Status status = DECODE_SUCCESS;\n+\n+    buf = buffer->data;\n+    size = buffer->size;\n+\n+    if (buf == NULL && size == 0) {\n+        return DECODE_SUCCESS;\n+    }\n+\n+    do {\n+        if (size < 4) {\n+            break;\n+        }\n+        if (buffer->flag & IS_NAL_UNIT) {\n+            bufSize = buffer->size;\n+            size = 0;\n+        } else {\n+            /* skip the un-used bit before start code */\n+            ofs = scanForStartCode(buf, 0, size, &startCode);\n+            if (ofs < 0) {\n+                break;\n+            }\n+\n+            buf += ofs;\n+            size -= ofs;\n+\n+            /* find the length of the nal */\n+            ofs =\n+                (size < 7) ? -1 : scanForStartCode(buf, 3, size - 3, NULL);\n+            if (ofs < 0) {\n+                ofs = size - 3;\n+            }\n+\n+            bufSize = ofs + 3;\n+            size -= (ofs + 3);\n+\t      if (size < 4) {\n+                at_au_end = true;\n+\t      }\n+        }\n+\n+        h265_parser_identify_nalu_unchecked(&m_parser,\n+                                                     buf, 0, bufSize,\n+                                                     &nalu);\n+\n+        buf += bufSize;\n+        if (at_au_end) {\n+            m_flags |= VAAPI_DECODER_UNIT_FLAG_FRAME_END | VAAPI_DECODER_UNIT_FLAG_AU_END;\n+        }\n+\n+        status = decodeNalu(&nalu);\n+    } while (status == DECODE_SUCCESS);\n+\n+#if 0\n+    if (isEOS && status == DECODE_SUCCESS)\n+        status = decodeSequenceEnd();\n+\n+    if (status == DECODE_FORMAT_CHANGE && m_resetContext) {\n+        WARNING(\"H264 decoder format change happens\");\n+        m_resetContext = false;\n+    }\n+#endif\n+    return DECODE_SUCCESS;\n+}\n+\n+Decode_Status VaapiDecoderH265::decodeNalu(H265NalUnit *nalu)\n+{\n+    Decode_Status status = DECODE_SUCCESS;\n+\n+    switch (nalu->type) {\n+    case H265_NAL_SLICE_TRAIL_N:\n+    case H265_NAL_SLICE_TRAIL_R:\n+    case H265_NAL_SLICE_TSA_N:\n+    case H265_NAL_SLICE_TSA_R:\n+    case H265_NAL_SLICE_STSA_N:\n+    case H265_NAL_SLICE_STSA_R:\n+    case H265_NAL_SLICE_RADL_N:\n+    case H265_NAL_SLICE_RADL_R:\n+    case H265_NAL_SLICE_RASL_N:\n+    case H265_NAL_SLICE_RASL_R:\n+    case H265_NAL_SLICE_BLA_W_LP:\n+    case H265_NAL_SLICE_BLA_W_RADL:\n+    case H265_NAL_SLICE_BLA_N_LP:\n+    case H265_NAL_SLICE_IDR_W_RADL:\n+    case H265_NAL_SLICE_IDR_N_LP:\n+    case H265_NAL_SLICE_CRA_NUT:\n+        if (!m_gotSPS || !m_gotPPS)\n+            return DECODE_SUCCESS;\n+\n+        m_new_bitstream = false;\n+        m_prev_nal_is_eos = false;\n+        status = decodeSlice(nalu);\n+        break;\n+\n+    case H265_NAL_SPS:\n+        status = decodeSPS(nalu);\n+        break;\n+\n+    case H265_NAL_PPS:\n+        status = decodePPS(nalu);\n+        break;\n+\n+    case H265_NAL_PREFIX_SEI:\n+        status = decodeSEI(nalu);\n+        break;\n+\n+    case H265_NAL_SUFFIX_SEI:\n+    case H265_NAL_EOS:\n+        m_flags |= VAAPI_DECODER_UNIT_FLAG_FRAME_END;\n+        m_flags |= VAAPI_DECODER_UNIT_FLAG_AU_END;\n+        break;\n+\n+    case H265_NAL_VPS:\n+        break;\n+    default:\n+        WARNING(\"unsupported NAL unit type %d\", nalu->type);\n+        break;\n+    }\n+\n+    return status;\n+}\n+\n+uint32_t VaapiDecoderH265::get_slice_data_byte_offset (H265SliceHdr *slice_hdr, uint32_t nal_header_bytes)\n+{\n+    uint32_t epb_count;\n+    epb_count = slice_hdr->n_emulation_prevention_bytes;\n+\n+    return nal_header_bytes + (slice_hdr->header_size + 7) / 8 - epb_count;\n+}\n+\n+bool VaapiDecoderH265::fillPredWeightTable(VASliceParameterBufferHEVC*sliceParam)\n+{\n+    uint32_t i, j;\n+    sliceParam->luma_log2_weight_denom = 0;\n+    sliceParam->delta_chroma_log2_weight_denom = 0;\n+\n+    if (0) {\n+    }\n+    /* Fixme: Optimize */\n+    else {\n+        for (i = 0; i < 15; i++) {\n+            sliceParam->delta_luma_weight_l0[i] = 0;\n+            sliceParam->luma_offset_l0[i] = 0;\n+            sliceParam->delta_luma_weight_l1[i] = 0;\n+            sliceParam->luma_offset_l1[i] = 0;\n+        }\n+        for (i = 0; i < 15; i++) {\n+            for (j = 0; j < 2; j++) {\n+                sliceParam->delta_chroma_weight_l0[i][j] = 0;\n+                sliceParam->ChromaOffsetL0[i][j] = 0;\n+                sliceParam->delta_chroma_weight_l1[i][j] = 0;\n+                sliceParam->ChromaOffsetL1[i][j] = 0;\n+            }\n+        }\n+    }\n+    return true;\n+}\n+\n+void VaapiDecoderH265::vaapi_init_picture (VAPictureHEVC * pic)\n+{\n+    pic->pic_order_cnt = 0;\n+    pic->picture_id = VA_INVALID_SURFACE;\n+    pic->flags = VA_PICTURE_HEVC_INVALID;\n+}\n+\n+void VaapiDecoderH265::vaapi_fill_picture (VAPictureHEVC * pic, VaapiDecPictureH265 * picture,\n+    uint32_t pictureStructure)\n+{\n+\n+    if (!pictureStructure)\n+        pictureStructure = picture->m_structure;\n+\n+    pic->picture_id = picture->getSurfaceID();\n+    pic->pic_order_cnt = picture->m_poc;\n+    pic->flags = 0;\n+\n+    /* Set the VAPictureHEVC flags */\n+    if (VAAPI_PICTURE_IS_LONG_TERM_REFERENCE (picture))\n+        pic->flags |= VA_PICTURE_HEVC_LONG_TERM_REFERENCE;\n+\n+    if (VAAPI_PICTURE_FLAG_IS_SET (picture,\n+        VAAPI_PICTURE_FLAG_RPS_ST_CURR_BEFORE))\n+        pic->flags |= VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE;\n+\n+    else if (VAAPI_PICTURE_FLAG_IS_SET (picture,\n+        VAAPI_PICTURE_FLAG_RPS_ST_CURR_AFTER))\n+        pic->flags |= VA_PICTURE_HEVC_RPS_ST_CURR_AFTER;\n+\n+    else if (VAAPI_PICTURE_FLAG_IS_SET (picture,\n+        VAAPI_PICTURE_FLAG_RPS_LT_CURR))\n+        pic->flags |= VA_PICTURE_HEVC_RPS_LT_CURR;\n+\n+    switch (pictureStructure) {\n+    case VAAPI_PICTURE_STRUCTURE_FRAME:\n+        break;\n+    case VAAPI_PICTURE_STRUCTURE_TOP_FIELD:\n+        pic->flags |= VA_PICTURE_HEVC_FIELD_PIC;\n+        break;\n+    case VAAPI_PICTURE_STRUCTURE_BOTTOM_FIELD:\n+        pic->flags |= VA_PICTURE_HEVC_FIELD_PIC;\n+        pic->flags |= VA_PICTURE_HEVC_BOTTOM_FIELD;\n+        break;\n+    default:\n+        break;\n+    }\n+}\n+\n+uint32_t VaapiDecoderH265::get_index_for_RefPicListX (VAPictureHEVC * ReferenceFrames,\n+    VaapiDecPictureH265 * pic)\n+{\n+  int32_t i;\n+\n+  for (i = 0; i < 15; i++) {\n+    if ((ReferenceFrames[i].picture_id != VA_INVALID_ID) && pic) {\n+      if ((ReferenceFrames[i].pic_order_cnt == pic->m_poc) &&\n+          (ReferenceFrames[i].picture_id == pic->getSurfaceID())) {\n+        return i;\n+      }\n+    }\n+  }\n+  return 0xff;\n+}\n+\n+bool VaapiDecoderH265::fillSlice(VaapiDecPictureH265 * picture, VASliceParameterBufferHEVC* sliceParam, H265SliceHdr * sliceHdr,\n+                                 H265NalUnit * nalu)\n+{\n+    /* Fill in VASliceParameterBufferHEVC */\n+    sliceParam->LongSliceFlags.value = 0;\n+    sliceParam->slice_data_byte_offset =\n+    get_slice_data_byte_offset (sliceHdr, nalu->header_bytes);\n+\n+    sliceParam->slice_segment_address = sliceHdr->segment_address;\n+\n+    #define COPY_LFF(f) \\\n+    sliceParam->LongSliceFlags.fields.f = (sliceHdr)->f\n+\n+    if (VAAPI_PICTURE_FLAG_IS_SET (picture, VAAPI_PICTURE_FLAG_AU_END)) {\n+        sliceParam->LongSliceFlags.fields.LastSliceOfPic = 1;\n+    }\n+    else {\n+        sliceParam->LongSliceFlags.fields.LastSliceOfPic = 0;\n+    }\n+\n+    COPY_LFF (dependent_slice_segment_flag);\n+\n+    /* use most recent independent slice segment header syntax elements\n+    * for filling the missing fields in dependent slice segment header */\n+    if (sliceHdr->dependent_slice_segment_flag)\n+        sliceHdr = m_prev_independent_slice;\n+\n+    COPY_LFF (mvd_l1_zero_flag);\n+    COPY_LFF (cabac_init_flag);\n+    COPY_LFF (collocated_from_l0_flag);\n+    sliceParam->LongSliceFlags.fields.color_plane_id =\n+    sliceHdr->colour_plane_id;\n+    sliceParam->LongSliceFlags.fields.slice_type = sliceHdr->type;\n+    sliceParam->LongSliceFlags.fields.slice_sao_luma_flag =\n+    sliceHdr->sao_luma_flag;\n+    sliceParam->LongSliceFlags.fields.slice_sao_chroma_flag =\n+    sliceHdr->sao_chroma_flag;\n+    sliceParam->LongSliceFlags.fields.slice_temporal_mvp_enabled_flag =\n+    sliceHdr->temporal_mvp_enabled_flag;\n+    sliceParam->LongSliceFlags.fields.slice_deblocking_filter_disabled_flag =\n+    sliceHdr->deblocking_filter_disabled_flag;\n+    sliceParam->LongSliceFlags.\n+    fields.slice_loop_filter_across_slices_enabled_flag =\n+    sliceHdr->loop_filter_across_slices_enabled_flag;\n+\n+    if (!sliceHdr->temporal_mvp_enabled_flag)\n+        sliceParam->collocated_ref_idx = 0xFF;\n+    else\n+        sliceParam->collocated_ref_idx = sliceHdr->collocated_ref_idx;\n+\n+    sliceParam->num_ref_idx_l0_active_minus1 =\n+    sliceHdr->num_ref_idx_l0_active_minus1;\n+    sliceParam->num_ref_idx_l1_active_minus1 =\n+    sliceHdr->num_ref_idx_l1_active_minus1;\n+    sliceParam->slice_qp_delta = sliceHdr->qp_delta;\n+    sliceParam->slice_cb_qp_offset = sliceHdr->cb_qp_offset;\n+    sliceParam->slice_cr_qp_offset = sliceHdr->cr_qp_offset;\n+    sliceParam->slice_beta_offset_div2 = sliceHdr->beta_offset_div2;\n+    sliceParam->slice_tc_offset_div2 = sliceHdr->tc_offset_div2;\n+    sliceParam->five_minus_max_num_merge_cand =\n+    sliceHdr->five_minus_max_num_merge_cand;\n+\n+    if (!fill_RefPicList(picture, sliceParam, sliceHdr)) {\n+        return false;\n+    }\n+    if (!fillPredWeightTable (sliceParam)) {\n+        return false;\n+    }\n+    return true;\n+}\n+\n+bool VaapiDecoderH265::fillPicture(PicturePtr& picture, H265NalUnit * nalu)\n+{\n+    uint32_t i, n;\n+    H265PPS *const pps = &m_lastPPS;\n+    H265SPS *const sps = &m_lastSPS;\n+    VAPictureParameterBufferHEVC *pic_param;\n+    if (!picture->editPicture(pic_param)) {\n+        return false;\n+    }\n+\n+    picture->m_param = pic_param;\n+\n+    /* Fill in VAPictureParameterBufferH264 */\n+    pic_param->pic_fields.value = 0;\n+    pic_param->slice_parsing_fields.value = 0;\n+\n+    /* Fill in VAPictureHEVC */\n+    vaapi_fill_picture (&pic_param->CurrPic, picture.get(), 0);\n+\n+    /* Fill in ReferenceFrames */\n+    for (i = 0, n = 0; i < m_dpb_count; i++) {\n+\n+        VaapiH265FrameStore::Ptr& fs = m_dpb[i];\n+        if ((fs && vaapi_frame_store_has_reference (fs))) {\n+            vaapi_fill_picture (&pic_param->ReferenceFrames[n++], fs->buffer.get(),\n+            fs->buffer->m_structure);\n+        }\n+\n+        if (n >= G_N_ELEMENTS (pic_param->ReferenceFrames))\n+            break;\n+    }\n+\n+    for (; n < G_N_ELEMENTS (pic_param->ReferenceFrames); n++)\n+        vaapi_init_picture (&pic_param->ReferenceFrames[n]);\n+\n+    #define COPY_FIELD(s, f) \\\n+    pic_param->f = (s)->f\n+    #define COPY_BFM(a, s, f) \\\n+    pic_param->a.bits.f = (s)->f\n+\n+    COPY_FIELD (sps, pic_width_in_luma_samples);\n+    COPY_FIELD (sps, pic_height_in_luma_samples);\n+    COPY_BFM (pic_fields, sps, chroma_format_idc);\n+    COPY_BFM (pic_fields, sps, separate_colour_plane_flag);\n+    COPY_BFM (pic_fields, sps, pcm_enabled_flag);\n+    COPY_BFM (pic_fields, sps, scaling_list_enabled_flag);\n+    COPY_BFM (pic_fields, pps, transform_skip_enabled_flag);\n+    COPY_BFM (pic_fields, sps, amp_enabled_flag);\n+    COPY_BFM (pic_fields, sps, strong_intra_smoothing_enabled_flag);\n+    COPY_BFM (pic_fields, pps, sign_data_hiding_enabled_flag);\n+    COPY_BFM (pic_fields, pps, constrained_intra_pred_flag);\n+    COPY_BFM (pic_fields, pps, cu_qp_delta_enabled_flag);\n+    COPY_BFM (pic_fields, pps, weighted_pred_flag);\n+    COPY_BFM (pic_fields, pps, weighted_bipred_flag);\n+    COPY_BFM (pic_fields, pps, transquant_bypass_enabled_flag);\n+    COPY_BFM (pic_fields, pps, tiles_enabled_flag);\n+    COPY_BFM (pic_fields, pps, entropy_coding_sync_enabled_flag);\n+    pic_param->pic_fields.bits.pps_loop_filter_across_slices_enabled_flag =\n+    pps->loop_filter_across_slices_enabled_flag;\n+    COPY_BFM (pic_fields, pps, loop_filter_across_tiles_enabled_flag);\n+    COPY_BFM (pic_fields, sps, pcm_loop_filter_disabled_flag);\n+    /* Fix: Assign value based on sps_max_num_reorder_pics */\n+    pic_param->pic_fields.bits.NoPicReorderingFlag = 0;\n+    /* Fix: Enable if picture has no B slices */\n+    pic_param->pic_fields.bits.NoBiPredFlag = 0;\n+\n+    pic_param->sps_max_dec_pic_buffering_minus1 =\n+    sps->max_dec_pic_buffering_minus1[0];\n+    COPY_FIELD (sps, bit_depth_luma_minus8);\n+    COPY_FIELD (sps, bit_depth_chroma_minus8);\n+    COPY_FIELD (sps, pcm_sample_bit_depth_luma_minus1);\n+    COPY_FIELD (sps, pcm_sample_bit_depth_chroma_minus1);\n+    COPY_FIELD (sps, log2_min_luma_coding_block_size_minus3);\n+    COPY_FIELD (sps, log2_diff_max_min_luma_coding_block_size);\n+    COPY_FIELD (sps, log2_min_transform_block_size_minus2);\n+    COPY_FIELD (sps, log2_diff_max_min_transform_block_size);\n+    COPY_FIELD (sps, log2_min_pcm_luma_coding_block_size_minus3);\n+    COPY_FIELD (sps, log2_diff_max_min_pcm_luma_coding_block_size);\n+    COPY_FIELD (sps, max_transform_hierarchy_depth_intra);\n+    COPY_FIELD (sps, max_transform_hierarchy_depth_inter);\n+    COPY_FIELD (pps, init_qp_minus26);\n+    COPY_FIELD (pps, diff_cu_qp_delta_depth);\n+    pic_param->pps_cb_qp_offset = pps->cb_qp_offset;\n+    pic_param->pps_cr_qp_offset = pps->cr_qp_offset;\n+    COPY_FIELD (pps, log2_parallel_merge_level_minus2);\n+    COPY_FIELD (pps, num_tile_columns_minus1);\n+    COPY_FIELD (pps, num_tile_rows_minus1);\n+    for (i = 0; i <= pps->num_tile_columns_minus1; i++)\n+        pic_param->column_width_minus1[i] = pps->column_width_minus1[i];\n+    for (; i < 19; i++)\n+        pic_param->column_width_minus1[i] = 0;\n+    for (i = 0; i <= pps->num_tile_rows_minus1; i++)\n+        pic_param->row_height_minus1[i] = pps->row_height_minus1[i];\n+    for (; i < 21; i++)\n+        pic_param->row_height_minus1[i] = 0;\n+\n+    COPY_BFM (slice_parsing_fields, pps, lists_modification_present_flag);\n+    COPY_BFM (slice_parsing_fields, sps, long_term_ref_pics_present_flag);\n+    pic_param->slice_parsing_fields.bits.sps_temporal_mvp_enabled_flag =\n+    sps->temporal_mvp_enabled_flag;\n+    COPY_BFM (slice_parsing_fields, pps, cabac_init_present_flag);\n+    COPY_BFM (slice_parsing_fields, pps, output_flag_present_flag);\n+    COPY_BFM (slice_parsing_fields, pps, dependent_slice_segments_enabled_flag);\n+    pic_param->slice_parsing_fields.\n+    bits.pps_slice_chroma_qp_offsets_present_flag =\n+    pps->slice_chroma_qp_offsets_present_flag;\n+    COPY_BFM (slice_parsing_fields, sps, sample_adaptive_offset_enabled_flag);\n+    COPY_BFM (slice_parsing_fields, pps, deblocking_filter_override_enabled_flag);\n+    pic_param->slice_parsing_fields.bits.pps_disable_deblocking_filter_flag =\n+    pps->deblocking_filter_disabled_flag;\n+    COPY_BFM (slice_parsing_fields, pps,\n+    slice_segment_header_extension_present_flag);\n+    pic_param->slice_parsing_fields.bits.RapPicFlag = picture->m_RapPicFlag;\n+    pic_param->slice_parsing_fields.bits.IdrPicFlag = VAAPI_PICTURE_FLAG_IS_SET (picture, VAAPI_PICTURE_FLAG_IDR);\n+    pic_param->slice_parsing_fields.bits.IntraPicFlag = picture->m_IntraPicFlag;\n+\n+    COPY_FIELD (sps, log2_max_pic_order_cnt_lsb_minus4);\n+    COPY_FIELD (sps, num_short_term_ref_pic_sets);\n+    pic_param->num_long_term_ref_pic_sps = sps->num_long_term_ref_pics_sps;\n+    COPY_FIELD (pps, num_ref_idx_l0_default_active_minus1);\n+    COPY_FIELD (pps, num_ref_idx_l1_default_active_minus1);\n+    pic_param->pps_beta_offset_div2 = pps->beta_offset_div2;\n+    pic_param->pps_tc_offset_div2 = pps->tc_offset_div2;\n+    COPY_FIELD (pps, num_extra_slice_header_bits);\n+\n+    /*Fixme: Set correct value as mentioned in va_dec_hevc.h */\n+    pic_param->st_rps_bits = 0;\n+\n+    return true;\n+}\n+\n+void VaapiDecoderH265::fill_iq_matrix_4x4 (VAIQMatrixBufferHEVC * iq_matrix,\n+    H265ScalingList * scaling_list)\n+{\n+    uint32_t i;\n+    for (i = 0; i < G_N_ELEMENTS (iq_matrix->ScalingList4x4); i++) {\n+        h265_quant_matrix_4x4_get_raster_from_zigzag (iq_matrix->ScalingList4x4\n+        [i], scaling_list->scaling_lists_4x4[i]);\n+    }\n+}\n+\n+void VaapiDecoderH265::fill_iq_matrix_8x8 (VAIQMatrixBufferHEVC * iq_matrix,\n+    H265ScalingList * scaling_list)\n+{\n+    uint32_t i;\n+\n+    for (i = 0; i < G_N_ELEMENTS (iq_matrix->ScalingList8x8); i++) {\n+        h265_quant_matrix_8x8_get_raster_from_zigzag (iq_matrix->ScalingList8x8\n+        [i], scaling_list->scaling_lists_8x8[i]);\n+    }\n+}\n+\n+void VaapiDecoderH265::fill_iq_matrix_16x16 (VAIQMatrixBufferHEVC * iq_matrix,\n+    H265ScalingList * scaling_list)\n+{\n+    uint32_t i;\n+\n+    for (i = 0; i < G_N_ELEMENTS (iq_matrix->ScalingList16x16); i++) {\n+        h265_quant_matrix_16x16_get_raster_from_zigzag\n+        (iq_matrix->ScalingList16x16[i], scaling_list->scaling_lists_16x16[i]);\n+    }\n+}\n+\n+void VaapiDecoderH265::fill_iq_matrix_32x32 (VAIQMatrixBufferHEVC * iq_matrix,\n+    H265ScalingList * scaling_list)\n+{\n+    uint32_t i;\n+    for (i = 0; i < G_N_ELEMENTS (iq_matrix->ScalingList32x32); i++) {\n+        h265_quant_matrix_32x32_get_raster_from_zigzag\n+        (iq_matrix->ScalingList32x32[i], scaling_list->scaling_lists_32x32[i]);\n+    }\n+}\n+\n+void VaapiDecoderH265::fill_iq_matrix_dc_16x16 (VAIQMatrixBufferHEVC * iq_matrix,\n+    H265ScalingList * scaling_list)\n+{\n+    uint32_t i;\n+\n+    for (i = 0; i < 6; i++)\n+        iq_matrix->ScalingListDC16x16[i] =\n+        scaling_list->scaling_list_dc_coef_minus8_16x16[i] + 8;\n+}\n+\n+void VaapiDecoderH265::fill_iq_matrix_dc_32x32 (VAIQMatrixBufferHEVC * iq_matrix,\n+    H265ScalingList * scaling_list)\n+{\n+    uint32_t i;\n+\n+    for (i = 0; i < 2; i++)\n+        iq_matrix->ScalingListDC32x32[i] =\n+        scaling_list->scaling_list_dc_coef_minus8_32x32[i] + 8;\n+}\n+\n+/* fill slice parameter buffers functions*/\n+bool VaapiDecoderH265::ensureQuantMatrix(PicturePtr& pic)\n+{\n+    H265PPS *const pps = &m_lastPPS;\n+    H265SPS *const sps = &m_lastSPS;\n+    H265ScalingList *scaling_list = NULL;\n+    VAIQMatrixBufferHEVC *iq_matrix;\n+\n+    if (pps &&\n+       (pps->scaling_list_data_present_flag ||\n+          (sps->scaling_list_enabled_flag\n+              && !sps->scaling_list_data_present_flag)))\n+        scaling_list = &pps->scaling_list;\n+    else if (sps && sps->scaling_list_enabled_flag\n+      && sps->scaling_list_data_present_flag)\n+        scaling_list = &sps->scaling_list;\n+    else\n+        return true;\n+\n+    if (!pic->editIqMatrix(iq_matrix))\n+        return false;\n+\n+    /* Only supporting 4:2:0 */\n+    if (sps->chroma_format_idc != 1)\n+        return false;\n+\n+    fill_iq_matrix_4x4 (iq_matrix, scaling_list);\n+    fill_iq_matrix_8x8 (iq_matrix, scaling_list);\n+    fill_iq_matrix_16x16 (iq_matrix, scaling_list);\n+    fill_iq_matrix_32x32 (iq_matrix, scaling_list);\n+    fill_iq_matrix_dc_16x16 (iq_matrix, scaling_list);\n+    fill_iq_matrix_dc_32x32 (iq_matrix, scaling_list);\n+    return true;\n+}\n+\n+bool\n+nal_is_idr (uint8_t nal_type)\n+{\n+    if ((nal_type == H265_NAL_SLICE_IDR_W_RADL) ||\n+        (nal_type == H265_NAL_SLICE_IDR_N_LP))\n+        return true;\n+    return false;\n+}\n+\n+bool\n+nal_is_irap (uint8_t nal_type)\n+{\n+    if ((nal_type >= H265_NAL_SLICE_BLA_W_LP) &&\n+        (nal_type <= RESERVED_IRAP_NAL_TYPE_MAX))\n+        return true;\n+    return false;\n+}\n+\n+bool\n+nal_is_bla (uint8_t nal_type)\n+{\n+    if ((nal_type >= H265_NAL_SLICE_BLA_W_LP) &&\n+        (nal_type <= H265_NAL_SLICE_BLA_N_LP))\n+        return true;\n+    return false;\n+}\n+\n+bool\n+nal_is_cra (uint8_t nal_type)\n+{\n+    if (nal_type == H265_NAL_SLICE_CRA_NUT)\n+        return true;\n+    return false;\n+}\n+\n+bool\n+nal_is_radl (uint8_t nal_type)\n+{\n+    if ((nal_type >= H265_NAL_SLICE_RADL_N) &&\n+        (nal_type <= H265_NAL_SLICE_RADL_R))\n+        return true;\n+    return false;\n+}\n+\n+bool\n+nal_is_rasl (uint8_t nal_type)\n+{\n+  if ((nal_type >= H265_NAL_SLICE_RASL_N) &&\n+      (nal_type <= H265_NAL_SLICE_RASL_R))\n+    return true;\n+  return false;\n+}\n+\n+bool\n+nal_is_slice (uint8_t nal_type)\n+{\n+  if ((nal_type >= H265_NAL_SLICE_TRAIL_N) &&\n+      (nal_type <= H265_NAL_SLICE_CRA_NUT))\n+    return true;\n+  return false;\n+}\n+\n+bool\n+nal_is_ref (uint8_t nal_type)\n+{\n+    bool ret = false;\n+    switch (nal_type) {\n+    case H265_NAL_SLICE_TRAIL_N:\n+    case H265_NAL_SLICE_TSA_N:\n+    case H265_NAL_SLICE_STSA_N:\n+    case H265_NAL_SLICE_RADL_N:\n+    case H265_NAL_SLICE_RASL_N:\n+    case RSV_VCL_N10:\n+    case RSV_VCL_N12:\n+    case RSV_VCL_N14:\n+        ret = false;\n+        break;\n+    default:\n+        ret = true;\n+        break;\n+    }\n+    return ret;\n+}\n+\n+/* Get number of reference frames to use */\n+uint32_t VaapiDecoderH265::get_max_dec_frame_buffering (H265SPS * sps)\n+{\n+  /* Fixme: Add limit check based on Annex A */\n+  return MAX (1, (sps->max_dec_pic_buffering_minus1[0] + 1));\n+}\n+\n+Decode_Status VaapiDecoderH265::ensure_dpb (H265SPS * sps)\n+{\n+    uint32_t dpb_size;\n+    dpb_size = get_max_dec_frame_buffering (sps);\n+    if (m_dpb_size < dpb_size) {\n+    }\n+\n+    /* Reset DPB */\n+    if (!dpb_reset (dpb_size))\n+        return DECODE_FAIL;\n+\n+    return DECODE_SUCCESS;\n+}\n+\n+/* 8.3.1 - Decoding process for picture order count */\n+void VaapiDecoderH265::init_picture_poc (PicturePtr& picture, H265SliceHdr *slice_hdr, H265NalUnit * nalu)\n+{\n+    H265PPS *const pps = slice_hdr->pps;\n+    H265SPS *const sps = pps->sps;\n+\n+    const uint32_t MaxPicOrderCntLsb =\n+    1 << (sps->log2_max_pic_order_cnt_lsb_minus4 + 4);\n+    uint8_t nal_type = nalu->type;\n+    uint8_t temporal_id = nalu->temporal_id_plus1 - 1;\n+\n+    m_prev_poc_lsb = m_poc_lsb;\n+    m_prev_poc_msb = m_poc_msb;\n+\n+    if (!(nal_is_irap (nal_type) && picture->m_NoRaslOutputFlag)) {\n+        m_prev_poc_lsb = m_prev_tid0pic_poc_lsb;\n+        m_prev_poc_msb = m_prev_tid0pic_poc_msb;\n+    }\n+\n+    /* Finding PicOrderCntMsb */\n+    if (nal_is_irap (nal_type) && picture->m_NoRaslOutputFlag)\n+        m_poc_msb = 0;\n+    else {\n+        /* (8-1) */\n+        if ((slice_hdr->pic_order_cnt_lsb < m_prev_poc_lsb) &&\n+           ((m_prev_poc_lsb - slice_hdr->pic_order_cnt_lsb) >=\n+            (MaxPicOrderCntLsb / 2)))\n+            m_poc_msb = m_prev_poc_msb + MaxPicOrderCntLsb;\n+\n+        else if ((slice_hdr->pic_order_cnt_lsb > m_prev_poc_lsb) &&\n+            ((slice_hdr->pic_order_cnt_lsb - m_prev_poc_lsb) >\n+            (MaxPicOrderCntLsb / 2)))\n+            m_poc_msb = m_prev_poc_msb - MaxPicOrderCntLsb;\n+        else\n+            m_poc_msb = m_prev_poc_msb;\n+    }\n+\n+    /* (8-2) */\n+    m_poc = picture->m_poc = m_poc_msb + slice_hdr->pic_order_cnt_lsb;\n+    m_poc_lsb = picture->m_poc_lsb = slice_hdr->pic_order_cnt_lsb;\n+\n+    if (nal_is_idr (nal_type)) {\n+        picture->m_poc = 0;\n+        picture->m_poc_lsb = 0;\n+        m_poc_lsb = 0;\n+        m_poc_msb = 0;\n+        m_prev_poc_lsb = 0;\n+        m_prev_poc_msb = 0;\n+        m_prev_tid0pic_poc_lsb = 0;\n+        m_prev_tid0pic_poc_msb = 0;\n+    }\n+\n+    if (!temporal_id && !nal_is_rasl (nal_type) &&\n+    !nal_is_radl (nal_type) && nal_is_ref (nal_type)) {\n+        m_prev_tid0pic_poc_lsb = slice_hdr->pic_order_cnt_lsb;\n+        m_prev_tid0pic_poc_msb = m_poc_msb;\n+    }\n+}\n+\n+void VaapiDecoderH265::vaapi_picture_h265_set_reference(VaapiDecPictureH265* picture, uint32_t referenceFlags)\n+{\n+    VAAPI_PICTURE_FLAG_UNSET(picture, VAAPI_PICTURE_FLAGS_RPS_ST | VAAPI_PICTURE_FLAGS_RPS_LT);\n+    VAAPI_PICTURE_FLAG_UNSET(picture, VAAPI_PICTURE_FLAGS_REFERENCE);\n+    VAAPI_PICTURE_FLAG_SET(picture, referenceFlags);\n+}\n+\n+\n+/* Get the dpb picture having the specifed poc or poc_lsb */\n+VaapiDecPictureH265 *VaapiDecoderH265::dpb_get_picture (int32_t poc, bool match_lsb)","path":"decoder/vaapidecoder_h265.cpp","position":891,"original_position":891,"commit_id":"1337e3a624ec817814bb1d1e10f1c1b454a098d5","original_commit_id":"1337e3a624ec817814bb1d1e10f1c1b454a098d5","user":{"login":"xuguangxin","id":6667546,"avatar_url":"https://avatars.githubusercontent.com/u/6667546?v=3","gravatar_id":"","url":"https://api.github.com/users/xuguangxin","html_url":"https://github.com/xuguangxin","followers_url":"https://api.github.com/users/xuguangxin/followers","following_url":"https://api.github.com/users/xuguangxin/following{/other_user}","gists_url":"https://api.github.com/users/xuguangxin/gists{/gist_id}","starred_url":"https://api.github.com/users/xuguangxin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xuguangxin/subscriptions","organizations_url":"https://api.github.com/users/xuguangxin/orgs","repos_url":"https://api.github.com/users/xuguangxin/repos","events_url":"https://api.github.com/users/xuguangxin/events{/privacy}","received_events_url":"https://api.github.com/users/xuguangxin/received_events","type":"User","site_admin":false},"body":"Try use a nest class for all dpb.\r\nYou can refer to https://github.com/xuguangxin/libyami/blob/grid/examples/grid.cpp. Flipper is a nest class of DrmRenderer","created_at":"2015-07-03T05:48:27Z","updated_at":"2015-07-03T05:48:27Z","html_url":"https://github.com/01org/libyami/pull/253#discussion_r33841690","pull_request_url":"https://api.github.com/repos/01org/libyami/pulls/253","_links":{"self":{"href":"https://api.github.com/repos/01org/libyami/pulls/comments/33841690"},"html":{"href":"https://github.com/01org/libyami/pull/253#discussion_r33841690"},"pull_request":{"href":"https://api.github.com/repos/01org/libyami/pulls/253"}}},"pull_request":{"url":"https://api.github.com/repos/01org/libyami/pulls/253","id":39056157,"html_url":"https://github.com/01org/libyami/pull/253","diff_url":"https://github.com/01org/libyami/pull/253.diff","patch_url":"https://github.com/01org/libyami/pull/253.patch","issue_url":"https://api.github.com/repos/01org/libyami/issues/253","number":253,"state":"open","locked":false,"title":"Initial version for H265 decoder.","user":{"login":"YuJiankang","id":10542940,"avatar_url":"https://avatars.githubusercontent.com/u/10542940?v=3","gravatar_id":"","url":"https://api.github.com/users/YuJiankang","html_url":"https://github.com/YuJiankang","followers_url":"https://api.github.com/users/YuJiankang/followers","following_url":"https://api.github.com/users/YuJiankang/following{/other_user}","gists_url":"https://api.github.com/users/YuJiankang/gists{/gist_id}","starred_url":"https://api.github.com/users/YuJiankang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YuJiankang/subscriptions","organizations_url":"https://api.github.com/users/YuJiankang/orgs","repos_url":"https://api.github.com/users/YuJiankang/repos","events_url":"https://api.github.com/users/YuJiankang/events{/privacy}","received_events_url":"https://api.github.com/users/YuJiankang/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-02T07:47:56Z","updated_at":"2015-07-03T05:48:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e921050b8b4381de6a769cd3acc11f464ad60691","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/01org/libyami/pulls/253/commits","review_comments_url":"https://api.github.com/repos/01org/libyami/pulls/253/comments","review_comment_url":"https://api.github.com/repos/01org/libyami/pulls/comments{/number}","comments_url":"https://api.github.com/repos/01org/libyami/issues/253/comments","statuses_url":"https://api.github.com/repos/01org/libyami/statuses/1337e3a624ec817814bb1d1e10f1c1b454a098d5","head":{"label":"YuJiankang:master","ref":"master","sha":"1337e3a624ec817814bb1d1e10f1c1b454a098d5","user":{"login":"YuJiankang","id":10542940,"avatar_url":"https://avatars.githubusercontent.com/u/10542940?v=3","gravatar_id":"","url":"https://api.github.com/users/YuJiankang","html_url":"https://github.com/YuJiankang","followers_url":"https://api.github.com/users/YuJiankang/followers","following_url":"https://api.github.com/users/YuJiankang/following{/other_user}","gists_url":"https://api.github.com/users/YuJiankang/gists{/gist_id}","starred_url":"https://api.github.com/users/YuJiankang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YuJiankang/subscriptions","organizations_url":"https://api.github.com/users/YuJiankang/orgs","repos_url":"https://api.github.com/users/YuJiankang/repos","events_url":"https://api.github.com/users/YuJiankang/events{/privacy}","received_events_url":"https://api.github.com/users/YuJiankang/received_events","type":"User","site_admin":false},"repo":{"id":30283674,"name":"libyami","full_name":"YuJiankang/libyami","owner":{"login":"YuJiankang","id":10542940,"avatar_url":"https://avatars.githubusercontent.com/u/10542940?v=3","gravatar_id":"","url":"https://api.github.com/users/YuJiankang","html_url":"https://github.com/YuJiankang","followers_url":"https://api.github.com/users/YuJiankang/followers","following_url":"https://api.github.com/users/YuJiankang/following{/other_user}","gists_url":"https://api.github.com/users/YuJiankang/gists{/gist_id}","starred_url":"https://api.github.com/users/YuJiankang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YuJiankang/subscriptions","organizations_url":"https://api.github.com/users/YuJiankang/orgs","repos_url":"https://api.github.com/users/YuJiankang/repos","events_url":"https://api.github.com/users/YuJiankang/events{/privacy}","received_events_url":"https://api.github.com/users/YuJiankang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/YuJiankang/libyami","description":"Yet Another Media Infrastructure. it is core part of media codec with hardware acceleration, it is yummy to your video experience on Linux like platform.","fork":true,"url":"https://api.github.com/repos/YuJiankang/libyami","forks_url":"https://api.github.com/repos/YuJiankang/libyami/forks","keys_url":"https://api.github.com/repos/YuJiankang/libyami/keys{/key_id}","collaborators_url":"https://api.github.com/repos/YuJiankang/libyami/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/YuJiankang/libyami/teams","hooks_url":"https://api.github.com/repos/YuJiankang/libyami/hooks","issue_events_url":"https://api.github.com/repos/YuJiankang/libyami/issues/events{/number}","events_url":"https://api.github.com/repos/YuJiankang/libyami/events","assignees_url":"https://api.github.com/repos/YuJiankang/libyami/assignees{/user}","branches_url":"https://api.github.com/repos/YuJiankang/libyami/branches{/branch}","tags_url":"https://api.github.com/repos/YuJiankang/libyami/tags","blobs_url":"https://api.github.com/repos/YuJiankang/libyami/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/YuJiankang/libyami/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/YuJiankang/libyami/git/refs{/sha}","trees_url":"https://api.github.com/repos/YuJiankang/libyami/git/trees{/sha}","statuses_url":"https://api.github.com/repos/YuJiankang/libyami/statuses/{sha}","languages_url":"https://api.github.com/repos/YuJiankang/libyami/languages","stargazers_url":"https://api.github.com/repos/YuJiankang/libyami/stargazers","contributors_url":"https://api.github.com/repos/YuJiankang/libyami/contributors","subscribers_url":"https://api.github.com/repos/YuJiankang/libyami/subscribers","subscription_url":"https://api.github.com/repos/YuJiankang/libyami/subscription","commits_url":"https://api.github.com/repos/YuJiankang/libyami/commits{/sha}","git_commits_url":"https://api.github.com/repos/YuJiankang/libyami/git/commits{/sha}","comments_url":"https://api.github.com/repos/YuJiankang/libyami/comments{/number}","issue_comment_url":"https://api.github.com/repos/YuJiankang/libyami/issues/comments{/number}","contents_url":"https://api.github.com/repos/YuJiankang/libyami/contents/{+path}","compare_url":"https://api.github.com/repos/YuJiankang/libyami/compare/{base}...{head}","merges_url":"https://api.github.com/repos/YuJiankang/libyami/merges","archive_url":"https://api.github.com/repos/YuJiankang/libyami/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/YuJiankang/libyami/downloads","issues_url":"https://api.github.com/repos/YuJiankang/libyami/issues{/number}","pulls_url":"https://api.github.com/repos/YuJiankang/libyami/pulls{/number}","milestones_url":"https://api.github.com/repos/YuJiankang/libyami/milestones{/number}","notifications_url":"https://api.github.com/repos/YuJiankang/libyami/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/YuJiankang/libyami/labels{/name}","releases_url":"https://api.github.com/repos/YuJiankang/libyami/releases{/id}","created_at":"2015-02-04T05:46:09Z","updated_at":"2015-04-23T05:58:42Z","pushed_at":"2015-07-02T08:22:48Z","git_url":"git://github.com/YuJiankang/libyami.git","ssh_url":"git@github.com:YuJiankang/libyami.git","clone_url":"https://github.com/YuJiankang/libyami.git","svn_url":"https://github.com/YuJiankang/libyami","homepage":null,"size":1780,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"01org:master","ref":"master","sha":"e741c4b35ea3d39f5f8d629d1999c9d78f9f2315","user":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"repo":{"id":18320220,"name":"libyami","full_name":"01org/libyami","owner":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/01org/libyami","description":"Yet Another Media Infrastructure. it is core part of media codec with hardware acceleration, it is yummy to your video experience on Linux like platform.","fork":false,"url":"https://api.github.com/repos/01org/libyami","forks_url":"https://api.github.com/repos/01org/libyami/forks","keys_url":"https://api.github.com/repos/01org/libyami/keys{/key_id}","collaborators_url":"https://api.github.com/repos/01org/libyami/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/01org/libyami/teams","hooks_url":"https://api.github.com/repos/01org/libyami/hooks","issue_events_url":"https://api.github.com/repos/01org/libyami/issues/events{/number}","events_url":"https://api.github.com/repos/01org/libyami/events","assignees_url":"https://api.github.com/repos/01org/libyami/assignees{/user}","branches_url":"https://api.github.com/repos/01org/libyami/branches{/branch}","tags_url":"https://api.github.com/repos/01org/libyami/tags","blobs_url":"https://api.github.com/repos/01org/libyami/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/01org/libyami/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/01org/libyami/git/refs{/sha}","trees_url":"https://api.github.com/repos/01org/libyami/git/trees{/sha}","statuses_url":"https://api.github.com/repos/01org/libyami/statuses/{sha}","languages_url":"https://api.github.com/repos/01org/libyami/languages","stargazers_url":"https://api.github.com/repos/01org/libyami/stargazers","contributors_url":"https://api.github.com/repos/01org/libyami/contributors","subscribers_url":"https://api.github.com/repos/01org/libyami/subscribers","subscription_url":"https://api.github.com/repos/01org/libyami/subscription","commits_url":"https://api.github.com/repos/01org/libyami/commits{/sha}","git_commits_url":"https://api.github.com/repos/01org/libyami/git/commits{/sha}","comments_url":"https://api.github.com/repos/01org/libyami/comments{/number}","issue_comment_url":"https://api.github.com/repos/01org/libyami/issues/comments{/number}","contents_url":"https://api.github.com/repos/01org/libyami/contents/{+path}","compare_url":"https://api.github.com/repos/01org/libyami/compare/{base}...{head}","merges_url":"https://api.github.com/repos/01org/libyami/merges","archive_url":"https://api.github.com/repos/01org/libyami/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/01org/libyami/downloads","issues_url":"https://api.github.com/repos/01org/libyami/issues{/number}","pulls_url":"https://api.github.com/repos/01org/libyami/pulls{/number}","milestones_url":"https://api.github.com/repos/01org/libyami/milestones{/number}","notifications_url":"https://api.github.com/repos/01org/libyami/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/01org/libyami/labels{/name}","releases_url":"https://api.github.com/repos/01org/libyami/releases{/id}","created_at":"2014-04-01T06:44:19Z","updated_at":"2015-07-03T01:36:14Z","pushed_at":"2015-07-03T02:30:14Z","git_url":"git://github.com/01org/libyami.git","ssh_url":"git@github.com:01org/libyami.git","clone_url":"https://github.com/01org/libyami.git","svn_url":"https://github.com/01org/libyami","homepage":null,"size":4707,"stargazers_count":16,"watchers_count":16,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":19,"forks":27,"open_issues":19,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/01org/libyami/pulls/253"},"html":{"href":"https://github.com/01org/libyami/pull/253"},"issue":{"href":"https://api.github.com/repos/01org/libyami/issues/253"},"comments":{"href":"https://api.github.com/repos/01org/libyami/issues/253/comments"},"review_comments":{"href":"https://api.github.com/repos/01org/libyami/pulls/253/comments"},"review_comment":{"href":"https://api.github.com/repos/01org/libyami/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/01org/libyami/pulls/253/commits"},"statuses":{"href":"https://api.github.com/repos/01org/libyami/statuses/1337e3a624ec817814bb1d1e10f1c1b454a098d5"}}}}