On Thu, Feb 09, 2017 at 01:20:09PM +0100, Michael Niedermayer wrote: [...] > > int ff_mjpeg_encode_stuffing(MpegEncContext *s) > > { > > int i; > > PutBitContext *pbc = &s->pb; > > int mb_y = s->mb_y - !s->mb_x; > >+ int ret; > >+ MJpegContext *m; > >+ > >+ m = s->mjpeg_ctx; > >+ > >+ if (m->error) > >+ return m->error; > >+ > >+ if (s->huffman == HUFFMAN_TABLE_OPTIMAL) { > >+ ff_mjpeg_build_optimal_huffman(m); > >+ > >+ // Replace the VLCs with the optimal ones. > > >+ // The default ones may be used for trellis during quantization. > >+ ff_init_uni_ac_vlc(m->huff_size_ac_luminance, m->uni_ac_vlc_len); > >+ ff_init_uni_ac_vlc(m->huff_size_ac_chrominance, > >m->uni_chroma_ac_vlc_len); > > This is wrong and will break trellis with non default tables, trellis > needs to use the same VLCs as are used for encoding. which if non > default ones are used should be these non default ones > > the code generating the default tables wrote them in shared > tables (uni*ac_vlc_len), now after the patch the default code is > shared, called from 2 places and the tables moved into the context > yet it still generates only the defau lt tables.
I did misread this part [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Dictatorship: All citizens are under surveillance, all their steps and actions recorded, for the politicians to enforce control. Democracy: All politicians are under surveillance, all their steps and actions recorded, for the citizens to enforce control.
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel