应用丢包JM参考软件后解码.264编码文件出错

时间:2016-01-02 14:01:52

标签: encoding h.264 video-processing

我正在尝试使用JM参考软件对Foreman视频进行编码。

以下是编码器配置:

   # New Input File Format is as follows
# <ParameterName> = <ParameterValue> # Comment
#
# See configfile.h for a list of supported ParameterNames
#
# For bug reporting and known issues see:
# https://ipbt.hhi.fraunhofer.de


##########################################################################################
# Files
##########################################################################################
InputFile             = "foreman_cif.yuv"       #Input sequence###Changed by me
InputHeaderLength     = 0      # If the inputfile has a header, state it's length in byte here
StartFrame            = 0      # Start frame for encoding. (0-N)
FramesToBeEncoded     = 50      # Number of frames to be coded ##Changed by me
FrameRate             = 30.0   # Frame Rate per second (0.1-100.0)
Enable32Pulldown      = 0      # Enable 'hard' 3:2 pulldown (modifying the inpur data)
                               # 0 = disabled
                               # 1 = A, B, Bt|Cb, Ct|Db, D
                               # 2 = A, B, C, Ct|Db, D
SEIVUI32Pulldown      = 0      # Enable 3:2 pulldown through VUI and SEI metadata signaling. Five methods are supported:
                               # 0 = disabled
                               # 1 = A, Bt|Bb, Bt|Cb, Ct|Cb, D
                               # 2 = A, B, C, C, D
                               # 3 = At|Ab, Bt|Bb, Bt|Cb, Ct|Cb, Dt|Db
                               # 4 = A, Bt|Bb, Bt|Cb, Ct|Db, Dt|Db
                               # 5 = At|Ab, Bt|Bb, Bt|Cb, Ct|Db, Dt|Db

SourceWidth           = 352    # Source frame width
SourceHeight          = 288    # Source frame height
SourceResize          = 0      # Resize source size for output
OutputWidth           = 352    # Output frame width
OutputHeight          = 288    # Output frame height
ProcessInput          = 0      # Filter Input Sequence 
Interleaved           = 0      # 0: Planar input, 1: Packed input
PixelFormat           = 0      # Pixel Format for 422 packed inputs
                               # 0: UYVY
                               # 1: YUY2/YUYV
                               # 2: YVYU
                               # 3: BGR (Unsupported)
                               # 4: V210 (Video Clarity)

StandardRange         = 0      # 0: Standard range 1: Full range (RGB input)
VideoCode             = 1      # Video codes for RGB ==> YUV conversions
                               # 0 = NULL,
                               # 1 = ITU_REC709,
                               # 2 = CCIR_601,
                               # 3 = FCC,
                               # 4 = ITU_REC624BG,
                               # 5 = SMPTE_170M,
                               # 6 = SMPTE_240M,
                               # 7 = SMPTE_260M,
                               # 8 = ITU_REC709_EXACT

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

NumberOfViews         = 1                     # Number of views to encode (1=1 view, 2=2 views)
View1ConfigFile       = "encoder_view1.cfg"   # Config file name for second view
##########################################################################################
# Encoder Control
##########################################################################################
Grayscale             = 0   # Encode in grayscale (Currently only works for 8 bit YUV 420 input)
ProfileIDC            = 100 # 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, 118=Multiview High Profile, 128=Stereo High Profile)
IntraProfile          = 0   # Activate Intra Profile for FRExt (0: false, 1: true)
                            # (e.g. ProfileIDC=110, IntraProfile=1  =>  High 10 Intra Profile)
LevelIDC              = 40  # Level IDC   (e.g. 20 = level 2.0)

IntraPeriod           = 0   # Period of I-pictures   (0=only first)
IDRPeriod             = 0   # 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
MESoftenSSEMetric     = 0   # soften lambda criterion for SSE ME
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)
OnTheFlyFractMCP      = 0   # Perform on-the-fly fractional pixel interpolation for Motion Compensation and Motion Estimation
                            # 0: Disable, interpolate & store all positions
                            # 1: Store full pel & interpolated 1/2 pel positions; 1/4 pel positions interpolate on-the-fly
                            # 2: Store only full pell positions; 1/2 & 1/4 pel positions interpolate on-the-fly
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        = 0   # 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   = 1   # Transmit multiple parameter sets. Currently parameters basically enable all WP modes (0: diabled, 1: enabled)
SendAUD               = 0   # Send Access Delimiter Unit NALU (for every access unit)
ResendSPS             = 2   # Resend SPS  (0: disabled, 1: all Intra pictures, 2: only for IDR, 3: for IDR and OpenGOP I)
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

