【问题标题】:JM H.264 encoder error message maxsliceperpictureJM H.264 编码器错误信息 maxsliceperpicture
【发布时间】:2016-06-07 06:46:12
【问题描述】:

我正在尝试使用 JM 软件对图像进行内部编码。我的输入图像大小为 1920x1080/50p。 使用以下配置文件,我已经编写了测试图片。一旦我使用自己的图像(我使用了许多不同的编码 yuv-图像,所以我想这不是问题)我收到以下消息:

每张图片切片太多,在 global.h 中增加 MAXSLICEPERPICTURE。

所以我确实把它改得很高,但我仍然收到消息。

你能告诉我我做错了什么吗?

这是我的配置文件:

   # New Input File Format is as follows

####
# Files
####
InputFile             = "CrowdRun_AVCI_1080p_100.yuv"       # Input sequence
InputHeaderLength     = 0      # If the inputfile has a header, state it's length in byte here
StartFrame            = 0      # Start frame for encoding. (0-N)
FramesToBeEncoded     = 3      # Number of frames to be coded
FrameRate             = 50.0   # Frame Rate per second (0.1-100.0)
SourceWidth           = 1920    # Source frame width
SourceHeight          = 1080   # Source frame height
SourceResize          = 0      # Resize source size for output
OutputWidth           = 1920   # Output frame width
OutputHeight          = 1080   # Output frame height
ProcessInput          = 0      # Filter Input Sequence 
Interleaved           = 0      # 0: Planar input, 1: Packed input
StandardRange         = 0      # 0: Standard range 1: Full range (RGB input)
VideoCode             = 1      # Video codes for RGB ==> YUV conversions


TraceFile             = "trace_enc.txt"      # Trace file 
ReconFile             = "test_rec.yuv"       # Reconstruction YUV file
OutputFile            = "test.264"           # Bitstream
StatsFile             = "stats.dat"          # Coding statistics file

####
# Encoder Control
####
ProfileIDC            = 122 # Profile IDC (66=baseline, 77=main, 88=extended; FREXT Profiles: 100=High, 110=High 10, 122=High 4:2:2, 244=High 4:4:4, 44=CAVLC 4:4:4 Intra)
IntraProfile          = 1   # Activate Intra Profile for FRExt (0: false, 1: true)
                            # (e.g. ProfileIDC=110, IntraProfile=1  =>  High 10 Intra Profile)
LevelIDC              = 51  # Level IDC   (e.g. 20 = level 2.0)

IntraPeriod           = 1   # Period of I-pictures   (0=only first)
IDRPeriod             = 1   # Period of IDR pictures (0=only first)
AdaptiveIntraPeriod   = 1   # Adaptive intra period
AdaptiveIDRPeriod     = 0   # Adaptive IDR period
IntraDelay            = 0   # Intra (IDR) picture delay (i.e. coding structure of PPIPPP... )
EnableIDRGOP          = 0   # Support for IDR closed GOPs (0: disabled, 1: enabled)
EnableOpenGOP         = 0   # Support for open GOPs (0: disabled, 1: enabled)
QPISlice              = 28  # Quant. param for I Slices (0-51)
QPPSlice              = 28  # Quant. param for P Slices (0-51)
FrameSkip             = 0   # Number of frames to be skipped in input (e.g 2 will code every third frame). 
                            # Note that this now excludes intermediate (i.e. B) coded pictures
ChromaQPOffset        = 0   # Chroma QP offset (-51..51)

DisableSubpelME       = 0   # Disable Subpixel Motion Estimation (0=off/default, 1=on)
SearchRange           = 32  # Max search range

MEDistortionFPel      = 0   # Select error metric for Full-Pel ME    (0: SAD, 1: SSE, 2: Hadamard SAD)
MEDistortionHPel      = 2   # Select error metric for Half-Pel ME    (0: SAD, 1: SSE, 2: Hadamard SAD)
MEDistortionQPel      = 2   # Select error metric for Quarter-Pel ME (0: SAD, 1: SSE, 2: Hadamard SAD)
MDDistortion          = 2   # Select error metric for Mode Decision  (0: SAD, 1: SSE, 2: Hadamard SAD)
SkipDeBlockNonRef     = 0   # Skip Deblocking (regardless of DFParametersFlag) for non-reference frames (0: off, 1: on)
ChromaMCBuffer        = 1   # Calculate Color component interpolated values in advance and store them.
                            # Provides a trade-off between memory and computational complexity
                            # (0: disabled/default, 1: enabled)
ChromaMEEnable        = 0   # Take into account Color component information during ME
                            # (0: only first component/default, 
                            #  1: All Color components - Integer refinement only
                            #  2: All Color components - All refinements)
ChromaMEWeight        = 1   # Weighting for chroma components. This parameter should have a relationship with color format.

NumberReferenceFrames = 5   # Number of previous frames used for inter motion search (0-16)

PList0References      = 0   # P slice List 0 reference override (0 disable, N <= NumberReferenceFrames)
Log2MaxFNumMinus4     = 0   # Sets log2_max_frame_num_minus4 (-1 : based on FramesToBeEncoded/Auto, >=0 : Log2MaxFNumMinus4)
Log2MaxPOCLsbMinus4   = -1  # Sets log2_max_pic_order_cnt_lsb_minus4 (-1 : Auto, >=0 : Log2MaxPOCLsbMinus4)

GenerateMultiplePPS   = 0   # Transmit multiple parameter sets. Currently parameters basically enable all WP modes (0: diabled, 1: enabled)
ResendPPS             = 0   # Resend PPS (with pic_parameter_set_id 0) for every coded Frame/Field pair (0: disabled, 1: enabled)

MbLineIntraUpdate     = 0   # Error robustness(extra intra macro block updates)(0=off, N: One GOB every N frames are intra coded)
RandomIntraMBRefresh  = 0   # Forced intra MBs per picture


#####
# B Slices
#####

NumberBFrames          = 0  # Number of B coded frames inserted (0=not used)
QPBSlice               = 30 # Quant. param for B slices (0-51)
BRefPicQPOffset        = -1 # Quantization offset for reference B coded pictures (-51..51)
DirectModeType         = 1  # Direct Mode Type (0:Temporal 1:Spatial)
DirectInferenceFlag    = 1  # Direct Inference Flag (0: Disable 1: Enable)
BList0References       = 0  # B slice List 0 reference override (0 disable, N <= NumberReferenceFrames)
BList1References       = 1  # B slice List 1 reference override (0 disable, N <= NumberReferenceFrames)
                            # 1 List1 reference is usually recommended for normal GOP Structures.
                            # A larger value is usually more appropriate if a more flexible
                            # structure is used (i.e. using HierarchicalCoding)

BReferencePictures    =  0  # Referenced B coded pictures (0=off, 1=B references for secondary layer, 2=B references for primary layer)

HierarchicalCoding      =  0  # B hierarchical coding (0= off, 1= 2 layers, 2= 2 full hierarchy, 3 = explicit)
HierarchyLevelQPEnable  =  1  # Adjust QP based on hierarchy level (in increments of 1). Overrides BRefPicQPOffset behavior.(0=off, 1=on)
ExplicitHierarchyFormat = "b1r0b3r0b2e2b0e2b4r2" # Explicit Enhancement GOP. Format is {FrameDisplay_orderReferenceQP}.
                                                 # Valid values for reference type is r:reference, e:non reference.
ReferenceReorder      =  1    # Reorder References according to Poc distance for HierarchicalCoding (0=off, 1=enable, 2=use when LowDelay is set)
PocMemoryManagement   =  1    # Memory management based on Poc Distances for HierarchicalCoding (0=off, 1=on, 2=use when LowDelay is set)

BiPredMotionEstimation = 1   # Enable Bipredictive based Motion Estimation (0:disabled, 1:enabled)
BiPredMERefinements    = 3   # Bipredictive ME extra refinements (0: single, N: N extra refinements (1 default)
BiPredMESearchRange    = 16  # Bipredictive ME Search range (8 default). Note that range is halved for every extra refinement.
BiPredMESubPel         = 2   # Bipredictive ME Subpixel Consideration (0: disabled, 1: single level, 2: dual level)


#####
# SP Frames
#####

SPPicturePeriodicity  = 0                  # SP-Picture Periodicity (0=not used)
QPSPSlice             = 36                 # Quant. param of SP-Slices for Prediction Error (0-51)
QPSISlice             = 36                 # Quant. param of SI-Slices for Prediction Error (0-51)
QPSP2Slice            = 35                 # Quant. param of SP/SI-Slices for Predicted Blocks (0-51)
SI_FRAMES             = 0                  # SI frame encoding flag (0=not used, 1=used)
SP_output             = 0                  # Controls whether coefficients will be output to encode switching SP frames (0=no, 1=yes)
SP_output_name        = "low_quality.dat"  # Filename for SP output coefficients
SP2_FRAMES            = 0                  # switching SP frame encoding flag (0=not used, 1=used)
SP2_input_name1       = "high_quality.dat" # Filename for the first swithed bitstream coefficients
SP2_input_name2       = "low_quality.dat"  # Filename for the second switched bitstream coefficients

