1 /*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg 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 GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 #ifndef AVCODEC_DV_PROFILE_H
20 #define AVCODEC_DV_PROFILE_H
21
22 #include <stdint.h>
23
26
27 /* minimum number of bytes to read from a DV stream in order to
28 * determine the profile */
29 #define DV_PROFILE_BYTES (6 * 80) /* 6 DIF blocks */
30
31
32 /*
33 * AVDVProfile is used to express the differences between various
34 * DV flavors. For now it's primarily used for differentiating
35 * 525/60 and 625/50, but the plans are to use it for various
36 * DV specs as well (e.g. SMPTE314M vs. IEC 61834).
37 */
39 int dsf;
/* value of the dsf in the DV header */
43 int n_difchan;
/* number of DIF channels per frame */
46 int height;
/* picture height in pixels */
47 int width;
/* picture width in pixels */
50 int bpm;
/* blocks per macroblock */
54 /* for 48kHz, 44.1kHz and 32kHz */
56 /* in each frame in a 5 frames window */
59
60 /**
61 * Get a DV profile for the provided compressed frame.
62 *
63 * @param sys the profile used for the previous frame, may be NULL
64 * @param frame the compressed data buffer
65 * @param buf_size size of the buffer in bytes
66 * @return the DV profile for the supplied data or NULL on failure
67 */
69 const uint8_t *
frame,
unsigned buf_size);
70
71 /**
72 * Get a DV profile for the provided stream parameters.
73 */
75
76 /**
77 * Get a DV profile for the provided stream parameters.
78 * The frame rate is used as a best-effort parameter.
79 */
81
82 #endif /* AVCODEC_DV_PROFILE_H */