Git Product home page Git Product logo

h264-reader's Introduction

h264-reader

Reader for H264 bitstream syntax, written in Rust.

crates.io version Documentation

Aims to provide access to stream metadata; does not actually decode the video.

The implementation attempts to minimise copying of source data, for efficiency, at the cost of a more complicated API

Supported syntax

The following list shows the current state of support per H264 syntax element:

  • Bytestream formats
    • Annex B format (e.g. in MPEG-TS)
    • AVCC format (e.g. in MP4)
  • Network Abstraction Layer Units (NAL Units)
    • slice_layer_without_partitioning_rbsp()
    • slice_data_partition_a_layer_rbsp()
    • slice_data_partition_b_layer_rbsp()
    • slice_data_partition_c_layer_rbsp()
    • slice_layer_without_partitioning_rbsp()
    • sei_rbsp() Supplementary Enhancement Information headers - the following payloads are supported:
      • buffering_period()
      • pic_timing()
      • pan_scan_rect()
      • filler_payload()
      • user_data_registered_itu_t_t35()
      • user_data_unregistered()
      • recovery_point()
      • dec_ref_pic_marking_repetition()
      • spare_pic()
      • scene_info()
      • sub_seq_info()
      • sub_seq_layer_characteristics()
      • sub_seq_characteristics()
      • full_frame_freeze()
      • full_frame_freeze_release()
      • full_frame_snapshot()
      • progressive_refinement_segment_start()
      • progressive_refinement_segment_end()
      • motion_constrained_slice_group_set()
      • film_grain_characteristics()
      • deblocking_filter_display_preference()
      • stereo_video_info()
      • post_filter_hint()
      • tone_mapping_info()
      • Annex G headers
      • Annex H headers
      • Annex I headers
      • Annex J headers
      • frame_packing_arrangement()
      • display_orientation()
      • mastering_display_colour_volume()
      • colour_remapping_info()
      • alternative_transfer_characteristics()
      • alternative_depth_info()
    • seq_parameter_set_rbsp()
    • pic_parameter_set_rbsp()
    • access_unit_delimiter_rbsp()
    • end_of_stream_rbsp()
    • filler_data_rbsp()
    • seq_parameter_set_extension_rbsp()
    • prefix_nal_unit_rbsp()
    • subset_seq_parameter_set_rbsp()
    • depth_parameter_set_rbsp()
    • slice_layer_without_partitioning_rbsp()
    • slice_layer_extension_rbsp()
    • slice_layer_extension_rbsp()

Design goals

Avoid copies

Parsing components accept partial data to avoid coping data into intermediate buffers. This is intended to support common cases like,

  • data embedded in MPEG-TS packets, where h264 data is interspersed with MPEG-TS header data
  • data being read from the network, where the data available at any instant may be incomplete

An alternative to accepting partial data would be to take a number of peices of partial data

Lazy parsing

The implementation should be written to defer parsing data structures until an accessor method is called. This can mean saving parsing costs for callers that don't care about all the data. It can be difficult to apply this principal universally, so in some areas we don't bother and just 'eager parse' (particularly structures defined bit-by-bit rather than byte-by-byte).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.