comparison h264.c @ 5785:74fa2587b8de libavcodec

Cosmetic renaming variable so that it makes more sense for forthcoming PAFF mmco patches. patch by Jeff Downs, heydowns a borg d com original thread: Subject: [FFmpeg-devel] [PATCH] Implement PAFF in H.264 Date: 18/09/07 20:30
author andoma
date Sat, 06 Oct 2007 15:50:55 +0000
parents af2dab646def
children 8121e27dd9cc
comparison
equal deleted inserted replaced
5784:af2dab646def 5785:74fa2587b8de
3456 * Executes the reference picture marking (memory management control operations). 3456 * Executes the reference picture marking (memory management control operations).
3457 */ 3457 */
3458 static int execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){ 3458 static int execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){
3459 MpegEncContext * const s = &h->s; 3459 MpegEncContext * const s = &h->s;
3460 int i, j; 3460 int i, j;
3461 int current_is_long=0; 3461 int current_ref_assigned=0;
3462 Picture *pic; 3462 Picture *pic;
3463 3463
3464 if((s->avctx->debug&FF_DEBUG_MMCO) && mmco_count==0) 3464 if((s->avctx->debug&FF_DEBUG_MMCO) && mmco_count==0)
3465 av_log(h->s.avctx, AV_LOG_DEBUG, "no mmco here\n"); 3465 av_log(h->s.avctx, AV_LOG_DEBUG, "no mmco here\n");
3466 3466
3499 3499
3500 h->long_ref[ mmco[i].long_arg ]= s->current_picture_ptr; 3500 h->long_ref[ mmco[i].long_arg ]= s->current_picture_ptr;
3501 h->long_ref[ mmco[i].long_arg ]->long_ref=1; 3501 h->long_ref[ mmco[i].long_arg ]->long_ref=1;
3502 h->long_ref_count++; 3502 h->long_ref_count++;
3503 3503
3504 current_is_long=1; 3504 current_ref_assigned=1;
3505 break; 3505 break;
3506 case MMCO_SET_MAX_LONG: 3506 case MMCO_SET_MAX_LONG:
3507 assert(mmco[i].long_arg <= 16); 3507 assert(mmco[i].long_arg <= 16);
3508 // just remove the long term which index is greater than new max 3508 // just remove the long term which index is greater than new max
3509 for(j = mmco[i].long_arg; j<16; j++){ 3509 for(j = mmco[i].long_arg; j<16; j++){
3523 break; 3523 break;
3524 default: assert(0); 3524 default: assert(0);
3525 } 3525 }
3526 } 3526 }
3527 3527
3528 if(!current_is_long){ 3528 if(!current_ref_assigned){
3529 pic= remove_short(h, s->current_picture_ptr->frame_num); 3529 pic= remove_short(h, s->current_picture_ptr->frame_num);
3530 if(pic){ 3530 if(pic){
3531 unreference_pic(h, pic, 0); 3531 unreference_pic(h, pic, 0);
3532 av_log(h->s.avctx, AV_LOG_ERROR, "illegal short term buffer state detected\n"); 3532 av_log(h->s.avctx, AV_LOG_ERROR, "illegal short term buffer state detected\n");
3533 } 3533 }