Mercurial > libpostproc.hg
comparison postprocess.c @ 115:213fc392f0c0 libpostproc
Drop _t from typedef names for POSIX compatibility.
author | diego |
---|---|
date | Thu, 11 Dec 2008 20:06:16 +0000 |
parents | 4bcd22663020 |
children | 3a76063f4145 |
comparison
equal
deleted
inserted
replaced
114:4bcd22663020 | 115:213fc392f0c0 |
---|---|
632 #endif | 632 #endif |
633 | 633 |
634 // minor note: the HAVE_xyz is messed up after that line so do not use it. | 634 // minor note: the HAVE_xyz is messed up after that line so do not use it. |
635 | 635 |
636 static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height, | 636 static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height, |
637 const QP_STORE_T QPs[], int QPStride, int isColor, pp_mode_t *vm, pp_context_t *vc) | 637 const QP_STORE_T QPs[], int QPStride, int isColor, pp_mode *vm, pp_context *vc) |
638 { | 638 { |
639 PPContext *c= (PPContext *)vc; | 639 PPContext *c= (PPContext *)vc; |
640 PPMode *ppMode= (PPMode *)vm; | 640 PPMode *ppMode= (PPMode *)vm; |
641 c->ppMode= *ppMode; //FIXME | 641 c->ppMode= *ppMode; //FIXME |
642 | 642 |
728 "more examples:\n" | 728 "more examples:\n" |
729 "tn:64:128:256\n" | 729 "tn:64:128:256\n" |
730 "\n" | 730 "\n" |
731 ; | 731 ; |
732 | 732 |
733 pp_mode_t *pp_get_mode_by_name_and_quality(const char *name, int quality) | 733 pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality) |
734 { | 734 { |
735 char temp[GET_MODE_BUFFER_SIZE]; | 735 char temp[GET_MODE_BUFFER_SIZE]; |
736 char *p= temp; | 736 char *p= temp; |
737 static const char filterDelimiters[] = ",/"; | 737 static const char filterDelimiters[] = ",/"; |
738 static const char optionDelimiters[] = ":"; | 738 static const char optionDelimiters[] = ":"; |
903 return NULL; | 903 return NULL; |
904 } | 904 } |
905 return ppMode; | 905 return ppMode; |
906 } | 906 } |
907 | 907 |
908 void pp_free_mode(pp_mode_t *mode){ | 908 void pp_free_mode(pp_mode *mode){ |
909 av_free(mode); | 909 av_free(mode); |
910 } | 910 } |
911 | 911 |
912 static void reallocAlign(void **p, int alignment, int size){ | 912 static void reallocAlign(void **p, int alignment, int size){ |
913 av_free(*p); | 913 av_free(*p); |
945 return "postproc"; | 945 return "postproc"; |
946 } | 946 } |
947 | 947 |
948 static const AVClass av_codec_context_class = { "Postproc", context_to_name, NULL }; | 948 static const AVClass av_codec_context_class = { "Postproc", context_to_name, NULL }; |
949 | 949 |
950 pp_context_t *pp_get_context(int width, int height, int cpuCaps){ | 950 pp_context *pp_get_context(int width, int height, int cpuCaps){ |
951 PPContext *c= av_malloc(sizeof(PPContext)); | 951 PPContext *c= av_malloc(sizeof(PPContext)); |
952 int stride= (width+15)&(~15); //assumed / will realloc if needed | 952 int stride= (width+15)&(~15); //assumed / will realloc if needed |
953 int qpStride= (width+15)/16 + 2; //assumed / will realloc if needed | 953 int qpStride= (width+15)/16 + 2; //assumed / will realloc if needed |
954 | 954 |
955 memset(c, 0, sizeof(PPContext)); | 955 memset(c, 0, sizeof(PPContext)); |
993 | 993 |
994 void pp_postprocess(const uint8_t * src[3], const int srcStride[3], | 994 void pp_postprocess(const uint8_t * src[3], const int srcStride[3], |
995 uint8_t * dst[3], const int dstStride[3], | 995 uint8_t * dst[3], const int dstStride[3], |
996 int width, int height, | 996 int width, int height, |
997 const QP_STORE_T *QP_store, int QPStride, | 997 const QP_STORE_T *QP_store, int QPStride, |
998 pp_mode_t *vm, void *vc, int pict_type) | 998 pp_mode *vm, void *vc, int pict_type) |
999 { | 999 { |
1000 int mbWidth = (width+15)>>4; | 1000 int mbWidth = (width+15)>>4; |
1001 int mbHeight= (height+15)>>4; | 1001 int mbHeight= (height+15)>>4; |
1002 PPMode *mode = (PPMode*)vm; | 1002 PPMode *mode = (PPMode*)vm; |
1003 PPContext *c = (PPContext*)vc; | 1003 PPContext *c = (PPContext*)vc; |