##########################################################################################
# PSlice Mode types
##########################################################################################
PSliceSkip            = 1   # P-Slice Skip mode consideration  (0=disable, 1=enable)
PSliceSearch16x16     = 1   # P-Slice Inter block search 16x16 (0=disable, 1=enable)
PSliceSearch16x8      = 1   # P-Slice Inter block search 16x8  (0=disable, 1=enable)
PSliceSearch8x16      = 1   # P-Slice Inter block search  8x16 (0=disable, 1=enable)
PSliceSearch8x8       = 1   # P-Slice Inter block search  8x8  (0=disable, 1=enable)
PSliceSearch8x4       = 1   # P-Slice Inter block search  8x4  (0=disable, 1=enable)
PSliceSearch4x8       = 1   # P-Slice Inter block search  4x8  (0=disable, 1=enable)
PSliceSearch4x4       = 1   # P-Slice Inter block search  4x4  (0=disable, 1=enable)

##########################################################################################
# BSlice Mode types
##########################################################################################

BSliceDirect          = 1   # B-Slice Skip mode consideration  (0=disable, 1=enable)
BSliceSearch16x16     = 1   # B-Slice Inter block search 16x16 (0=disable, 1=enable)
BSliceSearch16x8      = 1   # B-Slice Inter block search 16x8  (0=disable, 1=enable)
BSliceSearch8x16      = 1   # B-Slice Inter block search  8x16 (0=disable, 1=enable)
BSliceSearch8x8       = 1   # B-Slice Inter block search  8x8  (0=disable, 1=enable)
BSliceSearch8x4       = 1   # B-Slice Inter block search  8x4  (0=disable, 1=enable)
BSliceSearch4x8       = 1   # B-Slice Inter block search  4x8  (0=disable, 1=enable)
BSliceSearch4x4       = 1   # B-Slice Inter block search  4x4  (0=disable, 1=enable)

BiPredSearch16x16     = 1   # B-Slice Bi-prediction block search 16x16 (0=disable, 1=enable)
BiPredSearch16x8      = 1   # B-Slice Bi-prediction block search 16x8  (0=disable, 1=enable)
BiPredSearch8x16      = 1   # B-Slice Bi-prediction block search 8x16  (0=disable, 1=enable)
BiPredSearch8x8       = 0   # B-Slice Bi-prediction block search 8x8   (0=disable, 1=enable)

DisableIntra4x4        = 0  # Disable Intra 4x4 modes
DisableIntra16x16      = 0  # Disable Intra 16x16 modes
DisableIntraInInter    = 0  # Disable Intra modes for inter slices
IntraDisableInterOnly  = 0  # Apply Disabling Intra conditions only to Inter Slices (0:disable/default,1: enable)
Intra4x4ParDisable     = 0  # Disable Vertical & Horizontal 4x4
Intra4x4DiagDisable    = 0  # Disable Diagonal 45degree 4x4
Intra4x4DirDisable     = 0  # Disable Other Diagonal 4x4
Intra16x16ParDisable   = 0  # Disable Vertical & Horizontal 16x16
Intra16x16PlaneDisable = 0  # Disable Planar 16x16
ChromaIntraDisable     = 0  # Disable Intra Chroma modes other than DC
EnableIPCM             = 1  # Enable IPCM macroblock mode

DisposableP            = 0  # Enable Disposable P slices in the primary layer (0: disable/default, 1: enable)
DispPQPOffset          = 0  # Quantizer offset for disposable P slices (0: default)

PreferDispOrder        = 1  # Prefer display order when building the prediction structure as opposed to coding order (affects intra and IDR periodic insertion, among others)
PreferPowerOfTwo       = 0  # Prefer prediction structures that have lengths expressed as powers of two
FrmStructBufferLength  = 16 # Length of the frame structure unit buffer; it can be overriden for certain cases

ChangeQPFrame          = 0  # Frame in display order from which to apply the Change QP offsets
ChangeQPI              = 0  # Change QP offset value for I_SLICE
ChangeQPP              = 0  # Change QP offset value for P_SLICE
ChangeQPB              = 0  # Change QP offset value for B_SLICE
ChangeQPSI             = 0  # Change QP offset value for SI_SLICE
ChangeQPSP             = 0  # Change QP offset value for SP_SLICE

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

NumberBFrames          = 7  # Number of B coded frames inserted (0=not used)
PReplaceBSlice         = 0  # Replace B-coded slices with P-coded slices when NumberBFrames>0
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      =  3  # 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 = "b3r0b1r1b0e2b2e2b5r1b4e2b6e2" # Explicit Enhancement GOP. Format is {FrameDisplay_orderReferenceQP}.
                                                         # Valid values for reference type is r:reference, e:non reference.
