Skip to content

Commit

Permalink
Update param, issue #20 and issue #16
Browse files Browse the repository at this point in the history
  • Loading branch information
gen2brain committed Aug 28, 2022
1 parent d7e7409 commit a0a7bbb
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 13 deletions.
42 changes: 33 additions & 9 deletions x264c/x264c.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,31 @@ type CropRect struct {
Bottom uint32
}

// MasteringDisplay SEI: Primary and white point chromaticity coordinates
// in 0.00002 increments. Brightness units are 0.0001 cd/m^2.
type MasteringDisplay struct {
// Enable writing this SEI
BMasteringDisplay int32
IGreenX int32
IGreenY int32
IBlueX int32
IBlueY int32
IRedX int32
IRedY int32
IWhiteX int32
IWhiteY int32
IDisplayMax int64
IDisplayMin int64
}

// ContentLightLevel SEI.
type ContentLightLevel struct {
// Enable writing this SEI
BCll int32
IMaxCll int32
IMaxFall int32
}

// Zone type.
// Zones: override ratecontrol or other options for specific sections of the video.
// See EncoderReconfig() for which options can be changed.
Expand All @@ -446,17 +471,16 @@ type Zone struct {
// Level (H.264 level restriction information) type.
type Level struct {
LevelIdc byte
_ [3]byte
// Max macroblock processing rate (macroblocks/sec).
Mbps uint32
Mbps int32
// Max frame size (macroblocks).
FrameSize uint32
FrameSize int32
// Max decoded picture buffer (mbs).
Dpb uint32
Dpb int32
// Max bitrate (kbit/sec).
Bitrate uint32
Bitrate int32
// Max vbv buffer (kbit).
Cpb uint32
Cpb int32
// Max vertical mv component range (pixels).
MvRange uint16
// Max mvs per 2 consecutive mbs.
Expand All @@ -482,9 +506,9 @@ type Hrd struct {

// SeiPayload type.
type SeiPayload struct {
PayloadSize int32
PayloadType int32
Payload *uint8
Size int32
Type int32
Payload *uint8
}

// Sei type.
Expand Down
15 changes: 11 additions & 4 deletions x264c/x264c_param.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ type Param struct {
IBframeAdaptive int32
IBframeBias int32
// Keep some B-frames as references: 0=off, 1=strict hierarchical, 2=normal.
IBframePyramid int32
BOpenGop int32
BBlurayCompat int32
IAvcintraClass int32
IBframePyramid int32
BOpenGop int32
BBlurayCompat int32
IAvcintraClass int32
IAvcintraFlavor int32

BDeblockingFilter int32
// [-6, 6] -6 light filter, 6 strong.
Expand Down Expand Up @@ -118,6 +119,11 @@ type Param struct {
// Frame packing arrangement flag.
IFramePacking int32

MasteringDisplay MasteringDisplay
ContentLightLevel ContentLightLevel

IAlternativeTransfer int32

// Muxing parameters.
// Generate access unit delimiters.
BAud int32
Expand Down Expand Up @@ -183,6 +189,7 @@ type Param struct {
_ [4]byte
ParamFree *[0]byte
NaluProcess *[0]byte
Opaque unsafe.Pointer
}

// cptr return C pointer.
Expand Down

0 comments on commit a0a7bbb

Please sign in to comment.