Mercurial > libavcodec.hg
comparison vp3.c @ 2684:c8386f5c4fb9 libavcodec
fix dequant matrix
author | michael |
---|---|
date | Mon, 16 May 2005 09:29:13 +0000 |
parents | 44abbda868c5 |
children | 979a847cb943 |
comparison
equal
deleted
inserted
replaced
2683:7d86ebbccecf | 2684:c8386f5c4fb9 |
---|---|
2064 debug_vp3(" vp3: rendering final fragments for %s\n", | 2064 debug_vp3(" vp3: rendering final fragments for %s\n", |
2065 (plane == 0) ? "Y plane" : (plane == 1) ? "U plane" : "V plane"); | 2065 (plane == 0) ? "Y plane" : (plane == 1) ? "U plane" : "V plane"); |
2066 | 2066 |
2067 /* set up plane-specific parameters */ | 2067 /* set up plane-specific parameters */ |
2068 if (plane == 0) { | 2068 if (plane == 0) { |
2069 dequantizer = s->intra_y_dequant; | |
2070 output_plane = s->current_frame.data[0]; | 2069 output_plane = s->current_frame.data[0]; |
2071 last_plane = s->last_frame.data[0]; | 2070 last_plane = s->last_frame.data[0]; |
2072 golden_plane = s->golden_frame.data[0]; | 2071 golden_plane = s->golden_frame.data[0]; |
2073 stride = s->current_frame.linesize[0]; | 2072 stride = s->current_frame.linesize[0]; |
2074 if (!s->flipped_image) stride = -stride; | 2073 if (!s->flipped_image) stride = -stride; |
2075 upper_motion_limit = 7 * s->current_frame.linesize[0]; | 2074 upper_motion_limit = 7 * s->current_frame.linesize[0]; |
2076 lower_motion_limit = height * s->current_frame.linesize[0] + width - 8; | 2075 lower_motion_limit = height * s->current_frame.linesize[0] + width - 8; |
2077 } else if (plane == 1) { | 2076 } else if (plane == 1) { |
2078 dequantizer = s->intra_c_dequant; | |
2079 output_plane = s->current_frame.data[1]; | 2077 output_plane = s->current_frame.data[1]; |
2080 last_plane = s->last_frame.data[1]; | 2078 last_plane = s->last_frame.data[1]; |
2081 golden_plane = s->golden_frame.data[1]; | 2079 golden_plane = s->golden_frame.data[1]; |
2082 stride = s->current_frame.linesize[1]; | 2080 stride = s->current_frame.linesize[1]; |
2083 if (!s->flipped_image) stride = -stride; | 2081 if (!s->flipped_image) stride = -stride; |
2084 upper_motion_limit = 7 * s->current_frame.linesize[1]; | 2082 upper_motion_limit = 7 * s->current_frame.linesize[1]; |
2085 lower_motion_limit = height * s->current_frame.linesize[1] + width - 8; | 2083 lower_motion_limit = height * s->current_frame.linesize[1] + width - 8; |
2086 } else { | 2084 } else { |
2087 dequantizer = s->intra_c_dequant; | |
2088 output_plane = s->current_frame.data[2]; | 2085 output_plane = s->current_frame.data[2]; |
2089 last_plane = s->last_frame.data[2]; | 2086 last_plane = s->last_frame.data[2]; |
2090 golden_plane = s->golden_frame.data[2]; | 2087 golden_plane = s->golden_frame.data[2]; |
2091 stride = s->current_frame.linesize[2]; | 2088 stride = s->current_frame.linesize[2]; |
2092 if (!s->flipped_image) stride = -stride; | 2089 if (!s->flipped_image) stride = -stride; |
2170 output_plane + s->all_fragments[i].first_pixel, | 2167 output_plane + s->all_fragments[i].first_pixel, |
2171 motion_source - d, | 2168 motion_source - d, |
2172 motion_source + stride + 1 + d, | 2169 motion_source + stride + 1 + d, |
2173 stride, 8); | 2170 stride, 8); |
2174 } | 2171 } |
2172 dequantizer = s->inter_dequant; | |
2173 }else{ | |
2174 if (plane == 0) | |
2175 dequantizer = s->intra_y_dequant; | |
2176 else | |
2177 dequantizer = s->intra_c_dequant; | |
2175 } | 2178 } |
2176 | 2179 |
2177 /* dequantize the DCT coefficients */ | 2180 /* dequantize the DCT coefficients */ |
2178 debug_idct("fragment %d, coding mode %d, DC = %d, dequant = %d:\n", | 2181 debug_idct("fragment %d, coding mode %d, DC = %d, dequant = %d:\n", |
2179 i, s->all_fragments[i].coding_method, | 2182 i, s->all_fragments[i].coding_method, |