Revision d3b4b74c libavcodec/ljpegenc.c

View differences:

libavcodec/ljpegenc.c
141 141
                                }
142 142

  
143 143
                                if(i==0)
144
                                    ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly
144
                                    ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly
145 145
                                else
146
                                    ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_chrominance, m->huff_code_dc_chrominance);
146
                                    ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance);
147 147
                            }
148 148
                        }
149 149
                    }
......
164 164
                                PREDICT(pred, ptr[-linesize-1], ptr[-linesize], ptr[-1], predictor);
165 165

  
166 166
                                if(i==0)
167
                                    ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly
167
                                    ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly
168 168
                                else
169
                                    ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_chrominance, m->huff_code_dc_chrominance);
169
                                    ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance);
170 170
                            }
171 171
                        }
172 172
                    }

Also available in: Unified diff