mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-07 01:52:46 +08:00
[h263d]: Add error check for h263 decoder
Hardware only support baseline H.263 stream. The stream with mv_outside_frame flag will be blocky if force hardware decoding. So we do not use hardware to decode this kind of stream. Change-Id: I679f37c1d7f248f89b2338a887d4a1e2dea68bf2 Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -162,6 +162,7 @@ static MPP_RET h263_parse_picture_header(H263dParserImpl *p, BitReadCtx_t *gb)
|
||||
/* time reference */
|
||||
READ_BITS(gb, 8, &hdr_curr->TR);
|
||||
|
||||
/* first 5 bit of PTYPE */
|
||||
SKIP_BITS(gb, 5);
|
||||
|
||||
/* source format */
|
||||
@@ -173,10 +174,16 @@ static MPP_RET h263_parse_picture_header(H263dParserImpl *p, BitReadCtx_t *gb)
|
||||
return MPP_NOK;
|
||||
}
|
||||
|
||||
/* picture coding type: 0 - INTRA, 1 - INTER */
|
||||
READ_BITS(gb, 1, &val);
|
||||
pict_type = val;
|
||||
|
||||
SKIP_BITS(gb, 4);
|
||||
/* last 4 bit for PTYPE: UMV, AP mode, PB frame */
|
||||
READ_BITS(gb, 4, &val);
|
||||
if (val) {
|
||||
mpp_err_f("unsupport PTYPE mode %x\n", val);
|
||||
return MPP_NOK;
|
||||
}
|
||||
|
||||
READ_BITS(gb, 5, &val);
|
||||
hdr_curr->quant = val;
|
||||
|
Reference in New Issue
Block a user