Mercurial > libavcodec.hg
comparison h264.c @ 6203:c9433472cb95 libavcodec
Fix the following warnings:
h264.c:2093: warning: unused variable 's'
h264.c:2406: warning: suggest parentheses around arithmetic in operand of ^
h264.c:2412: warning: suggest parentheses around arithmetic in operand of ^
author | andoma |
---|---|
date | Thu, 31 Jan 2008 00:15:24 +0000 |
parents | 52ccab2531bd |
children | b26ccd688817 |
comparison
equal
deleted
inserted
replaced
6202:c82299110182 | 6203:c9433472cb95 |
---|---|
2088 /** | 2088 /** |
2089 * Init context | 2089 * Init context |
2090 * Allocate buffers which are not shared amongst multiple threads. | 2090 * Allocate buffers which are not shared amongst multiple threads. |
2091 */ | 2091 */ |
2092 static int context_init(H264Context *h){ | 2092 static int context_init(H264Context *h){ |
2093 MpegEncContext * const s = &h->s; | |
2094 | |
2095 CHECKED_ALLOCZ(h->top_borders[0], h->s.mb_width * (16+8+8) * sizeof(uint8_t)) | 2093 CHECKED_ALLOCZ(h->top_borders[0], h->s.mb_width * (16+8+8) * sizeof(uint8_t)) |
2096 CHECKED_ALLOCZ(h->top_borders[1], h->s.mb_width * (16+8+8) * sizeof(uint8_t)) | 2094 CHECKED_ALLOCZ(h->top_borders[1], h->s.mb_width * (16+8+8) * sizeof(uint8_t)) |
2097 | 2095 |
2098 return 0; | 2096 return 0; |
2099 fail: | 2097 fail: |
2401 for(list=0; list<h->list_count; list++){ | 2399 for(list=0; list<h->list_count; list++){ |
2402 if(!USES_LIST(mb_type, list)) | 2400 if(!USES_LIST(mb_type, list)) |
2403 continue; | 2401 continue; |
2404 if(IS_16X16(mb_type)){ | 2402 if(IS_16X16(mb_type)){ |
2405 int8_t *ref = &h->ref_cache[list][scan8[0]]; | 2403 int8_t *ref = &h->ref_cache[list][scan8[0]]; |
2406 fill_rectangle(ref, 4, 4, 8, 16+*ref^(s->mb_y&1), 1); | 2404 fill_rectangle(ref, 4, 4, 8, (16+*ref)^(s->mb_y&1), 1); |
2407 }else{ | 2405 }else{ |
2408 for(i=0; i<16; i+=4){ | 2406 for(i=0; i<16; i+=4){ |
2409 //FIXME can refs be smaller than 8x8 when !direct_8x8_inference ? | 2407 //FIXME can refs be smaller than 8x8 when !direct_8x8_inference ? |
2410 int ref = h->ref_cache[list][scan8[i]]; | 2408 int ref = h->ref_cache[list][scan8[i]]; |
2411 if(ref >= 0) | 2409 if(ref >= 0) |
2412 fill_rectangle(&h->ref_cache[list][scan8[i]], 2, 2, 8, 16+ref^(s->mb_y&1), 1); | 2410 fill_rectangle(&h->ref_cache[list][scan8[i]], 2, 2, 8, (16+ref)^(s->mb_y&1), 1); |
2413 } | 2411 } |
2414 } | 2412 } |
2415 } | 2413 } |
2416 } | 2414 } |
2417 } else { | 2415 } else { |