#####
# Output Control, NALs
#####

SymbolMode             =  1  # Symbol mode (Entropy coding method: 0=UVLC, 1=CABAC)
OutFileMode            =  0  # Output file mode, 0:Annex B, 1:RTP
PartitionMode          =  0  # Partition Mode, 0: no DP, 1: 3 Partitions per Slice

####
# CABAC context initialization
####

ContextInitMethod        =  1     # Context init (0: fixed, 1: adaptive)
FixedModelNumber         =  0     # model number for fixed decision for inter slices ( 0, 1, or 2 )

######
# Interlace Handling
#####

PicInterlace             =  0     # Picture AFF    (0: frame coding, 1: field coding, 2:adaptive frame/field coding)
MbInterlace              =  0     # Macroblock AFF (0: frame coding, 1: field coding, 2:adaptive frame/field coding, 3: frame MB-only AFF)
IntraBottom              =  0     # Force Intra Bottom at GOP Period

#####
# Weighted Prediction
#####

WeightedPrediction       =  0     # P picture Weighted Prediction (0=off, 1=explicit mode)
WeightedBiprediction     =  0     # B picture Weighted Prediciton (0=off, 1=explicit mode,  2=implicit mode)
ChromaWeightSupport      =  1     # Enable consideration of weights for Chroma components
UseWeightedReferenceME   =  1     # Use weighted reference for ME (0=off, 1=on)
WPMethod                 =  1     # WP method (0: DC based, 1: LMS based)
WPIterMC                 =  0     # Iterative Motion compensated based weighted prediction method
EnhancedBWeightSupport   =  0     # Enhanced B Weight support (needs revisit if we wish to merge with WPMethod)
WPMCPrecision            =  0     # Improved Motion Compensation Precision using WP based methods.
                                  # Clones WP references with slightly modified rounding offsets (Requires RDPictureDecision and GenerateMultiplePPS) :
                                  # 0: disabled (default) 
                                  # 1: Up to one additional coding pass. Ref0 is 0, ref1 is 0 with a -1 offset
                                  # 2: Up to two additional coding passes. (1) Ref0 is 0, ref1 is 0 with a -1 offset, (1) Ref0 is 0 with a -1 offset, ref1 is 0
WPMCPrecFullRef          =  0     # Increases the number of references in the reference picture lists to account
                                  # for the lost reference slot when reordering is used during a coding pass in WPMCPrecision for reference replication.
                                  # The number of references in non-reordered passes stays unchanged
WPMCPrecBSlice           =  1     # 2: Apply rounding on every B slice. This efectively disables the evaluation of alternative QPs during RDPictureDecision.
                                  # 1: Disable rounding for non-reference B slices. Non-reference B slices are evaluated for alternative QPs during RDPictureDecision.
                                  # 0: Disable rounding for B slices.

#####
# Picture based Multi-pass encoding
#####

RDPictureDecision        =  0     # Perform multiple pass coding and make RD optimal decision among them
RDPSliceBTest            =  0     # Perform Slice level RD decision between P and B slices. 
RDPictureMaxPassISlice   =  1     # Max number of coding passes for I slices, valid values [1,3], default is 1 
RDPictureMaxPassPSlice   =  2     # Max number of coding passes for P slices, valid values [1,6], default is 2
RDPictureMaxPassBSlice   =  3     # Max number of coding passes for B slices, valid values [1,6], default is 3
RDPictureFrameQPPSlice   =  0     # Perform additional frame level QP check (QP+/-1) for P slices, 0: disabled (default), 1: enabled
RDPictureFrameQPBSlice   =  0     # Perform additional frame level QP check (QP+/-1) for B slices, 0: disabled, 1: enabled (default)
RDPictureDeblocking      =  0     # Perform another coding pass to check non-deblocked picture, 0: disabled (default), 1: enabled
RDPictureDirectMode      =  0     # Perform another coding pass to check the alternative direct mode for B slices, , 0: disabled (default), 1: enabled

#####
# Deblocking filter parameters
#####

