4 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
7 * Kitae Kim <kt920.kim@samsung.com>
8 * SeokYeon Hwang <syeon.hwang@samsung.com>
9 * DongKyun Yun <dk77.yun@samsung.com>
10 * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
33 #include <sys/types.h>
38 #include "tizen/src/debug_ch.h"
40 #include <libavformat/avformat.h>
41 #include <libswscale/swscale.h>
46 * Codec Device Structures
49 typedef struct _SVCodecParam {
56 typedef struct _SVCodecState {
58 SVCodecParam codecParam;
63 ram_addr_t vram_offset;
78 EMUL_AV_REGISTER_ALL = 1,
81 EMUL_AVCODEC_ALLOC_CONTEXT,
82 EMUL_AVCODEC_ALLOC_FRAME,
86 EMUL_AV_FREE_EXTRADATA,
87 EMUL_AVCODEC_FLUSH_BUFFERS,
88 EMUL_AVCODEC_DECODE_VIDEO,
89 EMUL_AVCODEC_ENCODE_VIDEO,
100 int pci_codec_init (PCIBus *bus);
101 static int codec_operate(uint32_t value, SVCodecState *opaque);
107 void qemu_parser_init (void);
109 void qemu_restore_context (AVCodecContext *dst, AVCodecContext *src);
111 void qemu_av_register_all (void);
113 int qemu_avcodec_open (SVCodecState *s);
115 int qemu_avcodec_close (SVCodecState *s);
117 void qemu_avcodec_alloc_context (void);
119 void qemu_avcodec_alloc_frame (void);
121 void qemu_av_free_context (void);
123 void qemu_av_free_picture (void);
125 void qemu_av_free_palctrl (void);
127 void qemu_av_free_extradata (void);
129 void qemu_avcodec_flush_buffers (void);
131 int qemu_avcodec_decode_video (SVCodecState *s);
133 int qemu_avcodec_encode_video (SVCodecState *s);
135 void qemu_av_picture_copy (SVCodecState *s);
137 void qemu_av_parser_init (SVCodecState *s);
139 int qemu_av_parser_parse (SVCodecState *s);
141 void qemu_av_parser_close (void);
143 int qemu_avcodec_get_buffer (AVCodecContext *context, AVFrame *picture);
145 void qemu_avcodec_release_buffer (AVCodecContext *context, AVFrame *picture);