]> git.pld-linux.org Git - packages/vlc.git/blob - vlc-dirac.patch
- updated
[packages/vlc.git] / vlc-dirac.patch
1 --- vlc-0.8.6f/modules/codec/dirac.c.orig       2008-04-05 00:08:38.700072896 +0200
2 +++ vlc-0.8.6f/modules/codec/dirac.c    2008-04-05 00:23:17.139699739 +0200
3 @@ -145,31 +145,31 @@
4      int i_plane;
5  
6      p_dec->fmt_out.i_codec =
7 -        p_sys->p_dirac->seq_params.chroma == format411 ?
8 -        VLC_FOURCC('I','4','1','1') :
9 -        p_sys->p_dirac->seq_params.chroma == format420 ?
10 +        p_sys->p_dirac->src_params.chroma == format444 ?
11 +        VLC_FOURCC('I','4','4','4') :
12 +        p_sys->p_dirac->src_params.chroma == format420 ?
13          VLC_FOURCC('I','4','2','0') :
14 -        p_sys->p_dirac->seq_params.chroma == format422 ?
15 +        p_sys->p_dirac->src_params.chroma == format422 ?
16          VLC_FOURCC('I','4','2','2') : 0;
17  
18      p_dec->fmt_out.video.i_visible_width =
19 -    p_dec->fmt_out.video.i_width = p_sys->p_dirac->seq_params.width;
20 +    p_dec->fmt_out.video.i_width = p_sys->p_dirac->src_params.width;
21      p_dec->fmt_out.video.i_visible_height =
22 -    p_dec->fmt_out.video.i_height = p_sys->p_dirac->seq_params.height;
23 +    p_dec->fmt_out.video.i_height = p_sys->p_dirac->src_params.height;
24      p_dec->fmt_out.video.i_aspect = VOUT_ASPECT_FACTOR * 4 / 3;
25  
26      p_dec->fmt_out.video.i_frame_rate =
27 -        p_sys->p_dirac->seq_params.frame_rate.numerator;
28 +        p_sys->p_dirac->src_params.frame_rate.numerator;
29      p_dec->fmt_out.video.i_frame_rate_base =
30 -        p_sys->p_dirac->seq_params.frame_rate.denominator;
31 +        p_sys->p_dirac->src_params.frame_rate.denominator;
32  
33      /* Get a new picture */
34      p_pic = p_dec->pf_vout_buffer_new( p_dec );
35  
36      if( p_pic == NULL ) return NULL;
37  
38 -    p_pic->b_progressive = !p_sys->p_dirac->seq_params.interlace;
39 -    p_pic->b_top_field_first = p_sys->p_dirac->seq_params.topfieldfirst;
40 +    p_pic->b_progressive = !p_sys->p_dirac->src_params.source_sampling;
41 +    p_pic->b_top_field_first = p_sys->p_dirac->src_params.topfieldfirst;
42      p_pic->i_nb_fields = 2;
43  
44      /* Copy picture stride by stride */
45 @@ -248,19 +248,19 @@
46              uint8_t *buf[3];
47  
48              msg_Dbg( p_dec, "%dx%d, chroma %i, %f fps",
49 -                     p_sys->p_dirac->seq_params.width,
50 -                     p_sys->p_dirac->seq_params.height,
51 -                     p_sys->p_dirac->seq_params.chroma,
52 -                     (float)p_sys->p_dirac->seq_params.frame_rate.numerator/
53 -                     p_sys->p_dirac->seq_params.frame_rate.denominator );
54 +                     p_sys->p_dirac->src_params.width,
55 +                     p_sys->p_dirac->src_params.height,
56 +                     p_sys->p_dirac->src_params.chroma,
57 +                     (float)p_sys->p_dirac->src_params.frame_rate.numerator/
58 +                     p_sys->p_dirac->src_params.frame_rate.denominator );
59  
60              FreeFrameBuffer( p_sys->p_dirac );
61 -            buf[0] = malloc( p_sys->p_dirac->seq_params.width *
62 -                             p_sys->p_dirac->seq_params.height );
63 -            buf[1] = malloc( p_sys->p_dirac->seq_params.chroma_width *
64 -                             p_sys->p_dirac->seq_params.chroma_height );
65 -            buf[2] = malloc( p_sys->p_dirac->seq_params.chroma_width *
66 -                             p_sys->p_dirac->seq_params.chroma_height );
67 +            buf[0] = malloc( p_sys->p_dirac->src_params.width *
68 +                             p_sys->p_dirac->src_params.height );
69 +            buf[1] = malloc( p_sys->p_dirac->src_params.chroma_width *
70 +                             p_sys->p_dirac->src_params.chroma_height );
71 +            buf[2] = malloc( p_sys->p_dirac->src_params.chroma_width *
72 +                             p_sys->p_dirac->src_params.chroma_height );
73  
74              dirac_set_buf( p_sys->p_dirac, buf, NULL );
75              break;
76 @@ -354,18 +354,18 @@
77  
78      /* Initialse the encoder context with the presets for SD576 - Standard
79       * Definition Digital (some parameters will be overwritten later on) */
80 -    dirac_encoder_context_init( &p_sys->ctx, SD576 );
81 +    dirac_encoder_context_init( &p_sys->ctx, VIDEO_FORMAT_SD_576I50 );
82  
83      /* Override parameters if required */
84 -    p_sys->ctx.seq_params.width = p_enc->fmt_in.video.i_width;
85 -    p_sys->ctx.seq_params.height = p_enc->fmt_in.video.i_height;
86 -    p_sys->ctx.seq_params.chroma = format420;
87 -    p_sys->ctx.seq_params.frame_rate.numerator =
88 +    p_sys->ctx.src_params.width = p_enc->fmt_in.video.i_width;
89 +    p_sys->ctx.src_params.height = p_enc->fmt_in.video.i_height;
90 +    p_sys->ctx.src_params.chroma = format420;
91 +    p_sys->ctx.src_params.frame_rate.numerator =
92          p_enc->fmt_in.video.i_frame_rate;
93 -    p_sys->ctx.seq_params.frame_rate.denominator =
94 +    p_sys->ctx.src_params.frame_rate.denominator =
95          p_enc->fmt_in.video.i_frame_rate_base;
96 -    p_sys->ctx.seq_params.interlace = 0;
97 -    p_sys->ctx.seq_params.topfieldfirst = 0;
98 +    p_sys->ctx.src_params.source_sampling = 0;
99 +    p_sys->ctx.src_params.topfieldfirst = 0;
100  
101      var_Get( p_enc, ENC_CFG_PREFIX "quality", &val );
102      f_quality = val.f_float;
This page took 0.038697 seconds and 3 git commands to generate.