mirror of https://bitbucket.org/ausocean/av.git
codec/h264/h264dec/decode.go: using if else structure for derivation of topFieldOrderCnt and bottomFieldOrderCnt in decodePicOrderCntType1 function
This commit is contained in:
parent
0df182018a
commit
40fa50d4f0
|
@ -151,13 +151,12 @@ func decodePicOrderCntType1(vid *VideoStream, ctx *SliceContext) (topFieldOrderC
|
|||
expectedPicOrderCnt = expectedPicOrderCnt + int(ctx.OffsetForNonRefPic)
|
||||
}
|
||||
|
||||
switch {
|
||||
case !ctx.FieldPic:
|
||||
if !ctx.FieldPic {
|
||||
topFieldOrderCnt = expectedPicOrderCnt + ctx.DeltaPicOrderCnt[0]
|
||||
bottomFieldOrderCnt = topFieldOrderCnt + int(ctx.OffsetForTopToBottomField) + ctx.DeltaPicOrderCnt[1]
|
||||
case !ctx.BottomField:
|
||||
} else if !ctx.BottomField {
|
||||
topFieldOrderCnt = expectedPicOrderCnt + ctx.DeltaPicOrderCnt[0]
|
||||
default:
|
||||
} else {
|
||||
bottomFieldOrderCnt = expectedPicOrderCnt + int(ctx.OffsetForTopToBottomField) + ctx.DeltaPicOrderCnt[0]
|
||||
}
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue