SmallsomeFormats · Language · ArchitectureJörg Burbach

PMF0 Format definition

Generation 26 contract

PMF0 generation 26 starts with a 48-byte little-endian header carrying signature, version, profile, block geometry, dimensions, frame count, frame rate, GOP and frame-table location, plus audio metadata. Frame payloads hold indexed block trees. Optional audio uses RAU/RC26. PMFZ uses a 20-byte outer header and independently compressed frame groups. The source defines the bit-level tree, colour, motion and residual contracts.

This is a concise format overview. The bundled reference module is the authoritative field-by-field and bitstream definition; it includes the required structures, constants, encoder and decoder. Input and output are memory buffers. File access and playback or rendering belong to the host application.

Public operations

  Declare.s GetLastError()
  Declare.i GetLastErrorCode()
  Declare.i DetectMemory(*Buffer, Size.i)
  Declare.i InspectMemory(*Buffer, Size.i, *Info.PMF0Info)
  Declare.i ExtractAudioRAU(*Buffer, Size.i, *OutSize.Integer = #Null)
  Declare.i BeginDecode(*Decoder.PMF0Decoder, *Buffer, Size.i, Threads.i = 1)
  Declare.i DecodeNextFrameRGBA32(*Decoder.PMF0Decoder, *OutWidth.Integer = #Null, *OutHeight.Integer = #Null, *OutSize.Integer = #Null, *OutFrameIndex.Integer = #Null)
  Declare EndDecode(*Decoder.PMF0Decoder)
  Declare.i DecodeFrameRGBA32(*Buffer, Size.i, FrameIndex.i, *OutWidth.Integer = #Null, *OutHeight.Integer = #Null, *OutSize.Integer = #Null, *OutFrameCount.Integer = #Null, Threads.i = 1)
  Declare.i EncodeFramesMemoryRGBA32(List Frames.PMF0Frame(), FPS.i, TargetWidth.i = 0, TargetHeight.i = 0, RootSize.i = 32, Radius.i = 2, *OutSize.Integer = #Null, ColorMode.i = #Color_YCoCg, MotionMode.i = #Motion_Diamond, GOPSize.i = 0, Compress.i = #False, Threads.i = 1, Quality.i = #Quality_Default, Effort.i = #Encode_Fast, *Audio.PMF0Audio = #Null)
  Declare FreeFrame(*Frame.PMF0Frame)
  Declare.s GetVideo_PMF0Info()
  Declare EnableStats(Enable.i)
  Declare.i GetStats(*Out.PMF0Stats)
  Declare.s GetStatsReport()

The source bundle preserves the include paths and contains all literal include dependencies and the MIT license. The individual module is not advertised as a dependency-free distribution.

C and JavaScript

The memory ports encode and decode generation-26 streams. The port contracts specify dependencies, buffer ownership, data structures, encoder differences and exchange-format boundaries. The complete C/JavaScript source bundle preserves shared dependency paths. Browser file conversion is separate from the codec core.