]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dv_profile.h
d3d11va: make av_d3d11va_alloc_context() available at all times
[ffmpeg] / libavcodec / dv_profile.h
index 4fcf3e12edfb463a6fadc6e412b1ccd020546423..5ad7b4f6491c8f1537a4a3850355193ac8b467c6 100644 (file)
 #include "libavutil/rational.h"
 #include "avcodec.h"
 
-typedef struct DVwork_chunk {
-    uint16_t  buf_offset;
-    uint16_t  mb_coordinates[5];
-} DVwork_chunk;
-
 /*
- * DVprofile is used to express the differences between various
+ * AVDVProfile is used to express the differences between various
  * DV flavors. For now it's primarily used for differentiating
  * 525/60 and 625/50, but the plans are to use it for various
  * DV specs as well (e.g. SMPTE314M vs. IEC 61834).
  */
-typedef struct DVprofile {
+typedef struct AVDVProfile {
     int              dsf;                   /* value of the dsf in the DV header */
     int              video_stype;           /* stype for VAUX source pack */
     int              frame_size;            /* total size of one frame in bytes */
@@ -47,9 +42,7 @@ typedef struct DVprofile {
     int              height;                /* picture height in pixels */
     int              width;                 /* picture width in pixels */
     AVRational       sar[2];                /* sample aspect ratios for 4:3 and 16:9 */
-    DVwork_chunk    *work_chunks;           /* each thread gets its own chunk of frame to work on */
-    uint32_t        *idct_factor;           /* set of iDCT factor tables */
-    enum PixelFormat pix_fmt;               /* picture pixel format */
+    enum AVPixelFormat pix_fmt;             /* picture pixel format */
     int              bpm;                   /* blocks per macroblock */
     const uint8_t   *block_sizes;           /* AC block sizes, in bits */
     int              audio_stride;          /* size of audio_shuffle table */
@@ -58,15 +51,22 @@ typedef struct DVprofile {
     int              audio_samples_dist[5]; /* how many samples are supposed to be */
                                             /* in each frame in a 5 frames window */
     const uint8_t  (*audio_shuffle)[9];     /* PCM shuffling table */
-} DVprofile;
+} AVDVProfile;
 
-const DVprofile* avpriv_dv_frame_profile(const DVprofile *sys,
-                                         const uint8_t* frame, unsigned buf_size);
-const DVprofile* avpriv_dv_codec_profile(AVCodecContext* codec);
+/**
+ * Get a DV profile for the provided compressed frame.
+ *
+ * @param sys the profile used for the previous frame, may be NULL
+ * @param frame the compressed data buffer
+ * @param buf_size size of the buffer in bytes
+ * @return the DV profile for the supplied data or NULL on failure
+ */
+const AVDVProfile *av_dv_frame_profile(const AVDVProfile *sys,
+                                       const uint8_t *frame, unsigned buf_size);
 
 /**
- *  Print all allowed DV profiles into logctx at specified logging level.
+ * Get a DV profile for the provided stream parameters.
  */
-void ff_dv_print_profiles(void *logctx, int loglevel);
+const AVDVProfile *av_dv_codec_profile(int width, int height, enum AVPixelFormat pix_fmt);
 
 #endif /* AVCODEC_DV_PROFILE_H */