On Thu, Jul 07, 2016 at 04:58:21AM +0530, Jai Luthra wrote: > Hi, > > This is an update for the TrueHD encoder gsoc project. Any input from the > community about work done till now, or for plans ahead, is most welcome :) > > The MLP encoder (patch attached) works without any lossless check errors now > on most samples I've tested on, both for mono and stereo. > > Here's the changelog from ramiro's original version of the encoder: > https://github.com/jailuthra/FFmpeg/compare/33c37b86...b4eb87c > > The current plan is: > * Support encoding TrueHD bitstreams through mlpenc.c, just like it's > done in mlpdec.c > * Add multi-channel support > * Add FATE tests? > * Send the patch for review and merge > > Also while testing how to implement multi-channel support, I noticed that the > LFE channel encoding was not lossless for most samples. Any suggestions on > how to fix this would be helpful. > > Cheers, > Jai Luthra (darkapex)
commenting on your mlpencoder branch (which is newer) instead of the patch > +static int compare_filter_params(ChannelParams *prev_cp, ChannelParams *cp, > int filter) please mark stuff that are not changed as const same for compare_matrix_params() this should allow marking restart_best_offset as const i think > + for (i = 0; i < NUM_FILTERS; i++) { > + unsigned int size = ctx->number_of_samples; > + filter_state_buffer[i] = av_malloc(size*sizeof(int32_t)); > + } > + > + for (i = 0; i < 8; i++) { > + filter_state_buffer[FIR][i] = *sample_buffer; > + filter_state_buffer[IIR][i] = *sample_buffer; > + > + sample_buffer += ctx->num_channels; > + } Missing malloc failure check > diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c > index d3a7fff..cc4f381 100644 > --- a/libavcodec/ra144enc.c > +++ b/libavcodec/ra144enc.c > @@ -475,7 +475,7 @@ static int ra144_encode_frame(AVCodecContext *avctx, > AVPacket *avpkt, > > ff_lpc_calc_coefs(&ractx->lpc_ctx, lpc_data, NBLOCKS * BLOCKSIZE, > LPC_ORDER, > LPC_ORDER, 16, lpc_coefs, shift, FF_LPC_TYPE_LEVINSON, > - 0, ORDER_METHOD_EST, 12, 0); > + 0, ORDER_METHOD_EST, 0, 12, 0); > for (i = 0; i < LPC_ORDER; i++) > block_coefs[NBLOCKS - 1][i] = -(lpc_coefs[LPC_ORDER - 1][i] << > (12 - shift[LPC_ORDER - 1])); A change to ff_lpc_calc_coefs / lpc/flac / .... should be in a seperate patch more generally, is everything going acording to plan ? anything that you need help with ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is dangerous to be right in matters on which the established authorities are wrong. -- Voltaire
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel