예제 #1
0
    public void performIDRMarking(RefPicMarkingIDR refPicMarkingIDR, Frame picture) {
      clearAll();
      pictureBuffer.clear();

      Frame saved = saveRef(picture);
      if (refPicMarkingIDR.isUseForlongTerm()) {
        lRefs.put(0, saved);
        saved.setShortTerm(false);
      } else sRefs[firstSliceHeader.frame_num] = saved;
    }
예제 #2
0
    private void saveLong(Frame saved, int longNo) {
      Frame prev = lRefs.get(longNo);
      if (prev != null) releaseRef(prev);
      saved.setShortTerm(false);

      lRefs.put(longNo, saved);
    }
예제 #3
0
 public Picture decodeFrame(List<ByteBuffer> data, int[][] buffer) {
   Frame frame = new FrameDecoder().decodeFrame(data, getSameSizeBuffer(buffer));
   return frame == null ? null : frame.toPicture(8, buffer);
 }
예제 #4
0
 @Override
 public Picture decodeFrame(ByteBuffer data, int[][] buffer) {
   Frame frame =
       new FrameDecoder().decodeFrame(H264Utils.splitFrame(data), getSameSizeBuffer(buffer));
   return frame == null ? null : frame.toPicture(8, buffer);
 }
예제 #5
0
 private Frame saveRef(Frame decoded) {
   Frame frame = pictureBuffer.size() > 0 ? pictureBuffer.remove(0) : Frame.createFrame(decoded);
   frame.copyFrom(decoded);
   return frame;
 }