comparison error_resilience.c @ 3781:8e79b099d354 libavcodec

dc_val should be signed
author mru
date Wed, 27 Sep 2006 22:13:44 +0000
parents 1843a85123b7
children c8c591fe26f8
comparison
equal deleted inserted replaced
3780:6741c0e88310 3781:8e79b099d354
68 dest_cr[x + y*(s->uvlinesize)]= dcv/8; 68 dest_cr[x + y*(s->uvlinesize)]= dcv/8;
69 } 69 }
70 } 70 }
71 } 71 }
72 72
73 static void filter181(uint16_t *data, int width, int height, int stride){ 73 static void filter181(int16_t *data, int width, int height, int stride){
74 int x,y; 74 int x,y;
75 75
76 /* horizontal filter */ 76 /* horizontal filter */
77 for(y=1; y<height-1; y++){ 77 for(y=1; y<height-1; y++){
78 int prev_dc= data[0 + y*stride]; 78 int prev_dc= data[0 + y*stride];
109 /** 109 /**
110 * guess the dc of blocks which dont have a undamaged dc 110 * guess the dc of blocks which dont have a undamaged dc
111 * @param w width in 8 pixel blocks 111 * @param w width in 8 pixel blocks
112 * @param h height in 8 pixel blocks 112 * @param h height in 8 pixel blocks
113 */ 113 */
114 static void guess_dc(MpegEncContext *s, uint16_t *dc, int w, int h, int stride, int is_luma){ 114 static void guess_dc(MpegEncContext *s, int16_t *dc, int w, int h, int stride, int is_luma){
115 int b_x, b_y; 115 int b_x, b_y;
116 116
117 for(b_y=0; b_y<h; b_y++){ 117 for(b_y=0; b_y<h; b_y++){
118 for(b_x=0; b_x<w; b_x++){ 118 for(b_x=0; b_x<w; b_x++){
119 int color[4]={1024,1024,1024,1024}; 119 int color[4]={1024,1024,1024,1024};
929 #endif 929 #endif
930 /* fill DC for inter blocks */ 930 /* fill DC for inter blocks */
931 for(mb_y=0; mb_y<s->mb_height; mb_y++){ 931 for(mb_y=0; mb_y<s->mb_height; mb_y++){
932 for(mb_x=0; mb_x<s->mb_width; mb_x++){ 932 for(mb_x=0; mb_x<s->mb_width; mb_x++){
933 int dc, dcu, dcv, y, n; 933 int dc, dcu, dcv, y, n;
934 uint16_t *dc_ptr; 934 int16_t *dc_ptr;
935 uint8_t *dest_y, *dest_cb, *dest_cr; 935 uint8_t *dest_y, *dest_cb, *dest_cr;
936 const int mb_xy= mb_x + mb_y * s->mb_stride; 936 const int mb_xy= mb_x + mb_y * s->mb_stride;
937 const int mb_type= s->current_picture.mb_type[mb_xy]; 937 const int mb_type= s->current_picture.mb_type[mb_xy];
938 938
939 error= s->error_status_table[mb_xy]; 939 error= s->error_status_table[mb_xy];