DFParametersFlag         = 0      # Configure deblocking filter (0=parameters below ignored, 1=parameters sent)
                                  # Note that for pictures with multiple slice types, 
                                  # only the type of the first slice will be considered.
DFDisableRefISlice       = 0      # Disable deblocking filter in reference I coded pictures (0=Filter, 1=No Filter). 
DFAlphaRefISlice         = 0      # Reference I coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6}
DFBetaRefISlice          = 0      # Reference I coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6}
DFDisableNRefISlice      = 0      # Disable deblocking filter in non reference I coded pictures (0=Filter, 1=No Filter). 
DFAlphaNRefISlice        = 0      # Non Reference I coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6}
DFBetaNRefISlice         = 0      # Non Reference I coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6}
DFDisableRefPSlice       = 0      # Disable deblocking filter in reference P coded pictures (0=Filter, 1=No Filter). 
DFAlphaRefPSlice         = 0      # Reference P coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6}
DFBetaRefPSlice          = 0      # Reference P coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6}
DFDisableNRefPSlice      = 0      # Disable deblocking filter in non reference P coded pictures (0=Filter, 1=No Filter). 
DFAlphaNRefPSlice        = 0      # Non Reference P coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6}
DFBetaNRefPSlice         = 0      # Non Reference P coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6}
DFDisableRefBSlice       = 0      # Disable deblocking filter in reference B coded pictures (0=Filter, 1=No Filter). 
DFAlphaRefBSlice         = 0      # Reference B coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6}
DFBetaRefBSlice          = 0      # Reference B coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6}
DFDisableNRefBSlice      = 0      # Disable deblocking filter in non reference B coded pictures (0=Filter, 1=No Filter). 
DFAlphaNRefBSlice        = 0      # Non Reference B coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6}
DFBetaNRefBSlice         = 0      # Non Reference B coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6}

#####
# Error Resilience / Slices
#####
SliceMode             =  1   # Slice mode (0=off 1=fixed #mb in slice 2=fixed #bytes in slice 3=use callback)
SliceArgument         = 50   # Slice argument (Arguments to modes 1 and 2 above)

num_slice_groups_minus1 = 0  # Number of Slice Groups Minus 1, 0 == no FMO, 1 == two slice groups, etc.
slice_group_map_type    = 0  # 0:  Interleave, 1: Dispersed,    2: Foreground with left-over,
                             # 3:  Box-out,    4: Raster Scan   5: Wipe
                             # 6:  Explicit, slice_group_id read from SliceGroupConfigFileName
slice_group_change_direction_flag = 0    # 0: box-out clockwise, raster scan or wipe right,
                                         # 1: box-out counter clockwise, reverse raster scan or wipe left
slice_group_change_rate_minus1    = 85   #
SliceGroupConfigFileName          = "sg0conf.cfg"   # Used for slice_group_map_type 0, 2, 6

UseRedundantPicture   = 0    # 0: not used, 1: enabled
NumRedundantHierarchy = 1    # 0-4
PrimaryGOPLength      = 10   # GOP length for redundant allocation (1-16)
                             # NumberReferenceFrames must be no less than PrimaryGOPLength when redundant slice enabled
NumRefPrimary         = 1    # Actually used number of references for primary slices (1-16)

#####
# Search Range Restriction / RD Optimization
#####
RestrictSearchRange    =  2  # restriction for (0: blocks and ref, 1: ref, 2: no restrictions)
RDOptimization         =  1  # rd-optimized mode decision
                             # 0: RD-off (Low complexity mode)
                             # 1: RD-on (High complexity mode)
                             # 2: RD-on (Fast high complexity mode - not work in FREX Profiles)
                             # 3: with losses
                             # 4: RD-on (High complexity mode) with negative skip bias
I16RDOpt               =  0  # perform rd-optimized mode decision for Intra 16x16 MB
                             # 0: SAD-based mode decision for Intra 16x16 MB
                             # 1: RD-based mode decision for Intra 16x16 MB                        
SubMBCodingState       =  1  # submacroblock coding state
                             # 0: lowest complexity, do not store or reset coding state during sub-MB mode decision
                             # 1: medium complexity, reset to master coding state (for current mode) during sub-MB mode decision
                             # 2: highest complexity, store and reset coding state during sub-MB mode decision
DistortionSSIM         =  0  # Compute SSIM distortion. (0: disabled/default, 1: enabled)
DistortionMS_SSIM      =  0  # Compute Multiscale SSIM distortion. (0: disabled/default, 1: enabled)
SSIMOverlapSize        =  8  # Overlap size to calculate SSIM distortion (1: pixel by pixel, 8: no overlap)
DistortionYUVtoRGB     =  0  # Calculate distortion in RGB domain after conversion from YCbCr (0:off, 1:on)
CtxAdptLagrangeMult    =  0  # Context Adaptive Lagrange Multiplier
                             # 0: disabled (default)
                             # 1: enabled (works best when RDOptimization=0)
FastCrIntraDecision    =  1  # Fast Chroma intra mode decision (0:off, 1:on)
DisableThresholding    =  0  # Disable Thresholding of Transform Coefficients (0:off, 1:on)
DisableBSkipRDO        =  0  # Disable B Skip Mode consideration from RDO Mode decision (0:off, 1:on)
BiasSkipRDO            =  0  # Negative Bias for Skip/DirectSkip modes (0: off, 1: on)
ForceTrueRateRDO       =  0  # Force true rate (even zero values) during RDO process
SkipIntraInInterSlices =  0  # Skips Intra mode checking in inter slices if certain mode decisions are satisfied (0: off, 1: on)
WeightY                =  1  # Luma weight for RDO
WeightCb               =  1  # Cb weight for RDO
WeightCr               =  1  # Cr weight for RDO

##########################################################################################
# Explicit Lambda Usage
##########################################################################################
UseExplicitLambdaParams  =  0    # Use explicit lambda scaling parameters (0:disabled, 1:enable lambda weight, 2: use explicit lambda value)
UpdateLambdaChromaME     =  0    # Update lambda given Chroma ME consideration
FixedLambdaISlice        =  0.1  # Fixed Lambda value for I slices
FixedLambdaPSlice        =  0.1  # Fixed Lambda value for P slices
FixedLambdaBSlice        =  0.1  # Fixed Lambda value for B slices
FixedLambdaRefBSlice     =  0.1  # Fixed Lambda value for Referenced B slices
FixedLambdaSPSlice       =  0.1  # Fixed Lambda value for SP slices
FixedLambdaSISlice       =  0.1  # Fixed Lambda value for SI slices

LambdaWeightISlice       =  0.65 # scaling param for I slices. This will be used as a multiplier i.e. lambda=LambdaWeightISlice * 2^((QP-12)/3)
LambdaWeightPSlice       =  0.68 # scaling param for P slices. This will be used as a multiplier i.e. lambda=LambdaWeightPSlice * 2^((QP-12)/3)
LambdaWeightBSlice       =  0.68 # scaling param for B slices. This will be used as a multiplier i.e. lambda=LambdaWeightBSlice * 2^((QP-12)/3)
LambdaWeightRefBSlice    =  0.68 # scaling param for Referenced B slices. This will be used as a multiplier i.e. lambda=LambdaWeightRefBSlice * 2^((QP-12)/3)
LambdaWeightSPSlice      =  0.68 # scaling param for SP slices. This will be used as a multiplier i.e. lambda=LambdaWeightSPSlice * 2^((QP-12)/3)
LambdaWeightSISlice      =  0.65 # scaling param for SI slices. This will be used as a multiplier i.e. lambda=LambdaWeightSISlice * 2^((QP-12)/3)

LossRateA                =  5  # expected packet loss rate of the channel for the first partition, only valid if RDOptimization = 3
LossRateB                =  0  # expected packet loss rate of the channel for the second partition, only valid if RDOptimization = 3
LossRateC                =  0  # expected packet loss rate of the channel for the third partition, only valid if RDOptimization = 3
FirstFrameCorrect        =  0  # If 1, the first frame is encoded under the assumption that it is always correctly received. 
NumberOfDecoders         = 30  # Numbers of decoders used to simulate the channel, only valid if RDOptimization = 3
RestrictRefFrames        =  0  # Doesnt allow reference to areas that have been intra updated in a later frame.

【问题讨论】:

    标签: h.264 encoder


    【解决方案1】:

    打开文件 lencod/inc/defines.h

    搜索行:

    #define  MAXSLICEPERPICTURE           100
    

    (在我的例子中是-JM 19.0-,它位于第 171 行)

    将值从 100 更改为 1000,并保存文件

    回到你的 H264/AVC 根目录并通过运行重新编译它:

    make 
    

    再次尝试运行。

    【讨论】:

      猜你喜欢
      • 2015-10-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-06
      相关资源
      最近更新 更多