Skip to content

Commit b3f0205

Browse files
committed
fix a bug in inter frame dependency .tmp file
1 parent cd7df6a commit b3f0205

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

dependency.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ static void compute_mb_mask_from_intra_frame_dependency_for_single_mb(int p_vide
699699
}
700700
gVideoCodecCtxList[p_videoFileIndex]->selected_mb_mask[l_mb.h][l_mb.w]++;
701701
for (l_i = 0; l_i < 3; ++l_i) {
702-
p = pframe + (l_mb.h*_width + l_mb.w)*8 + l_i*2;
702+
p = pframe + (l_mb.h*_width + l_mb.w)*6 + l_i*2;
703703
if ((*p !=0) || (*(p+1) != 0)) {
704704
l_mb2.h = *p;
705705
l_mb2.w = *(p+1);

dependency.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
//#define NORM_DECODE_DEBUG //uncommented: dump dependency for normal decoding mode; should be commented at //selective decoding mode
4747
//#define DUMP_SELECTED_MB_MASK //enabled: dump the mask for the mb needed;
4848
//#define DUMP_VIDEO_FRAME_BYTES //enabled: dump the bytes to a binary file
49-
//#define DUMP_SELECTIVE_DEP //enabled: dump the relationship in memory to files
49+
#define DUMP_SELECTIVE_DEP //enabled: dump the relationship in memory to files
5050

5151
#define MAX_FRAME_NUM_IN_GOP 50
5252
#define MAX_MB_H 100

libavcodec/h263dec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ static int decode_slice_dep(MpegEncContext *s){
423423
const int xy= s->mb_x + s->mb_y*s->mb_stride;
424424
if(ret==SLICE_END){
425425
MPV_decode_mb_dep(s, s->block);
426+
fprintf(s->avctx->g_interDepF, "\n");
426427
if(s->loop_filter)
427428
ff_h263_loop_filter(s);
428429

0 commit comments

Comments
 (0)