Commit 94bf62da authored by Pavlov Konstantin's avatar Pavlov Konstantin

Bump required dirac version to 0.8.0 and fix dirac codec module to support 0.8.

Tested with dirac files created by ffmpeg (by means of dirac support ffmpeg patch).
parent 9bac5b0a
...@@ -3709,7 +3709,7 @@ dnl ...@@ -3709,7 +3709,7 @@ dnl
AC_ARG_ENABLE(dirac, AC_ARG_ENABLE(dirac,
[ --enable-dirac experimental dirac codec (default disabled)]) [ --enable-dirac experimental dirac codec (default disabled)])
if test "${enable_dirac}" = "yes"; then if test "${enable_dirac}" = "yes"; then
PKG_CHECK_MODULES(DIRAC,[dirac >= 0.6.0], [ PKG_CHECK_MODULES(DIRAC,[dirac >= 0.8.0], [
VLC_ADD_PLUGINS([dirac]) VLC_ADD_PLUGINS([dirac])
VLC_ADD_CFLAGS([dirac],[$DIRAC_CFLAGS]) VLC_ADD_CFLAGS([dirac],[$DIRAC_CFLAGS])
VLC_ADD_LIBS([dirac],[$DIRAC_LIBS -lstdc++]) ],[ VLC_ADD_LIBS([dirac],[$DIRAC_LIBS -lstdc++]) ],[
......
...@@ -144,7 +144,7 @@ static picture_t *GetNewPicture( decoder_t *p_dec ) ...@@ -144,7 +144,7 @@ static picture_t *GetNewPicture( decoder_t *p_dec )
picture_t *p_pic; picture_t *p_pic;
int i_plane; int i_plane;
switch( p_sys->p_dirac->seq_params.chroma ) switch( p_sys->p_dirac->src_params.chroma )
{ {
case format420: p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','0'); break; case format420: p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','0'); break;
case format422: p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','2'); break; case format422: p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','2'); break;
...@@ -155,9 +155,9 @@ static picture_t *GetNewPicture( decoder_t *p_dec ) ...@@ -155,9 +155,9 @@ static picture_t *GetNewPicture( decoder_t *p_dec )
} }
p_dec->fmt_out.video.i_visible_width = p_dec->fmt_out.video.i_visible_width =
p_dec->fmt_out.video.i_width = p_sys->p_dirac->seq_params.width; p_dec->fmt_out.video.i_width = p_sys->p_dirac->src_params.width;
p_dec->fmt_out.video.i_visible_height = p_dec->fmt_out.video.i_visible_height =
p_dec->fmt_out.video.i_height = p_sys->p_dirac->seq_params.height; p_dec->fmt_out.video.i_height = p_sys->p_dirac->src_params.height;
p_dec->fmt_out.video.i_aspect = VOUT_ASPECT_FACTOR * 4 / 3; p_dec->fmt_out.video.i_aspect = VOUT_ASPECT_FACTOR * 4 / 3;
p_dec->fmt_out.video.i_frame_rate = p_dec->fmt_out.video.i_frame_rate =
...@@ -250,19 +250,19 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -250,19 +250,19 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
uint8_t *buf[3]; uint8_t *buf[3];
msg_Dbg( p_dec, "%dx%d, chroma %i, %f fps", msg_Dbg( p_dec, "%dx%d, chroma %i, %f fps",
p_sys->p_dirac->seq_params.width, p_sys->p_dirac->src_params.width,
p_sys->p_dirac->seq_params.height, p_sys->p_dirac->src_params.height,
p_sys->p_dirac->seq_params.chroma, p_sys->p_dirac->src_params.chroma,
(float)p_sys->p_dirac->src_params.frame_rate.numerator/ (float)p_sys->p_dirac->src_params.frame_rate.numerator/
p_sys->p_dirac->src_params.frame_rate.denominator ); p_sys->p_dirac->src_params.frame_rate.denominator );
FreeFrameBuffer( p_sys->p_dirac ); FreeFrameBuffer( p_sys->p_dirac );
buf[0] = malloc( p_sys->p_dirac->seq_params.width * buf[0] = malloc( p_sys->p_dirac->src_params.width *
p_sys->p_dirac->seq_params.height ); p_sys->p_dirac->src_params.height );
buf[1] = malloc( p_sys->p_dirac->seq_params.chroma_width * buf[1] = malloc( p_sys->p_dirac->src_params.chroma_width *
p_sys->p_dirac->seq_params.chroma_height ); p_sys->p_dirac->src_params.chroma_height );
buf[2] = malloc( p_sys->p_dirac->seq_params.chroma_width * buf[2] = malloc( p_sys->p_dirac->src_params.chroma_width *
p_sys->p_dirac->seq_params.chroma_height ); p_sys->p_dirac->src_params.chroma_height );
dirac_set_buf( p_sys->p_dirac, buf, NULL ); dirac_set_buf( p_sys->p_dirac, buf, NULL );
break; break;
...@@ -356,9 +356,9 @@ static int OpenEncoder( vlc_object_t *p_this ) ...@@ -356,9 +356,9 @@ static int OpenEncoder( vlc_object_t *p_this )
dirac_encoder_context_init( &p_sys->ctx, VIDEO_FORMAT_CUSTOM ); dirac_encoder_context_init( &p_sys->ctx, VIDEO_FORMAT_CUSTOM );
/* */ /* */
p_sys->ctx.seq_params.width = p_enc->fmt_in.video.i_width; p_sys->ctx.src_params.width = p_enc->fmt_in.video.i_width;
p_sys->ctx.seq_params.height = p_enc->fmt_in.video.i_height; p_sys->ctx.src_params.height = p_enc->fmt_in.video.i_height;
p_sys->ctx.seq_params.chroma = format420; p_sys->ctx.src_params.chroma = format420;
/* */ /* */
p_sys->ctx.src_params.frame_rate.numerator = p_sys->ctx.src_params.frame_rate.numerator =
p_enc->fmt_in.video.i_frame_rate; p_enc->fmt_in.video.i_frame_rate;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment