~ubuntu-branches/ubuntu/lucid/gavl/lucid

« back to all changes in this revision

Viewing changes to gavl/deinterlace_copy.c

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2006-05-17 14:24:46 UTC
  • Revision ID: james.westby@ubuntu.com-20060517142446-iqm0jgfbkmy27n5w
Tags: upstream-0.2.3
ImportĀ upstreamĀ versionĀ 0.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************
 
2
 
 
3
  deinterlace_copy.c
 
4
 
 
5
  Copyright (c) 2005 by Burkhard Plaum - plaum@ipf.uni-stuttgart.de
 
6
 
 
7
  http://gmerlin.sourceforge.net
 
8
 
 
9
  This program is distributed in the hope that it will be useful,
 
10
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
  GNU General Public License for more details.
 
13
 
 
14
  You should have received a copy of the GNU General Public License
 
15
  along with this program; if not, write to the Free Software
 
16
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
 
17
 
 
18
*****************************************************************/
 
19
 
 
20
#include <stdio.h>
 
21
 
 
22
#include <gavl/gavl.h>
 
23
#include <video.h>
 
24
#include <deinterlace.h>
 
25
 
 
26
static void deinterlace_copy(gavl_video_deinterlacer_t * d,
 
27
                             gavl_video_frame_t * input_frame,
 
28
                             gavl_video_frame_t * output_frame)
 
29
  {
 
30
  fprintf(stderr, "DEINTERLACE_COPY\n");
 
31
  /* Src field */
 
32
  gavl_video_frame_get_field(d->format.pixelformat,
 
33
                             input_frame,
 
34
                             d->src_field,
 
35
                             (d->opt.deinterlace_drop_mode ==
 
36
                              GAVL_DEINTERLACE_DROP_TOP) ? 1 : 0);
 
37
 
 
38
  /* Dst field (even) */
 
39
  gavl_video_frame_get_field(d->format.pixelformat,
 
40
                             output_frame,
 
41
                             d->dst_field, 0);
 
42
  gavl_video_frame_copy(&d->half_height_format,
 
43
                        d->dst_field, d->src_field);
 
44
 
 
45
  /* Dst field (odd) */
 
46
  gavl_video_frame_get_field(d->format.pixelformat,
 
47
                             output_frame,
 
48
                             d->dst_field, 1);
 
49
  gavl_video_frame_copy(&d->half_height_format,
 
50
                        d->dst_field, d->src_field);
 
51
  
 
52
  }
 
53
 
 
54
gavl_video_deinterlace_func
 
55
gavl_find_deinterlacer_copy_c(const gavl_video_options_t * opt,
 
56
                              const gavl_video_format_t * format)
 
57
  {
 
58
  return deinterlace_copy;
 
59
  }