ExplicitSeqCoding     =  0    # Enable support for explicit sequence coding
ExplicitSeqFile       =  "explicit_seq.cfg"
LowDelay              =  0    # Apply HierarchicalCoding without delay (i.e., encode in the captured/display order)
ReferenceReorder      =  1    # Reorder References according to Poc distance for HierarchicalCoding (0=off, 1=enable, 2=use when LowDelay is set)
UseDistortionReorder  =  0    # Enable Distortion based reordering, when ReferenceReorder is set to 1
PocMemoryManagement   =  1    # Memory management based on Poc Distances for HierarchicalCoding (0=off, 1=on, 2=use when LowDelay is set)
SetFirstAsLongTerm    =  0    # Set first frame as long term

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)

##########################################################################################
# HM like coding structures
##########################################################################################

BLevel0MoreRef        =  0  # 0: Use the same number of reference pictures as the other B pictures
                            # 1: Use more reference frame pictures for B pictures at level 0
BIdenticalList        =  0  # 0: not used; 1: used for B pictures at level 0; 2: used for all B pictures
                            # 1 and 2 need to set ReferenceReorder to 1
CRA                   =  0  # 0: do not use CRA like random access support; 1 use CRA like random access support
                            # only used for random access cases, LowDelay != 1
HM50RefStructure      =  0  # 0: do not use HM-5.0 like referencing structure; 1 use HM-5.0 like referencing structure for random access
LDRefSetting          =  0  # 0: use nearest pictures as reference frames
                            # 1: use one nearest + POC%4==0 pictures as reference frames, as JCTVC-F701
                            # Only low delay is supported, please do not use it for a different coding structure

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

SPPicturePeriodicity  = 0                  # SP-Picture Periodicity (0=not used)
SPSwitchPeriod        = 0                  # Switch period (in terms of switching SP/SI frames) between bitstream 1 and bitstream 2
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            =  1  # Output file mode, 0:Annex B, 1:RTP##Changed by me
PartitionMode          =  0  # Partition Mode, 0: no DP, 1: 3 Partitions per Slice

我刚刚加入,直到我改变了。注释 “由我更改 的行是我更改的行。

对视频进行编码后,我使用命令

应用数据包丢失模型
rtp_loss.exe test.264 test_loss.264 1

之后我尝试解码错误文件,但它给了我错误 slice_qp_delta使slice_qp_y超出范围

这是解码器配置文件

# This is a file containing input parameters to the JVT H.264/AVC decoder.
# The text line following each parameter is discarded by the decoder.
#
# For bug reporting and known issues see:
# https://ipbt.hhi.fraunhofer.de
#
# New Input File Format is as follows
# <ParameterName> = <ParameterValue> # Comment
#
##########################################################################################
# Files
##########################################################################################
InputFile             = "test_loss.264"       # H.264/AVC coded bitstream ## Changed by me
OutputFile            = "test_dec.yuv"   # Output file, YUV/RGB
RefFile               = "test_rec.yuv"   # Ref sequence (for SNR)
WriteUV               = 1                # Write 4:2:0 chroma components for monochrome streams
FileFormat            = 1                # NAL mode (0=Annex B, 1: RTP packets)## Changed by me
RefOffset             = 0                # SNR computation offset
POCScale              = 2                # Poc Scale (1 or 2)
##########################################################################################
# HRD parameters
##########################################################################################
#R_decoder             = 500000           # Rate_Decoder
#B_decoder             = 104000           # B_decoder
#F_decoder             = 73000            # F_decoder
#LeakyBucketParamFile  = "leakybucketparam.cfg" # LeakyBucket Params
##########################################################################################
# decoder control parameters
##########################################################################################
DisplayDecParams       = 0                # 1: Display parameters; 
ConcealMode            = 0                # Err Concealment(0:Off,1:Frame Copy,2:Motion Copy)
RefPOCGap              = 2                # Reference POC gap (2: IPP (Default), 4: IbP / IpP)
POCGap                 = 2                # POC gap (2: IPP /IbP/IpP (Default), 4: IPP with frame skip = 1 etc.)
Silent                 = 0                # Silent decode
IntraProfileDeblocking = 1                # Enable Deblocking filter in intra only profiles (0=disable, 1=filter according to SPS parameters)
DecFrmNum              = 0                # Number of frames to be decoded (-n)
##########################################################################################
# MVC decoding parameters
##########################################################################################
DecodeAllLayers        = 0                 # Decode all views (-mpr)

我做错了什么?请帮忙。

0 个答案:

没有答案