Mercurial > mplayer.hg
annotate libvo/jpeg_enc.h @ 23510:a6c619ee9d30
Teletext support for tv:// (v4l and v4l2 only)
modified patch from Otvos Attila oattila at chello dot hu
Module uses zvbi library for all low-level VBI operations (like I/O with vbi
device, converting vbi pages into usefull vbi_page stuctures, rendering them
into RGB32 images).
All teletext related stuff (except properties, slave commands and rendering
osd in text mode or RGB32 rendered teletext pages in spu mode) is implemented
in tvi_vbi.c
New properties:
teletext_page - switching between pages
teletext_mode - switch between on/off/opaque/transparent modes
teletext_format - (currently read-only) allows to get format info
(black/white,gray,text)
teletext_half_page - trivial zooming (displaying top/bottom half of teletext
page)
New slave commands:
teletext_add_dec - user interface for jumping to any page by editing page number
interactively
teletext_go_link - goes though links, specified on current page
author | voroshil |
---|---|
date | Sun, 10 Jun 2007 00:06:12 +0000 |
parents | cea0eb833758 |
children | 6ac1ece1f9fe |
rev | line source |
---|---|
4651
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
1 /* Straightforward (to be) optimized JPEG encoder for the YUV422 format |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
2 * based on mjpeg code from ffmpeg. |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
3 * |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
4 * Copyright (c) 2002, Rik Snel |
7902
c9d1054aa359
sync with libavcodec for unaccellerated dcts (sorry Felix, LIBAVCODEC_BUILD did not change, so also no backwards compatibility this time), and a long overdue copyright update
rik
parents:
4651
diff
changeset
|
5 * Parts from ffmpeg Copyright (c) 2000-2002 Fabrice Bellard |
4651
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
6 * |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
7 * This program is free software; you can redistribute it and/or modify |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
8 * it under the terms of the GNU General Public License as published by |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
9 * the Free Software Foundation; either version 2 of the License, or |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
10 * (at your option) any later version. |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
11 * |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
15 * GNU General Public License for more details. |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
16 * |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
17 * You should have received a copy of the GNU General Public License |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
18 * along with this program; if not, write to the Free Software |
21977
cea0eb833758
Fix FSF address and otherwise broken license headers.
diego
parents:
7902
diff
changeset
|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
4651
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
20 * |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
21 * For an excellent introduction to the JPEG format, see: |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
22 * http://www.ece.purdue.edu/~bourman/grad-labs/lab8/pdf/lab.pdf |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
23 */ |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
24 |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
25 |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
26 typedef struct { |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
27 struct MpegEncContext *s; |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
28 int cheap_upsample; |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
29 int bw; |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
30 int y_ps; |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
31 int u_ps; |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
32 int v_ps; |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
33 int y_rs; |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
34 int u_rs; |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
35 int v_rs; |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
36 } jpeg_enc_t; |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
37 |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
38 jpeg_enc_t *jpeg_enc_init(int w, int h, int y_psize, int y_rsize, |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
39 int u_psize, int u_rsize, int v_psize, int v_rsize, |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
40 int cu, int q, int b); |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
41 |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
42 int jpeg_enc_frame(jpeg_enc_t *j, unsigned char *y_data, |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
43 unsigned char *u_data, unsigned char *v_data, char *bufr); |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
44 |
49f2bc22f880
mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff
changeset
|
45 void jpeg_enc_uninit(jpeg_enc_t *j); |