File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,8 @@ LIBDE265_API const char* de265_get_error_text(de265_error err)
174
174
return " Bit-depth of current image does not match SPS" ;
175
175
case DE265_WARNING_REFERENCE_IMAGE_CHROMA_FORMAT_DOES_NOT_MATCH:
176
176
return " Chroma format of reference image does not match current image" ;
177
+ case DE265_WARNING_INVALID_SLICE_HEADER_INDEX_ACCESS:
178
+ return " Access with invalid slice header index" ;
177
179
178
180
default : return " unknown error" ;
179
181
}
Original file line number Diff line number Diff line change @@ -145,7 +145,8 @@ typedef enum {
145
145
DE265_WARNING_REFERENCE_IMAGE_SIZE_DOES_NOT_MATCH_SPS = 1029 ,
146
146
DE265_WARNING_CHROMA_OF_CURRENT_IMAGE_DOES_NOT_MATCH_SPS = 1030 ,
147
147
DE265_WARNING_BIT_DEPTH_OF_CURRENT_IMAGE_DOES_NOT_MATCH_SPS = 1031 ,
148
- DE265_WARNING_REFERENCE_IMAGE_CHROMA_FORMAT_DOES_NOT_MATCH = 1032
148
+ DE265_WARNING_REFERENCE_IMAGE_CHROMA_FORMAT_DOES_NOT_MATCH = 1032 ,
149
+ DE265_WARNING_INVALID_SLICE_HEADER_INDEX_ACCESS = 1033
149
150
} de265_error ;
150
151
151
152
LIBDE265_API const char * de265_get_error_text (de265_error err );
Original file line number Diff line number Diff line change @@ -1256,6 +1256,16 @@ void derive_collocated_motion_vectors(base_context* ctx,
1256
1256
1257
1257
1258
1258
1259
+ int slice_hdr_idx = colImg->get_SliceHeaderIndex (xColPb,yColPb);
1260
+ if (slice_hdr_idx >= colImg->slices .size ()) {
1261
+ ctx->add_warning (DE265_WARNING_INVALID_SLICE_HEADER_INDEX_ACCESS, false );
1262
+
1263
+ *out_availableFlagLXCol = 0 ;
1264
+ out_mvLXCol->x = 0 ;
1265
+ out_mvLXCol->y = 0 ;
1266
+ return ;
1267
+ }
1268
+
1259
1269
const slice_segment_header* colShdr = colImg->slices [ colImg->get_SliceHeaderIndex (xColPb,yColPb) ];
1260
1270
1261
1271
if (shdr->LongTermRefPic [X][refIdxLX] !=
You can’t perform that action at this time.
0 commit comments